View Issue Details

IDProjectCategoryView StatusLast Update
0001594Slicer4Core: Usabilitypublic2012-07-30 08:52
Reporterjmk1 Assigned Tocrmullin  
PriorityurgentSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.2.0Fixed in VersionSlicer 4.2.0 
Summary0001594: specifying scene or data to load on the command line
Description

In slicer3, it was very handy to be able to specify a scene or data to be loaded from the command line (Like this: Slicer3 myfavoritescene.mrml). So far this hasn't worked for me with Slicer 4. Is there a command line flag for this, or some other option to do this? I checked the help (Slicer --help) but didn't see anything.

Additional Information

I'm running Slicer-4.0.gamma-11-27, Centos 5.5 64-bit.

TagsNo tags attached.

Relationships

duplicate of 0001502 closedcrmullin Load images from command line no longer works 
duplicate of 0001479 closedcrmullin Slicer command line argument to preload files and scenes 
related to 0002363 closedjcfr Add support for loading directory from command line 
related to 0002364 closedjcfr Refine how "fiber bundles" are loaded from command line 

Activities

jcfr

jcfr

2012-02-23 09:57

administrator   ~0003705

Waiting this is implemented, you could do the following:

./Slicer --python-code "loadScene('/path/to/scene.mrml')"

You could also look at the available python API:
See https://github.com/Slicer/Slicer/blob/master/Base/Python/slicer/util.py#L136

nicole

nicole

2012-05-09 08:31

administrator   ~0004229

Resetting to feature request, and noting that I really want this as well (mostly because my RSI is acting up and cmd line tab complete to load a scene is easier than mousing to File->Load Scene, select file, open).

nicole

nicole

2012-05-09 09:32

administrator   ~0004239

For the scene files loading in from the command line, I'd like to request that they get loaded via Commit rather than Import (so direct load rather than adding them to the File Add Data dialog).
For data files, adding them to the Add Data dialog is fine, since the user will possibly wish to adjust names and other options.

crmullin

crmullin

2012-07-19 10:13

developer   ~0005203

Here is an initial commit that works in simple cases.

https://github.com/chrismullins/Slicer/commit/bfd9b3834872a24b47acf0810bf5630dd93f4e9c

Ideas: What if I want more than one file loaded? Perhaps something like ./Slicer /path/to/fileA.vtk /path/to/fileB.vtk should be implemented.
What if I want an entire directory to be loaded? Perhaps it should get a particular tag like ./Slicer --load-directory /path/to/DataDirectory

crmullin

crmullin

2012-07-22 11:39

developer   ~0005214

Now multiple files can be specified, and they will all be loaded if they exist.

https://github.com/chrismullins/Slicer/commit/8ad6ff4ba988263815f7fd38f10546e55985b16b

jcfr

jcfr

2012-07-26 05:51

administrator   ~0005251

Fixed in r20699
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=20699

jcfr

jcfr

2012-07-27 15:36

administrator   ~0005328

Dear issue reporter,

Good news :) Slicer developers SOLVED the problem you reported - YOU now need to VERIFY and CLOSE this issue.

Issue History

Date Modified Username Field Change
2011-11-29 09:47 jmk1 New Issue
2011-11-30 11:32 fedorov Relationship added duplicate of 0001502
2012-02-23 09:40 finetjul Status new => assigned
2012-02-23 09:40 finetjul Assigned To => jcfr
2012-02-23 09:57 jcfr Note Added: 0003705
2012-05-09 08:31 nicole Note Added: 0004229
2012-05-09 08:31 nicole Severity minor => feature
2012-05-09 08:31 nicole Target Version => Slicer 4.x AHM Summer 2012
2012-05-09 09:06 jcfr Assigned To jcfr => crmullin
2012-05-09 09:32 nicole Note Added: 0004239
2012-07-05 10:16 jcfr Priority normal => urgent
2012-07-19 10:13 crmullin Note Added: 0005203
2012-07-22 11:39 crmullin Note Added: 0005214
2012-07-26 05:51 jcfr Note Added: 0005251
2012-07-26 05:51 jcfr Status assigned => resolved
2012-07-26 05:51 jcfr Fixed in Version => Slicer 4.2.0 - October 1st 2012
2012-07-26 05:51 jcfr Resolution open => fixed
2012-07-27 09:23 jcfr Relationship added related to 0002363
2012-07-27 09:24 jcfr Relationship added related to 0002364
2012-07-27 15:36 jcfr Note Added: 0005328
2012-07-30 08:52 jmk1 Status resolved => closed
2013-08-09 04:22 finetjul Relationship added duplicate of 0001479