# AttributeError: 'vtkSlicerMarkupsModuleMRMLPython.vtkMRMLMarkupsClo' object has no attribute 'GetImageData'

**URL:** <https://discourse.slicer.org/t/attributeerror-vtkslicermarkupsmodulemrmlpython-vtkmrmlmarkupsclo-object-has-no-attribute-getimagedata/43890>\
**Category:** Development\
**Created:** [July 29, 2025, 5:37pm UTC](https://discourse.slicer.org/t/attributeerror-vtkslicermarkupsmodulemrmlpython-vtkmrmlmarkupsclo-object-has-no-attribute-getimagedata/43890 "2025-07-29T17:37:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gruoss](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gruoss/32/78664_2.png) [@Gruoss](https://discourse.slicer.org/u/Gruoss)\
**Post date:** [July 29, 2025, 5:37pm UTC](https://discourse.slicer.org/t/attributeerror-vtkslicermarkupsmodulemrmlpython-vtkmrmlmarkupsclo-object-has-no-attribute-getimagedata/43890/1 "2025-07-29T17:37:55Z")

</div>

Hi, I’m new to Slicer (version 5.8.1 on Windows 11 Pro) and would like to calculate radiomics features from native 2D DICOM images. I’m trying this code in the Python-Slicer terminal:

_import slicer  
import numpy as np  
import SimpleITK as sitk  
from radiomics import featureextractor  
def calculate\_2d\_radiomics(image\_node, segmentation\_node, label\_value=1, force\_2d=True, force\_2d\_dimension=0):  
extractor = featureextractor.RadiomicsFeatureExtractor()  
extractor.settings[‘label’] = label\_value  
extractor.settings[‘force2D’] = force\_2d  
extractor.settings[‘force2Ddimension’] = force\_2d\_dimension  
image\_sitk = sitk.GetImageFromArray(slicer.util.arrayFromVolume(image\_node))  
segmentation\_sitk = sitk.GetImageFromArray(slicer.util.arrayFromVolume(segmentation\_node))_

_segmentation\_sitk = sitk.Cast(segmentation\_sitk, sitk.sitkUInt8)  
try:  
results = extractor.execute(image\_sitk, segmentation\_sitk)  
return results  
except Exception as e:  
print(f"Error during feature extraction: {e}“)  
return None_

_image\_node = slicer.util.getNode(“DCM\_IMG”)  
segmentation\_node = slicer.util.getNode(“SEG\_IMG”)_

_if image\_node and segmentation\_node:  
radiomics\_results = calculate\_2d\_radiomics(image\_node, segmentation\_node, label\_value=1, force\_2d=True, force\_2d\_dimension=0)  
if radiomics\_results:  
for key, value in radiomics\_results.items():  
if key.startswith(‘original’):  
print(f”{key}: {value}")  
else:  
print(“Error: Please load an image and segmentation with specified names.”)_

I’m getting this error:

_AttributeError: ‘vtkSlicerMarkupsModuleMRMLPython.vtkMRMLMarkupsClo’ object has no attribute ‘GetImageData’_

I’ve also tried different ROI segmentations: “closed curve,” “ROI,” etc.

Do you have some suggestions?  
Thanks in advance for your help.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [July 31, 2025, 12:28pm UTC](https://discourse.slicer.org/t/attributeerror-vtkslicermarkupsmodulemrmlpython-vtkmrmlmarkupsclo-object-has-no-attribute-getimagedata/43890/2 "2025-07-31T12:28:01Z")

</div>

What is happening is that your code is trying to call `GetImageData` on a node type that is not an image (a closed curve markups node).

You need to make sure you’re using the proper data types for your calculation. I’d suggest that you read on [segmentations in Slicer](https://slicer.readthedocs.io/en/latest/user_guide/image_segmentation.html) a bit, because from your last sentence it seems that you are confusing various node types with segmentations.

Also next time please format the code you paste as code, because it is very hard to read Python code without indentation. Thanks!

---

<div class="post-metadata">

**Author:** ![Gruoss](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gruoss/32/78664_2.png) [@Gruoss](https://discourse.slicer.org/u/Gruoss)\
**Post date:** [August 1, 2025, 9:20am UTC](https://discourse.slicer.org/t/attributeerror-vtkslicermarkupsmodulemrmlpython-vtkmrmlmarkupsclo-object-has-no-attribute-getimagedata/43890/3 "2025-08-01T09:20:25Z")

</div>

Sorry, maybe I didn’t express myself clearly. I tried both the Segmentation and ROI tools. In the meantime, I’ve solved the problem. I get radiomic features from a 2D image (for example, just an MRI slide) but not from native 2D scintigraphy scans. The error is this:

_ValueError: Image/Mask geometry mismatch. Potential fix: increase tolerance using geometryTolerance, see Documentation:Usage:Customizing the Extraction:Settings:geometryTolerance for more information_

I read that this problem could be solved with “correctMask: True”, but it doesn’t work for me.

Do you have any suggestions? Thanks a lot!

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [August 5, 2025, 11:32am UTC](https://discourse.slicer.org/t/attributeerror-vtkslicermarkupsmodulemrmlpython-vtkmrmlmarkupsclo-object-has-no-attribute-getimagedata/43890/4 "2025-08-05T11:32:10Z")

</div>

This is a completely different problem, and not even in Slicer core, so please open a new topic for it.

Also please describe the solution you found for the original issue, so that others have the opportunity to learn from it.

Thank you!
