SCIRun User Mailing List

Text archives Help

[SCIRUN-USERS] Re: Call_SCIRun_from_script

Chronological Thread 
  • From: Jeroen Stinstra <>
  • To: vadim astakhov <>
  • Cc:
  • Subject: [SCIRUN-USERS] Re: Call_SCIRun_from_script
  • Date: Thu, 12 Mar 2009 15:36:18 -0600

Dear Vadim,

SCIRun has several scripting options:
-E is to execute and quit a network (hence it can be used to run scirun in a batch mode)
-I will capture images when the SCIRun network has finished executing

Besides that all readers have a script tab where you can enter the environment variable from
which to extract a filename.

Hence the recipe is to generate the network that you want to run in batch mode. In the file
readers enter in the script tab a variable name for each input you want to script.
(Similarly all writers have the same tab)

Then you can run scirun from the commandline like this:

scirun mynetwork.srn -E -I myimage.png +MY_INPUT_FILE=/Users/jeroen/example.fld

The -E option will automatically start the network and when all modules have finished executing it will quit. 
The -I option will write an image file for each ViewScene window that is open in the network (it will add an
extension if multiple windows are open).
The +VAR=VALUE option will set environment variables in SCIRun, you can either export it to the environment
before or do it on the command line of SCIRun, like in the example above. In this case the variable
MY_INPUT_FILE is set to the file /Users/jeroen/example.fld. If the FieldReader in the script tab now has the
name MY_INPUT_FILE, it will use this name instead. If this one is not set it will default to the original filename
set in any of the other tabs.

In order to get the fiber tracts, you need to design a SCIRun network that does this specific task
with all the options you need. 

Let me know if you have any additional questions, or need help designing a SCIRun network for
the DTI processing.



On Mar 12, 2009, at 1:20 PM, vadim astakhov wrote:

Is there option to call SCIRun from a script or java code and get fiber tracs for DTI image. I will appreciate any advice. Vadim Astakhov Center for Research in Biological Systems
University of California San Diego

Archive powered by MHonArc 2.6.16.

Top of page