{"action":"created","issue":{"url":"https://api.github.com/repos/SCIInstitute/SCIRun/issues/1184","repository_url":"https://api.github.com/repos/SCIInstitute/SCIRun","labels_url":"https://api.github.com/repos/SCIInstitute/SCIRun/issues/1184/labels{/name}","comments_url":"https://api.github.com/repos/SCIInstitute/SCIRun/issues/1184/comments","events_url":"https://api.github.com/repos/SCIInstitute/SCIRun/issues/1184/events","html_url":"https://github.com/SCIInstitute/SCIRun/issues/1184","id":103804311,"number":1184,"title":"command line scripting","user":{"login":"jessdtate","id":3484631,"avatar_url":"https://avatars.githubusercontent.com/u/3484631?v=3","gravatar_id":"","url":"https://api.github.com/users/jessdtate","html_url":"https://github.com/jessdtate","followers_url":"https://api.github.com/users/jessdtate/followers","following_url":"https://api.github.com/users/jessdtate/following{/other_user}","gists_url":"https://api.github.com/users/jessdtate/gists{/gist_id}","starred_url":"https://api.github.com/users/jessdtate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jessdtate/subscriptions","organizations_url":"https://api.github.com/users/jessdtate/orgs","repos_url":"https://api.github.com/users/jessdtate/repos","events_url":"https://api.github.com/users/jessdtate/events{/privacy}","received_events_url":"https://api.github.com/users/jessdtate/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SCIInstitute/SCIRun/labels/Defib%20Project","name":"Defib Project","color":"fef2c0"},{"url":"https://api.github.com/repos/SCIInstitute/SCIRun/labels/Framework","name":"Framework","color":"e102d8"},{"url":"https://api.github.com/repos/SCIInstitute/SCIRun/labels/Headless","name":"Headless","color":"f7c6c7"},{"url":"https://api.github.com/repos/SCIInstitute/SCIRun/labels/Medtronic%20Project","name":"Medtronic Project","color":"fad8c7"}],"state":"open","locked":false,"assignee":{"login":"jessdtate","id":3484631,"avatar_url":"https://avatars.githubusercontent.com/u/3484631?v=3","gravatar_id":"","url":"https://api.github.com/users/jessdtate","html_url":"https://github.com/jessdtate","followers_url":"https://api.github.com/users/jessdtate/followers","following_url":"https://api.github.com/users/jessdtate/following{/other_user}","gists_url":"https://api.github.com/users/jessdtate/gists{/gist_id}","starred_url":"https://api.github.com/users/jessdtate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jessdtate/subscriptions","organizations_url":"https://api.github.com/users/jessdtate/orgs","repos_url":"https://api.github.com/users/jessdtate/repos","events_url":"https://api.github.com/users/jessdtate/events{/privacy}","received_events_url":"https://api.github.com/users/jessdtate/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/SCIInstitute/SCIRun/milestones/37","html_url":"https://github.com/SCIInstitute/SCIRun/milestones/2016-Q2","labels_url":"https://api.github.com/repos/SCIInstitute/SCIRun/milestones/37/labels","id":1369682,"number":37,"title":"2016-Q2","description":"","creator":{"login":"aylakhan","id":1399377,"avatar_url":"https://avatars.githubusercontent.com/u/1399377?v=3","gravatar_id":"","url":"https://api.github.com/users/aylakhan","html_url":"https://github.com/aylakhan","followers_url":"https://api.github.com/users/aylakhan/followers","following_url":"https://api.github.com/users/aylakhan/following{/other_user}","gists_url":"https://api.github.com/users/aylakhan/gists{/gist_id}","starred_url":"https://api.github.com/users/aylakhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aylakhan/subscriptions","organizations_url":"https://api.github.com/users/aylakhan/orgs","repos_url":"https://api.github.com/users/aylakhan/repos","events_url":"https://api.github.com/users/aylakhan/events{/privacy}","received_events_url":"https://api.github.com/users/aylakhan/received_events","type":"User","site_admin":false},"open_issues":91,"closed_issues":0,"state":"open","created_at":"2015-10-22T05:29:45Z","updated_at":"2016-03-09T22:31:24Z","due_on":"2016-06-30T06:00:00Z","closed_at":null},"comments":2,"created_at":"2015-08-28T22:14:55Z","updated_at":"2016-03-10T17:50:01Z","closed_at":null,"body":"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)\r\n\r\nThe 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:\r\nscirun -E networkname +VARNAME=filepathandname.  \r\nEither method can read the filename either way.  \r\n\r\nstring manipulation (especially splitfilename,printstringintostring,GetStringFromBundle) are needed to make this useful.  \r\n\r\nsome examples are:\r\nnetwork:\r\n/usr/sci/projects/cibc/validate_defib/kid_defib/SCIRun_Nets/Script_FEM/Script-FE-External-refine-3cm-100x100x150-all-cases-permut-matrix-ventricles.srn\r\nscript:\r\n/usr/sci/projects/cibc/validate_defib/kid_defib/scripts_jess/run_list_external.sh\r\nusage: ./run_list_external.sh ../External_Defib/\r\n\r\nnetwork:\r\n/usr/sci/projects/cibc/validate_defib/kid_defib/Clinical-Conductivity/SCIRun_Nets/desampexpress.srn\r\nscript:\r\n/usr/sci/projects/cibc/validate_defib/kid_defib/Clinical-Conductivity/SCIRun_Scripts/desampexp\r\nusage: \r\n./desampexp ../../Results/LeadPlacement/jess-Experiments_perturbed-01-Nov-12/\r\n\r\nA 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.\r\n\r\nThese are some examples of the kind of script we run for the defib project and will probably use for the medtronic project too. \r\n\r\nAdditionally, 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.  \r\n"},"comment":{"url":"https://api.github.com/repos/SCIInstitute/SCIRun/issues/comments/194974905","html_url":"https://github.com/SCIInstitute/SCIRun/issues/1184#issuecomment-194974905","issue_url":"https://api.github.com/repos/SCIInstitute/SCIRun/issues/1184","id":194974905,"user":{"login":"jessdtate","id":3484631,"avatar_url":"https://avatars.githubusercontent.com/u/3484631?v=3","gravatar_id":"","url":"https://api.github.com/users/jessdtate","html_url":"https://github.com/jessdtate","followers_url":"https://api.github.com/users/jessdtate/followers","following_url":"https://api.github.com/users/jessdtate/following{/other_user}","gists_url":"https://api.github.com/users/jessdtate/gists{/gist_id}","starred_url":"https://api.github.com/users/jessdtate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jessdtate/subscriptions","organizations_url":"https://api.github.com/users/jessdtate/orgs","repos_url":"https://api.github.com/users/jessdtate/repos","events_url":"https://api.github.com/users/jessdtate/events{/privacy}","received_events_url":"https://api.github.com/users/jessdtate/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T17:50:01Z","updated_at":"2016-03-10T17:50:01Z","body":"For examples in SCIRun 4, I put some above.  There is a SCIRun5 example in the SCIRun-Exchange/Defibrillation_Evaluation/.  defib_simulation_evaluation.srn5 and Run_Defib_Sim_sr5.sh are the scirun 5 versions.  it currently crashes, but it gives the idea.\r\n"}}