Description
We need to be able to pass filenames as inputs to SCIRun networks from the command line. In SCIRun, there is two basic ways to do this: InsertEnvironmentIntoBundle and through the script tab. These are functionally similar, as both require setting the environment variable to the filename and pulling them into the Read* modules. String inputs will need to be addressed in the DataIO modules (#1185)
The environment variable can be set in two ways. the first is the normal system way with the export command. The second is on the command to run scirun:
scirun -E networkname +VARNAME=filepathandname.
Either method can read the filename either way.
string manipulation (especially splitfilename,printstringintostring,GetStringFromBundle) are needed to make this useful.
some examples are:
network:
/usr/sci/projects/cibc/validate_defib/kid_defib/SCIRun_Nets/Script_FEM/Script-FE-External-refine-3cm-100x100x150-all-cases-permut-matrix-ventricles.srn
script:
/usr/sci/projects/cibc/validate_defib/kid_defib/scripts_jess/run_list_external.sh
usage: ./run_list_external.sh ../External_Defib/
network:
/usr/sci/projects/cibc/validate_defib/kid_defib/Clinical-Conductivity/SCIRun_Nets/desampexpress.srn
script:
/usr/sci/projects/cibc/validate_defib/kid_defib/Clinical-Conductivity/SCIRun_Scripts/desampexp
usage:
./desampexp ../../Results/LeadPlacement/jess-Experiments_perturbed-01-Nov-12/
A simpler example is on the SCIRun-Exchange, in the Defibrillation_Evaluation folder. the network is defib_simulation_evaluation.srn and the script is Run_Defib_Sim.sh.
These are some examples of the kind of script we run for the defib project and will probably use for the medtronic project too.
Additionally, and somewhat less urgent, there was an option to save the images of the viewscenes with the -i flag and an image name. This was really useful in running and processing large amounts of data.
Activity