When i try to generate the “SegmentCADLabelMap”, nothing happens.
This appears in Log messages :
" Traceback (most recent call last):
File "/Applications/Slicer.app/Contents/Extensions-27618/OpenCAD/lib/Slicer-4.11/qt-scripted-modules/SegmentCAD.py", line 619, in onSegmentCADButtonClicked
self.logic.renderLabelMap()
File "/Applications/Slicer.app/Contents/Extensions-27618/OpenCAD/lib/Slicer-4.11/qt-scripted-modules/SegmentCADLogic/SegmentCADLogic.py", line 112, in renderLabelMap
SegmentCADLabelMapImageData.SetScalarTypeToShort()
AttributeError: ‘vtkCommonDataModelPython.vtkImageData’ object has no attribute ‘SetScalarTypeToShort’ "
I don’t understand the problem and i didn’t find any explanation.
I’m on Mac Os 10.11.6 and Slicer 4.11.0-2018-12-08 r27618.
To make it nicer and more easily usable with current Slicer, it should be updated to use new plot infrastructure (instead of legacy charts), segmentations (in addition to simple labelmap), and sequences (in addition to multi-volume). However, we would only do this if there is strong enough user need.
The module is useful, and important for practice i think (MRI Breast ++).
Something similar is used where i’m working currently.
I’m going to compare and see if it can be used in routine.
Hello @lassoan, i’m sorry for reviving this old post but i’m having similar issues.
I downloaded OpenCad extension and am at the final steps of “Tumor Segmentation from DCE-MRI with the SegmentCAD module training” when this log message came up:
Traceback (most recent call last):
File “C:/Users/uqmlim3/AppData/Roaming/NA-MIC/Extensions-28257/OpenCAD/lib/Slicer-4.10/qt-scripted-modules/SegmentCAD.py”, line 619, in onSegmentCADButtonClicked
self.logic.renderLabelMap()
File “C:\Users\uqmlim3\AppData\Roaming\NA-MIC\Extensions-28257\OpenCAD\lib\Slicer-4.10\qt-scripted-modules\SegmentCADLogic\SegmentCADLogic.py”, line 112, in renderLabelMap
SegmentCADLabelMapImageData.SetScalarTypeToShort()
AttributeError: ‘vtkCommonDataModelPython.vtkImageData’ object has no attribute ‘SetScalarTypeToShort’
I tried to follow your remedy, but I am not sure how to replace the ‘SegmentCADLogic.py’ with your fixed version. I tried searching for ‘SegmentCADlogic’ in Slicer 4.10.2 Folder but nothing comes up. I see other .py files but no SegmentCADlogic, as such am at the limit of my abilites. Can you enlighten on how do i go about getting this fix please?