Projecting volumes onto meshes from a terminal ?

Questions about Anatomist manipulation

Moderators: denghien, riviere

Post Reply
User avatar
Grégory Operto
Posts: 18
Joined: Sun Jan 16, 2005 11:00 pm
Location: CEA NeuroSpin, Gif-sur-Yvette, France
Contact:

Projecting volumes onto meshes from a terminal ?

Post by Grégory Operto »

Hi !
I was just wondering if by chance there would be a command (e.g. from a terminal) to create textures from the projection of volumes onto meshes. From a terminal and/or writing a script (and/or maybe by another way), I could create projections more quickly and reliably than by clicking/Ctrl+F/3D fusion/fusion control/sphere/3mm/etc... with several images and for "many" subjects.
I thought of writing an ANA script, which is fine to create automatically many 3D fusions at once but it doesn't store the selected method and parameters of fusion.
Any idea please ?
Thank you :)
Grégory
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Post by riviere »

Hi,
No there is no commandline which does so. Unfortunately the fusion mechanism is in anatomist, not in Aims (which is bad, but so it is), and anatomist doesn't provide commandlines so far.
Writing .ana scripts should be a good solution: you can provide fusion parameters in .ana scripts: look at the doc of anatomist command system (Fusion3DParams and similar commands).
In the future, all this should be scriptable in python so this will be easier.
Denis
User avatar
Jean-Francois Mangin
Posts: 337
Joined: Mon Mar 01, 2004 10:24 am
Location: Neurospin, CEA, France
Contact:

Post by Jean-Francois Mangin »

The easiest way to get such a script is to use anatomist history (I just did it with Cedric).
You load the volume and the mesh, perform the fusion, and save the texture.
Then you copy somewhere the file .anatomist/history.ana. This is the model
to be loaded in anatomist to do it again.
You can modify it to do it on a list of brains.
We may put something like that in perforce soon with Cedric.
User avatar
Grégory Operto
Posts: 18
Joined: Sun Jan 16, 2005 11:00 pm
Location: CEA NeuroSpin, Gif-sur-Yvette, France
Contact:

Post by Grégory Operto »

Indeed, I usually use Anatomist history to avoid writing the whole script manually. However, for some reason the 3D fusion parameters aren't stored in my history.ana.
But thanks to the "Fusion3DParams" trick, the problem is now solved, thank you !
Grégory
SylvainT
Posts: 73
Joined: Mon Feb 13, 2006 6:37 pm
Location: INT, Marseille, France

Post by SylvainT »

this is nice, I didn't know it was possible to do this!!!! this will save me a lot of time and a lot of mouse clicks!
thanks ;)
SylvainT
Posts: 73
Joined: Mon Feb 13, 2006 6:37 pm
Location: INT, Marseille, France

Post by SylvainT »

and even better... I thought I'd give the following a try to see if that works, and it does:

when launching anatomist, you can give the name of your script as a command line argument (anatomist your_script.ana &) and it runs it directly!

(maybe most people knew about all this but I didn't, so that made my day ;) )
User avatar
cedric clouchoux
Posts: 33
Joined: Tue Jul 06, 2004 2:54 pm
Location: BIC, MNI, Montreal

Post by cedric clouchoux »

hi!
by the way Denis (or Yann or anyone...), is the Anatomist export texture from a fusion object ("ExportTexture") function wrapped into python? I couldn't find it...
Anyway i'm trying to find a trick if this does not exist.
thx
c
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Post by riviere »

Hi,

The python bindings are quite in early development phase, and do not contain many functionalities in the stable verison. However the commands system can be used from python. There are examples in the development version of the pyanatomist project.

For now there are 3 ways to manipulate anatomist:
- the .ana system: commands sent to anatomist in a text file or a network connection
- from brainvisa: there is a brainvisa-anatomist communication module in BV that handles all interactions: look at the viewer processes for examples. In fact it is a wrapping of the .ana system
- from python using bindings to the C++ library: this is the new way that will allow more flexibility but as I said just before, it is a bit early now.

Denis
Post Reply