Hello,
I need to use the importT1MRI process and (after some other processing) the Morphologist process.
I would like to have just one script to run, so I wonder if there is a command line to run these process. Something like "brainvisa -r ...", but I don't know how to use this command: Which format for the parameters?
Regards,
Claire C.
How to use command BrainVISA onto a script shell?
-
- Site Admin
- Posts: 161
- Joined: Thu Mar 01, 2007 4:22 pm
- Location: IFR 49 - Neurospin, Gif-sur-Yvette, France
- Contact:
Re: How to use command BrainVISA onto a script shell?
Hello,
If you want to run several processes via a script, it is better to use the command, with the code to run Brainvisa processes in a python script (myscript.py in the example).
In this script, you can use brainvisa python API to run processes. Here is an example of script that runs Import T1 MRI process :
The runProcess function needs the identifier of the process (you can find it in the documentation of the process) and the value for each mandatory parameters.
You may find more example in these posts:
http://brainvisa.info/forum/viewtopic.php?f=2&t=1296
http://brainvisa.info/forum/viewtopic.php?f=10&t=1608
Dominique
If you want to run several processes via a script, it is better to use the command
Code: Select all
brainvisa -b -e myscript.py
In this script, you can use brainvisa python API to run processes. Here is an example of script that runs Import T1 MRI process :
Code: Select all
import neuroProcesses
context = neuroProcesses.defaultContext()
context.runProcess( 'importt1mri',
input = <file to import>,
output = {'protocol' : 'myprotocol', 'subject' : 'mysubject'} )
You may find more example in these posts:
http://brainvisa.info/forum/viewtopic.php?f=2&t=1296
http://brainvisa.info/forum/viewtopic.php?f=10&t=1608
Dominique
Re: How to use command BrainVISA onto a script shell?
Hi,
Thank you, I will do some tests, but a don't have access to the second link.
Regards,
Claire.
Thank you, I will do some tests, but a don't have access to the second link.
Regards,
Claire.