View Issue Details

IDProjectCategoryView StatusLast Update
0004004Slicer4Core: Scripting (Wrapping, Python)public2018-03-02 11:06
Reporterhjmjohnson Assigned Tojcfr  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformMacOSMacOS Version10.10.3
Product VersionSlicer 4.4.0 
Target VersionSlicer 4.5.0-1Fixed in VersionSlicer 4.5.0-1 
Summary0004004: SimpleITK interface to slicer broke in recent nightlys
Description

Python 2.7.3 (default, Mar 10 2015, 17:47:56)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin

import sitkUtils as su
su.PullFromSlicer("MRHead")
<SimpleITK.SimpleITK.Image; proxy of <Swig Object of type 'std::vector< itk::simple::Image >::value_type *' at 0x17382fb70> >
h=su.PullFromSlicer("MRHead")
m= h > 128
su.PushLabel(m,"lbl.nii.gz")
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Users/johnsonhj/src/Slicer-03/Slicer-build/bin/Python/sitkUtils.py", line 159, in PushLabel
PushToSlicer(sitkImage, nodeName, 2, overwrite)
File "/Users/johnsonhj/src/Slicer-03/Slicer-build/bin/Python/sitkUtils.py", line 121, in PushToSlicer
newNode = CreateNewVolumeNode(NodeName,'vtkMRMLLabelMapVolumeNode', overwrite)
File "/Users/johnsonhj/src/Slicer-03/Slicer-build/bin/Python/sitkUtils.py", line 40, in CreateNewVolumeNode
checkVolumeNodeType(nodeType)
File "/Users/johnsonhj/src/Slicer-03/Slicer-build/bin/Python/sitkUtils.py", line 34, in checkVolumeNodeType
raise ValueError('Volume type %s is not valid' % volume_type )
ValueError: Volume type LabelMap is not valid

Steps To Reproduce

Load the default MR data.
Start python environment

import sitkUtils as su
h=su.PullFromSlicer("MRHead")
m= h > 128
su.PushLabel(m,"lbl.nii.gz")

TagsNo tags attached.

Activities

jcfr

jcfr

2015-06-17 09:31

administrator   ~0013130

Fixed in https://github.com/Slicer/Slicer/pull/291

@Hans: Let me know if it works as expected and I will integrate into the trunk

jcfr

jcfr

2015-06-19 13:37

administrator   ~0013140

Integrated in r24349
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;revision=24349

Related Changesets

Import 2017-06-07 23:51:09: master fd352e78

2015-06-19 17:08:00

jcfr

Details Diff
BUG: sitkUtils: Add 'LabelMap' to list of volume types supported by SimpleITK

This commit fixes support for vtkMRMLLabelMapVolumeNode added
in r24291 (ENH: Use vtkMRMLLabelMapVolumeNode class for labelmap volumes)

Fixes 0004004

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24349 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Base/Python/sitkUtils.py Diff File

Issue History

Date Modified Username Field Change
2015-06-12 19:10 hjmjohnson New Issue
2015-06-12 19:10 hjmjohnson Status new => assigned
2015-06-12 19:10 hjmjohnson Assigned To => jcfr
2015-06-17 09:31 jcfr Note Added: 0013130
2015-06-17 09:31 jcfr Status assigned => resolved
2015-06-17 09:31 jcfr Fixed in Version => Slicer 4.4.1
2015-06-17 09:31 jcfr Resolution open => fixed
2015-06-19 13:37 jcfr Note Added: 0013140
2015-09-09 08:29 jcfr Fixed in Version Slicer 4.4.1 => Slicer 4.5.0-1
2015-09-09 08:29 jcfr Target Version Slicer 4.4.1 => Slicer 4.5.0-1
2017-06-10 08:51 jcfr Changeset attached => Slicer master fd352e78
2018-03-02 11:06 jcfr Status resolved => closed