Hello,
I understand that one can save any image from a given window through the window command menu "Window->Save Image'.
However, this can be burdensome if one need to record many images from different windows. Indeed, we need to go in each window and do "Window->Save Image'.
Is there any command for saving all images from all opened windows? If not, can I type a quick python script to do that, such as selecting a set of windows and then saving images?
Thanks for your help
François
Saving images from many windows in a row
- François Leroy
- Posts: 30
- Joined: Wed Feb 22, 2006 5:22 pm
- Jean-Francois Mangin
- Posts: 337
- Joined: Mon Mar 01, 2004 10:24 am
- Location: Neurospin, CEA, France
- Contact:
Intuitively, one alternative for something like that would have been the use of the inner language of Anatomist (see here:
http://brainvisa.info/doc/html/anatomis ... mands.html).
However, according to this version of the documentation, there is no command for saving snapshot.
There maybe another solution putting one 3D window in movie mode (creating a series of snapshot usually used to create a movie with some encoder). You could create a script putting one after the other your brains in the same 3D window and setting a orientation (maybe the best way is python, but a tree of commands may be enough). Of course, this is not perfect, you can not master how many snapshot you will get for each brain and have some trouble with the filenames.
Let us see if Denis has a better idea...
http://brainvisa.info/doc/html/anatomis ... mands.html).
However, according to this version of the documentation, there is no command for saving snapshot.
There maybe another solution putting one 3D window in movie mode (creating a series of snapshot usually used to create a movie with some encoder). You could create a script putting one after the other your brains in the same 3D window and setting a orientation (maybe the best way is python, but a tree of commands may be enough). Of course, this is not perfect, you can not master how many snapshot you will get for each brain and have some trouble with the filenames.
Let us see if Denis has a better idea...
- François Leroy
- Posts: 30
- Joined: Wed Feb 22, 2006 5:22 pm
Saving images from many windows in a row
OK, I found the "snapshot" command and used it in a script that deals with all images. It worked fine.
Thank you for your help and the link to anatomist commands.
François
Thank you for your help and the link to anatomist commands.
François
- riviere
- Site Admin
- Posts: 1361
- Joined: Tue Jan 06, 2004 12:21 pm
- Location: CEA NeuroSpin, Saint Aubin, France
- Contact:
Hi,
Yes the "command language" in anatomist allows to take snapshots, but it's not a dedicated command, it's an option of WindowConfig: you can use a script like this:(1 is the ID of the window that you should have defined before)
Otherwise there are ways to command anatomist from brainvisa which make such operations a bit simpler. There will be python bindings too, but they are a bit too young right now.
Denis
Yes the "command language" in anatomist allows to take snapshots, but it's not a dedicated command, it's an option of WindowConfig: you can use a script like this:
Code: Select all
*BEGIN TREE EXECUTE
*BEGIN TREE WindowConfig
windows 1
snapshot /tmp/image.jpg
*END
*END
Otherwise there are ways to command anatomist from brainvisa which make such operations a bit simpler. There will be python bindings too, but they are a bit too young right now.
Denis