AimsInflate doesn't save sequence [solved]

AIMS library and commands usage

Moderators: riviere, denghien

atsui
Posts: 13
Joined: Fri Jan 13, 2012 9:23 pm
Location: Davis, CA USA

AimsInflate doesn't save sequence [solved]

Postby atsui » Tue Jun 05, 2012 4:32 am

Hi,

I'm trying to save a sampling of the inflation sequence generated by AimsInflate, but the intermediate meshes in the sequence don't appear. Here is the command that I issue:

Code: Select all

$ AimsInflate -i 10100_Lhemi.mesh -o inflate_500.mesh -t 500 -Kn 0.01 -Ksp 0.01 -Ksm 0.5 -c curvature_500.tex -S
Parameters:
-----------

Input     : 10100_Lhemi.mesh
Output    : inflate_500.mesh
Iterations: 500
Knormal   : 0.01
Kspring   : 0.01
Ksmooth   : 0.5
Bound     : 5000
Sequence  : 1

Adding time t=1, 10, 20, 40, 80, 160, 320 to the sequence time list
The surface mesh has 26197 nodes


It recognizes that the sequence should be saved, and it also indicates which time steps, but at the end of the process, I can only find a single output file rather than a sequence of files. Do I have to do something differently?

--Alex
Last edited by atsui on Tue Jun 05, 2012 9:29 am, edited 1 time in total.

User avatar
Olivier Coulon
Posts: 176
Joined: Fri Feb 27, 2004 11:48 am
Location: MeCA research group, Institut de Neurosciences de La Timone, Marseille, France
Contact:

Re: AimsInflate doesn't save sequence

Postby Olivier Coulon » Tue Jun 05, 2012 8:02 am

Hello,
I think that the file contains the whole sequence. If you open it n a 3D window with anatomist there should be a slider on the side that allows you to see all meshes in the sequence.

olivier
Olivier Coulon
Institut de Neurosciences de La Timone,
Aix-Marseille Université,
Marseille, france
https://meca-brain.org

atsui
Posts: 13
Joined: Fri Jan 13, 2012 9:23 pm
Location: Davis, CA USA

Re: AimsInflate doesn't save sequence

Postby atsui » Tue Jun 05, 2012 9:27 am

Wow, that was easy. Thanks for pointing that out for me!

To follow up, how can I extract an individual mesh at a particular time point from the .mesh file containing the sequence, either from Anatomist or AIMS?

--Alex

User avatar
Olivier Coulon
Posts: 176
Joined: Fri Feb 27, 2004 11:48 am
Location: MeCA research group, Institut de Neurosciences de La Timone, Marseille, France
Contact:

Re: AimsInflate doesn't save sequence [solved]

Postby Olivier Coulon » Tue Jun 05, 2012 1:42 pm

Hi,
it might be possible with a command line but nothing straightforward comes to my mind... You can do a little python programming to do this, but probably you should chose what time step you're interested in, using anatomist, and then re-run the AimsInflate without the -S option and with a -t value that fits your choice... Does this help ?

Olivier
Olivier Coulon
Institut de Neurosciences de La Timone,
Aix-Marseille Université,
Marseille, france
https://meca-brain.org

atsui
Posts: 13
Joined: Fri Jan 13, 2012 9:23 pm
Location: Davis, CA USA

Re: AimsInflate doesn't save sequence [solved]

Postby atsui » Tue Jun 05, 2012 5:28 pm

Thanks Olivier,

This is helpful. I think I will follow your idea for the time being, but I'd like to teach myself a bit of python programming as well.

I think I will look into doing some python programming using PyAIMS. There's an example here http://brainvisa.info/doc/pyaims-4.2/examples/mesh_test.py that suggests you should be able to instantiate the mesh and select the vertices/normals/faces at some time point. I'm not really sure what the data type is. I guess it's an AimsTimeSurface_3 but I'm unsure of its API.

--Alex

User avatar
Olivier Coulon
Posts: 176
Joined: Fri Feb 27, 2004 11:48 am
Location: MeCA research group, Institut de Neurosciences de La Timone, Marseille, France
Contact:

Re: AimsInflate doesn't save sequence [solved]

Postby Olivier Coulon » Wed Jun 06, 2012 10:49 am

Alex,
if you want to use the python API, here is a little starter. First you have to use the python that comes with brainvisa (not the one already on your system). If you want a python shell you can use the ipython that comes with brainvisa as well. Then the following code should help you to load and access vertices, polygons, etc.. of a mesh:

Code: Select all

from soma import aims
r=aims.Reader()
surf=r.read('inflatedMesh.mesh')
t=0
vert=surf.vertex(t)
poly=surf.polygon()


In this code, t is the timestep.
Good luck,

Olivier
Olivier Coulon
Institut de Neurosciences de La Timone,
Aix-Marseille Université,
Marseille, france
https://meca-brain.org


Return to “AIMS”

Who is online

Users browsing this forum: No registered users and 0 guests