View Issue Details

IDProjectCategoryView StatusLast Update
0002352Slicer4Core: Scripting (Wrapping, Python)public2014-10-08 07:10
ReporterpieperAssigned Tojcfr 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status acknowledgedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0002352: Include more python packages in standard install

Several very useful modules could be added if we had a better baseline of python functionality.

With some additional python modules included in the slicer core package, we could access other packages as optional installs.

Suggested core modules:
distutils, pip
updated numpy
scipy (or parts of scipy)
PIP (or Pillow)

Tools that could be used if these were included in slicer python:

NiPy: - in particular nipype and nibable have often been requested (nipype would also give a bridge to fsl and spm).

iPython: - would be an improved developer interface, plus it could support parallel processing and web notebooks

pydicom: - for efficient processing of dicom files (read/write)

Some design work and analysis is required to see what is feasible on different platforms. Note that freely available binaries are already available for windows, many of which could be bundled with slicer or downloaded on-demand at runtime.

TagsNo tags attached.


related to 0001718 closedjcfr SSL / HTTPS Issues with Python Interactor and QT - Windows 7 
related to 0003100 closedjcfr cannot install extra python library 
related to 0003158 closedjcfr Building Slicer with numpy-1.4.1 failed using VS2010 
related to 0002637 acknowledgedjcfr Include all Python header files with nightly binary build 




2012-07-25 11:17

administrator   ~0005235

Some emails describing one set of use cases that require this feature.

---------- Forwarded message ----------
From: Johnson, Hans J <>
Date: Wed, Jul 25, 2012 at 10:26 AM
Subject: Re: Plans for final year NAC
To: "" <>
Cc: "" <>, Daniel Rubin <>, Jim Miller <>, Andriy Fedorov <>, Stephen Aylward <>, Dominik Meier <>, Tiffany Ting Liu <>, "" <>

From my (very biased) point of view, there is a cascade of updates that
need to fall into place before this can really happen well.

1) Add SimpleITK (i.e. Move to ITKv4)
2) Improve Python build support (Don't strip so much of the core python
functionality when installing python)
3) Modernize NumPy version build support
4) Add back SciPy version build support
5) get easy_install (or pip) install working for Slicer install trees


Hans J. Johnson, Ph.D.
Assistant Professor of Psychiatry
University of Iowa Carver College of Medicine
W278 GH, 200 Hawkins Drive

Iowa City, Iowa 52242
Phone: 319-353-8587

-----Original Message-----
From: Steve Pieper <>
Reply-To: "" <>
Date: Wednesday, July 25, 2012 8:49 AM
To: Hans Johnson <>
Cc: Ron Kikinis <>, Daniel Rubin
<>, Jim Miller <>, Andriy Fedorov
<>, Stephen Aylward <>,
Dominik Meier <>, Tiffany Ting Liu
<>, ""
Subject: Re: Plans for final year NAC

I'm with Hans - I think nipype has a great potential to unify the
interfaces. I think we were pretty close last time I looked (January
project week).


On Wed, Jul 25, 2012 at 9:43 AM, Johnson, Hans J <>

At one point I was hoping that nipype could act as the simple interface
many of these external tools in slicer. Most of the work for wrapping
(and afni, and spm, and ...) has already been done very cleanly in
We would then just have to provide python based interface wrapping for
the command line arguments.

That was my hope.


Hans J. Johnson, Ph.D.
Assistant Professor of Psychiatry
University of Iowa Carver College of Medicine
W278 GH, 200 Hawkins Drive

Iowa City, Iowa 52242
Phone: 319-353-8587

-----Original Message-----
From: Ron Kikinis <>
Reply-To: Ron Kikinis <>
Date: Wednesday, July 25, 2012 8:34 AM
To: Daniel Rubin <>
Cc: 'Jim Miller' <>, 'Andriy Fedorov'
<>, 'Steve Pieper' <>,
'Stephen Aylward' <>, Hans Johnson
<>, 'Dominik Meier' <>,
Ting Liu <>, ""
Subject: Re: Plans for final year NAC

Also, have you tried grow cut?


On 7/25/12 9:27 AM, Daniel Rubin wrote:

Hi Tiffany and William,

What specific FSL modules are you using, and with what parameters? I've
been in contact with the Slicer people about your requests and they
like to know this.


Daniel L. Rubin, MD, MS
Assistant Professor of Radiology and Medicine (Biomedical Informatics)
Department of Radiology | Stanford University
Richard M. Lucas Center | 1201 Welch Road, Office P285
Stanford, CA 94305-5488
Phone: 650-723-9495 | Fax: 650-723-5795

-----Original Message-----
From: Ron Kikinis []
Sent: Tuesday, July 24, 2012 8:09 PM
To: Daniel Rubin
Cc: Jim Miller; Andriy Fedorov; Steve Pieper; Stephen Aylward; Hans
Dominik Meier
Subject: Re: Plans for final year NAC


I am forwarding your suggestions to different people and hopefully, we
hear back.

-The problem with FSL is the license, which is not compatible with the
license. I am not opposed to having such a plug-in, but will not spend
namic resources on it.
-What specific FSL modules are your people using, and with what
parameters? Hans and Dominik might be able to recommend equivalent
settings for the brains tools that we use in slicer.
-DCE: It has been in the works for a while (Jim Miller), and I am told
imminent. At latest, it will be available at RSNA, I am told.


On 7/24/12 10:02 PM, Daniel Rubin wrote:

Hi Ron,

I spoke with my students who are using Slicer on their current
projects and I have this feedback that may be helpful to you.

They are doing a lot of brain tumor segmentation and DCE-MRI analysis.
They had the following specific feedback:

1)Current scalp exclusion methods are lacking/missing from Slicer, and
registration to atlases is not as good as in FSL. Thus they would
really like an FSL plugin in slicer to let them integrate that
functionality into Slicer

2)They would like if someone would implement DCE-MRI analysis in
That way they could do lesion segmentation and then DCE-MRI analysis
in Slicer. We have an implementation of DCE-MRI analysis in matlab and
Tom Yankeelov at Vanderbilt has one in IDL. I think Greg Sorenson has
an old one in C, but I was never able to get him to share it.

These might be some ways to improve slicer to enable our work, and if
you pursue any of this we'd be happy to give feedback.





2012-08-15 06:04

developer   ~0005555

I think that Nipype will be a great addition. I'm all for this and chipping in



2012-08-16 08:28


PyXNAT (and its dependencies) would be awesome. The dependencies are as follows:

lxml v1.3.6+
httplib2 v0.6+

Package site:




2012-08-16 11:22

administrator   ~0005560



2012-08-27 05:30

administrator   ~0005794

SSL should also be added to the standard python build if possible:

Kumar, Sunil via
12:09 PM (21 hours ago)

to slicer-devel

My question pertains specifically to OSX 10.8 64-bit.

I've tried several different approaches to get SSL to build with Python (via a Slicer build). I can't get any to work. They are as follows:

1) SSL is not found in the default Slicer build. (I get errors when typing "import ssl" in the Python command prompt.)

2) If I try to "make" Slicer's Python alone, the SSL directories are incorrect and Python builds without it.

3) When I direct "Slicer4-superbuild/python/Modules/Setup" and "Slicer4-superbuild/python/" to the native install of SSL, I get architecture errors when I build Python.

4) When I direct "Slicer4-superbuild/python/Modules/Setup" and "Slicer4-superbuild/python/" to a 64-bit build of OpenSSL, I also get architecture errors when I build Python.

Would you know of a way to get around this? Any suggestions are appreciated.




2013-03-08 07:44

developer   ~0008097

Is there a suggested workaround how to compile Slicer with OpenSSL enabled?



2013-03-08 10:05

administrator   ~0008098

Will keep you posted of the progress soon. Thanks. Jc



2013-03-08 12:14

administrator   ~0008099

I'd also like to add pyMC and pyZMQ to my wish list of python packages.



2013-05-03 05:05

administrator   ~0008558

it seems that Lauren would need it in addition to numpy

On 5/2/13 2:05 PM, Steve Pieper wrote:
Hi Ron -

Nothing has changed yet except that the package is now based on python
2.7.3 rather than 2.6. But now that this is working, Jc envisions
simplifying the process of bringing new python packages into the slicer

Here's the bug report:

we can add joblib to the list.


On Thu, May 2, 2013 at 9:32 AM, Ron Kikinis <
<>> wrote:

how about joblib?

On 5/2/13 9:29 AM, Ron Kikinis wrote:


    Now that python has been cmake-ified for Slicer, which python
    are currently available in the Slicer ecosystem?

    numpy, scipy, ? What else?



2013-05-23 12:56

developer   ~0008670

Last edited: 2013-05-23 13:00

I agree that a way to fork multiple python processes such as done by the package joblib, would be useful. This is impossible from the current Slicer python interpreter. Alternatively, a tutorial/examples on how best to do multiprocessing in python-slicer would be helpful.

Other packages I am using are within scipy. These include scipy.optimize, scipy.cluster, scipy.stats



2013-10-03 13:07

developer   ~0010128

Is there a good reason for not just adding pydicom into Slicer superbuild? It is a small package, and the capability to access DICOM is pretty much essential for Slicer tasks, but not possible from python!

I understand I can install pydicom, but on some systems I am unable to build Slicer, since they don't have a GUI head and X related libraries -- so I cannot use Slicer in batch mode for DICOM related tasks in my scripts. I am also unable to compile Slicer on the machines of my clinical users.

DICOM support is such a basic and essential functionality that I do not see why we can't just integrate it.



2013-10-04 00:41

administrator   ~0010129

+1 for integrating pydicom in the superbuild.



2013-10-04 12:26

developer   ~0010135

@jc: can you give some hints what should be done to include this package into the superbuild? It does not have any dependencies.



2014-10-08 07:10

developer   ~0012609

for the reference, pydicom has been integrated a while ago

Issue History

Date Modified Username Field Change
2012-07-25 11:15 pieper New Issue
2012-07-25 11:15 pieper Status new => assigned
2012-07-25 11:15 pieper Assigned To => jcfr
2012-07-25 11:17 pieper Note Added: 0005235
2012-07-25 11:24 jcfr Target Version => Slicer 4.3.0
2012-08-15 06:04 demian Note Added: 0005555
2012-08-16 08:28 user349 Note Added: 0005559
2012-08-16 11:22 pieper Note Added: 0005560
2012-08-16 11:27 pieper Target Version Slicer 4.3.0 => Slicer 4.2.0 - October 1st 2012
2012-08-20 10:36 jcfr Target Version Slicer 4.2.0 - Feature freeze Sept 1st 2012 => Slicer 4.2.5
2012-08-21 09:40 jcfr Target Version Slicer 4.2.5 => Slicer 4.3.0
2012-08-27 05:29 pieper Relationship added related to 0001718
2012-08-27 05:30 pieper Note Added: 0005794
2013-03-08 07:44 fedorov Note Added: 0008097
2013-03-08 10:05 jcfr Note Added: 0008098
2013-03-08 12:14 pieper Note Added: 0008099
2013-05-03 03:24 pieper Relationship added related to 0003100
2013-05-03 05:05 pieper Note Added: 0008558
2013-05-23 12:56 lauren Note Added: 0008670
2013-05-23 12:59 lauren Note Edited: 0008670
2013-05-23 13:00 lauren Note Edited: 0008670
2013-06-13 13:43 pieper Relationship added related to 0003158
2013-08-30 12:48 jcfr Target Version Slicer 4.3.0 => Slicer 4.3.1
2013-09-12 11:04 jcfr Target Version Slicer 4.3.1 => Slicer 4.3.2
2013-10-03 13:07 fedorov Note Added: 0010128
2013-10-04 00:41 pieper Note Added: 0010129
2013-10-04 12:26 fedorov Note Added: 0010135
2014-03-06 10:15 nicole Target Version Slicer 4.3.2 => Slicer 4.4.0
2014-05-12 23:57 jcfr Status assigned => acknowledged
2014-05-12 23:57 jcfr Target Version Slicer 4.4.0 =>
2014-05-13 00:35 jcfr Relationship added related to 0002637
2014-10-08 07:10 fedorov Note Added: 0012609