For some reason the LabelMapOverlay doesn’t work on my label map created from the ChangeLabel filter. I also tried running it directly on the output of ConnectedComponent() with the same result.
What is the problem? how do I diagnose the problem ?
319 filtim=sitk.ChangeLabel(sizeim,dict(roundlist))
…
326 print filtim
327 coloursize=sitk.LabelMapOverlay(filtim,ushortim)
Here’s the error output
Traceback (most recent call last):
File “./simple_find_biggest_sitk_in.py”, line 327, in
coloursize=sitk.LabelMapOverlay(filtim,ushortim)
File “/home/kny48981/.local/lib/python2.7/site-packages/SimpleITK/SimpleITK.py”, line 41588, in LabelMapOverlay
return _SimpleITK.LabelMapOverlay(*args, **kwargs)
RuntimeError: Exception thrown in SimpleITK LabelMapOverlay: /tmp/SimpleITK/Code/Common/include/sitkDualMemberFunctionFactory.hxx:201:
sitk::ERROR: Pixel type: 32-bit unsigned integer is not supported in 3D byN3itk6simple26LabelMapOverlayImageFilterE
Heres the object print-out of filtim from line 326
Image (0x7f3801db1da0)
RTTI typeinfo: itk::Image<unsigned int, 3u>
Reference Count: 1
Modified Time: 39409
Debug: Off
Object Name:
Observers:
none
Source: (none)
Source output name: (none)
Release Data: Off
Data Released: False
Global Release Data: Off
PipelineMTime: 39401
UpdateMTime: 39408
RealTimeStamp: 0 seconds
LargestPossibleRegion:
Dimension: 3
Index: [0, 0, 0]
Size: [58, 53, 204]
BufferedRegion:
Dimension: 3
Index: [0, 0, 0]
Size: [58, 53, 204]
RequestedRegion:
Dimension: 3
Index: [0, 0, 0]
Size: [58, 53, 204]
Spacing: [1, 1, 1]
Origin: [0, 0, 0]
Direction:
1 0 0
0 1 0
0 0 1
IndexToPointMatrix:
1 0 0
0 1 0
0 0 1
PointToIndexMatrix:
1 0 0
0 1 0
0 0 1
Inverse Direction:
1 0 0
0 1 0
0 0 1
PixelContainer:
ImportImageContainer (0x7f38023aca80)
RTTI typeinfo: itk::ImportImageContainer<unsigned long, unsigned int>
Reference Count: 1
Modified Time: 39406
Debug: Off
Object Name:
Observers:
none
Pointer: 0x7f38043ace00
Container manages memory: true
Size: 627096
Capacity: 627096