AimsMesh: ima TO mesh

AIMS library and commands usage

Moderators: riviere, denghien

User avatar
Simon Toralba
Posts: 7
Joined: Wed Mar 03, 2010 5:54 pm
Location: Caen, France
Contact:

AimsMesh: ima TO mesh

Postby Simon Toralba » Mon Mar 08, 2010 4:13 pm

Hi everyone,


Thanks to BrainVISA and its modules contributors for creating such great tools.
I'm a new user, and I need some help:

I have to convert a GIS volume (.ima made with Brainrat tools) to a mesh file, so that I can visualize it in the 3d window of Anatomist.
So, I used the command :

AimsMesh -i inputfile.ima -o outputfile.mesh

As result, I get thousands of mesh files , that Anatomist can't display of course.

How can I put these meshes together?
Is there an other way to visualize the objects of my .ima file in the 3d window?


Thanks a lot,

Simon

User avatar
Yann Cointepas
Posts: 316
Joined: Tue Jan 20, 2004 2:56 pm
Location: Neurospin, Saint Aubin, France
Contact:

Re: AimsMesh: ima TO mesh

Postby Yann Cointepas » Mon Mar 08, 2010 6:13 pm

What is the content of your image ? Is it a binary image or an image of labels representing ROIs ? If not (for instance if your image is an MR image), you should not use AimsMesh but create a fusion object in Anatomist (for instance a Cut Mesh fusion) to combine your image and your mesh.

Anyway, Anatomist should be able to display the meshes produced by AimsMesh. You should be able to load them all and put them in a 3D window. What is hapenning exaclty when you do that ?

User avatar
Yann Cointepas
Posts: 316
Joined: Tue Jan 20, 2004 2:56 pm
Location: Neurospin, Saint Aubin, France
Contact:

Re: AimsMesh: ima TO mesh

Postby Yann Cointepas » Mon Mar 08, 2010 6:21 pm

My suggestion to fusion your image with a mesh is a bit stupid because you do not have such a mesh. To build such a mesh, you may have to do some kind of segmentation before using AimsMesh.

Dominique Geffroy
Site Admin
Posts: 161
Joined: Thu Mar 01, 2007 4:22 pm
Location: IFR 49 - Neurospin, Gif-sur-Yvette, France
Contact:

Re: AimsMesh: ima TO mesh

Postby Dominique Geffroy » Tue Mar 09, 2010 8:55 am

Hi,

You also could use the volume rendering feature to see your image in 3D. It is explained here in the Anatomist tutorial : http://brainvisa.info/doc/anatomist-3.2/ana_training/en/html/ch06s09.html

Dominique

User avatar
Simon Toralba
Posts: 7
Joined: Wed Mar 03, 2010 5:54 pm
Location: Caen, France
Contact:

Re: AimsMesh: ima TO mesh

Postby Simon Toralba » Thu Apr 01, 2010 1:53 pm

Hello,

I haven't solved my problem yet or tried what you told me to do (because 3D rendering is only the final phase of my project), but I 'll report my solutions as soon as I work on it again. Anyway, thanks for the help.

Simon

User avatar
Simon Toralba
Posts: 7
Joined: Wed Mar 03, 2010 5:54 pm
Location: Caen, France
Contact:

Re: AimsMesh: ima TO mesh

Postby Simon Toralba » Fri May 21, 2010 11:14 am

Hello everybody

Volume rendering in anatomist seems to be impossible, it is much too heavy.

I understand why I got thousands of meshes : AimsMesh was working on all labels of my volume (65536).

Then I made a better segmentation so that my objects are filled in 255 on background=0, it takes place on an hundred of 2000x2000pix grey-scale S16 images, turned into a volume (.ima).

But when I run AimsMesh onto this volume, it bugs after few objects on 15-16 slices converted :


AimsMesh -i cavern.ima --smooth 1 -l 255 -L 255 --decimation 1 --deciReductionRate 96 --debugLevel 1 -o cavern.mesh

libaimsvida.dll.3.2.1: Could not load DLL libaimsvida.dll.3.2.1
libaimsvida.dll.3.2: Could not load DLL libaimsvida.dll.3.2
libaimsdicom.dll.3.2.1: Could not load DLL libaimsdicom.dll.3.2.1
libaimsecat.dll.3.2.1: Could not load DLL libaimsecat.dll.3.2.1
libaimsfdf.dll.3.2.1: Could not load DLL libaimsfdf.dll.3.2.1
libaimsjpeg.dll.3.2.1: Could not load DLL libaimsjpeg.dll.3.2.1
libaimstiff.dll.3.2.1: Could not load DLL libaimstiff.dll.3.2.1
libaimsqtformats.dll.3.2.1: Could not load DLL libaimsqtformats.dll.3.2.1
libaimsminc.dll.3.2.1: Could not load DLL libaimsminc.dll.3.2.1
libaimsply.dll.3.2.1: Could not load DLL libaimsply.dll.3.2.1
libaimsnifti.dll.3.2.1: Could not load DLL libaimsnifti.dll.3.2.1
libaimsgifti.dll.3.2.1: Could not load DLL libaimsgifti.dll.3.2.1
libconnectomist_aims_plugin.dll.3.2.1: Could not load DLL libconnectomist_aims_plugin.dll.3.2.1

reading image : done
resolutions : ( 0.0005 mm, 0.0005 mm, 0.006 mm )
label inferior : 255
label superior : 255
reading slice : 70
getting interface : done
processing mesh : [ 255, 5 ] extended neighborhood


->bug

AimsMesh_bug.jpg
AimsMesh_bug.jpg (14.67 KiB) Viewed 6891 times



It allows me to display few objects :


AimsMesh result1.jpg
AimsMesh result1.jpg (35.16 KiB) Viewed 6891 times


Are my objects too large for AimsMesh?

A solution would be to mesh each object one by one before merging it all in one piece using AimsZCat, but there might be a better way...

Simon

User avatar
Simon Toralba
Posts: 7
Joined: Wed Mar 03, 2010 5:54 pm
Location: Caen, France
Contact:

Re: AimsMesh: ima TO mesh

Postby Simon Toralba » Tue May 25, 2010 4:23 pm

AimsZCat is clearly not the appropriate tool to merge meshes...

Anyway, I have labelled each object with a number, so that AimsMesh can create meshes one by one. It bugs on some big objects. ex :


AimsMesh -i 117-186_mx1187.ima -l 194 -L 194 -o label194.mesh --decimation 1 --deciReductionRate 97 --smooth 1

reading image : done
resolutions : ( 0.0005 mm, 0.0005 mm, 0.0065 mm )
label inferior : 194
label superior : 194
reading slice : 70
getting interface : done
processing mesh : [ 194, 1 ] extended neighborhoodSt9bad_alloc


Does someone have an solution for this problem??

Simon

User avatar
riviere
Site Admin
Posts: 1358
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: AimsMesh: ima TO mesh

Postby riviere » Wed May 26, 2010 9:14 pm

Hi Simon,

You say you have images of 2000x2000x100 voxels ? Whew, I understand you have problems (especially on the Windows version which apparently doesn't manage very well memory). Just one of your images is almost 1Gb in size, and a 32 bit program can only deal with 2Gb - if a program needs to duplicate a volume, or make large meshes, you probably ran out of memory. Then you probably need a 64 bit version of BrainVisa, and we only have one for Linux. If you only have a Windows machine, you could maybe try running Linux in a virtual machine.
Alternately you could perhaps undersample your image to make it smaller, you would lose some precision in resolution, but if you are meshing just for visualization it might be enough ?
Otherwise (without memory problems) what you have done seems OK, and AimsZCat is the tool for merging meshes.

Denis

User avatar
Simon Toralba
Posts: 7
Joined: Wed Mar 03, 2010 5:54 pm
Location: Caen, France
Contact:

Re: AimsMesh: ima TO mesh

Postby Simon Toralba » Thu May 27, 2010 10:22 am

Thank you very much Denis

Now I think that I have all I need to finish my work.

BV rules!!


Return to “AIMS”

Who is online

Users browsing this forum: No registered users and 0 guests