[slicer-users] Loading MRML Nodes and pass to an add on python modules that uses slicer from cmd line

Steve Pieper pieper at bwh.harvard.edu
Thu Jun 17 11:41:02 EDT 2010

Hi Deepika -

There is are --execpython (runs command after gui starts) and 
--evalpython (runs command instead of starting gui) command line 
arguments but I've never tried to use them to run a module.  It may not 
be ideal but it's worth trying.

In theory there would be a way to essentially 'import slicer' and get 
all the needed commands in the interpreter so you could run the module. 
  But this hasn't ever been set up, I don't think.

Demian has similar goals, so he may have some suggestions.


On Jun/17/10 11:21 AM, mahaling at email.unc.edu wrote:
> Hi Steve,
> I am Deepika, a student of Martin Styner's at UNC. I have a python
> module that can be added to Slicer(i.e. not in-built in Slicer) and uses
> MRML nodes(DWI volumes and labelmaps) loaded into Slicer as input. I'd
> like to know if there is a way I can do the loading and execution of the
> module from command line (without having to open Slicer explicitly) and
> if so how.I don't want to modify the existing code but can write a
> wrapper if needed.
> I have posted this on the Slicer users and developers mailing lists too,
> so sorry if I am flooding your inbox.
> Thanks,
> Deepika

More information about the slicer-users mailing list