Page 1 of 1

simlistic python script to start Anatomist interactively

Posted: Thu Mar 01, 2007 12:17 am
by yarikoptic
Would anyone mind sharing a minimalistic python script to make use of anatomist from interactive (ipython) session. I've tried to "tesselate" neuro.py to reduce it to the point sufficient to simply run a=Anatomist.anatomist() but gave up for now since probably many of you do use such simple scripts ;-)

Thank you in advance!

Posted: Tue Mar 06, 2007 10:57 pm
by riviere
Hi,
you are talking about the API to control Anatomist from Brainvisa, right ?
The simplest way is to run brainvisa with the --shell commandline option: it will open BV in an interactive IPython shell. Then you can import Anatomist and run your a=Anatomist.anatomist() command.
All the Anatomist communication stuff in brainvisa is in the Anatomist.py source.
Alternatively, you can pass a python script to brainvisa using the -e option. Such a script can use the brainvisa API.
Denis

Posted: Wed Mar 07, 2007 12:23 am
by yarikoptic
Thank you Denis for replies -- they are 200% helpful ;-)