# OpenCad 3D Slicer - Breast DCE MRI

**URL:** <https://discourse.slicer.org/t/opencad-3d-slicer-breast-dce-mri/5172>\
**Category:** Support\
**Tags:** segmentation, extensions-manager, breast\
**Created:** [December 22, 2018, 7:48pm UTC](https://discourse.slicer.org/t/opencad-3d-slicer-breast-dce-mri/5172 "2018-12-22T19:48:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![fitouss](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fitouss/32/17770_2.png) [@fitouss](https://discourse.slicer.org/u/fitouss)\
**Post date:** [December 22, 2018, 7:48pm UTC](https://discourse.slicer.org/t/opencad-3d-slicer-breast-dce-mri/5172/1 "2018-12-22T19:48:29Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [December 22, 2018, 8:13pm UTC](https://discourse.slicer.org/t/opencad-3d-slicer-breast-dce-mri/5172/2 "2018-12-22T20:13:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [December 23, 2018, 4:37am UTC](https://discourse.slicer.org/t/opencad-3d-slicer-breast-dce-mri/5172/3 "2018-12-23T04:37:45Z")

</div>

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](https://github.com/lassoan/Slicer-OpenCAD/blob/master/SegmentCAD/SegmentCADLogic/SegmentCADLogic.py)

---

<div class="post-metadata">

**Author:** ![fitouss](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fitouss/32/17770_2.png) [@fitouss](https://discourse.slicer.org/u/fitouss)\
**Post date:** [December 23, 2018, 7:41am UTC](https://discourse.slicer.org/t/opencad-3d-slicer-breast-dce-mri/5172/4 "2018-12-23T07:41:22Z")

</div>

Thanks for your fast answer, it’s working 👍👍👍

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [December 23, 2018, 1:01pm UTC](https://discourse.slicer.org/t/opencad-3d-slicer-breast-dce-mri/5172/5 "2018-12-23T13:01:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![fitouss](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fitouss/32/17770_2.png) [@fitouss](https://discourse.slicer.org/u/fitouss)\
**Post date:** [December 23, 2018, 2:18pm UTC](https://discourse.slicer.org/t/opencad-3d-slicer-breast-dce-mri/5172/6 "2018-12-23T14:18:06Z")

</div>

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 👍

---

<div class="post-metadata">

**Author:** ![malcolmlim](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@malcolmlim](https://discourse.slicer.org/u/malcolmlim)\
**Post date:** [March 15, 2022, 5:48am UTC](https://discourse.slicer.org/t/opencad-3d-slicer-breast-dce-mri/5172/7 "2022-03-15T05:48:46Z")

</div>

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?
