OpenCad 3D Slicer - Breast DCE MRI

Hello,

I’m new with 3D slicer.

I have a problem on SegmentCad on 3d Slicer with the last step of the tutorial https://www.slicer.org/w/images/d/d2/SegmentCADTutorial.pptx (page 20)

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.

Thanks for your returns.

Alex

@jayender may be able to help - it looks like this module hasn’t been ported to the latest VTK.

I’ve submitted a pull request with the fix.

Until the fix gets integrated (it may take a couple of days), you can replace your SegmentCADLogic.py file by this updated version: https://github.com/lassoan/Slicer-OpenCAD/blob/master/SegmentCAD/SegmentCADLogic/SegmentCADLogic.py

1 Like

Thanks for your fast answer, it’s working :+1::+1::+1:

Let us know if you find the module useful.

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.

Thanks a lot :+1:

1 Like

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?