# OpenCAD segmentation issue

**URL:** <https://discourse.slicer.org/t/opencad-segmentation-issue/22585>\
**Category:** Support\
**Created:** [March 18, 2022, 2:10pm UTC](https://discourse.slicer.org/t/opencad-segmentation-issue/22585 "2022-03-18T14:10:18Z")\
**Posts on this page:** 2\
**Page:** 1

<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 18, 2022, 2:10pm UTC](https://discourse.slicer.org/t/opencad-segmentation-issue/22585/1 "2022-03-18T14:10:18Z")

</div>

Hello all,

I am having issue with OpenCad extension and occured during the the final steps of “Tumor Segmentation from DCE-MRI" tutorial

After designating the sample volumes (Pre, 1st-4th timepoints after DCE), I clicked Apply SegmentCAD and 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 the remedy in a similar post, but being very new I am not sure how to go about replacing the ‘SegmentCADLogic.py’ with the fixed version. I tried searching the file ‘SegmentCADlogic’ in Slicer 4.10.2 Folder but nothing comes up. I can see other .py files but no SegmentCADlogic, as such am at the limit of my capabilities. Can anyone enlighten on how do i go about getting this fix please?

Slicer version: 4.10.1  
Extension i’m facing issues: OpenCAD (Published on Wed Jun 02 2021) [Documentation/4.3/Extensions/OpenCAD - Slicer Wiki](https://www.slicer.org/w/index.php/Documentation/4.3/Extensions/OpenCAD)  
System: Windows PC

---

<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:** [March 18, 2022, 7:54pm UTC](https://discourse.slicer.org/t/opencad-segmentation-issue/22585/2 "2022-03-18T19:54:37Z")

</div>

This is a pretty old extension written for Slicer 4.3 and I don’t know if it ever worked with 4.10.2. You might get what you need by using SlicerRadiomics in 4.11.
