AttributeError: 'vtkSlicerMarkupsModuleMRMLPython.vtkMRMLMarkupsROI' object has no attribute 'SetAndObserveObjectToNodeMatrix'

I was trying to create a bounding box as shown in the documentation Script repository — 3D Slicer documentation. But I keep running into the error
AttributeError: ‘vtkSlicerMarkupsModuleMRMLPython.vtkMRMLMarkupsROI’ object has no attribute ‘SetAndObserveObjectToNodeMatrix’
Using Slicer 4.11.202210226

This is a new API. I would recommend to use the current Slicer Stable Release or Slicer Preview Release. If you are forced to use an older Slicer version then make sure you use examples from the corresponding documentation version (you can select the documentation version in ReadTheDocs in the lower-left corner).

Thank you for the quick response. Appreciate it. Could you link me to the page with the appropriate documentation? When I follow the link in the bottom left corner it says page not found. Thank You again.

Slicer readthedocs only contains the Script Repository page for version 5.0 and newer. I would suggest that you upgrade from 4.11.20210226 to Slicer 5.2.1 which you can get at https://download.slicer.org/.

The last version of the Script Repository on the old Slicer wiki can be found at:

https://www.slicer.org/w/index.php?title=Documentation/Nightly/ScriptRepository&oldid=63561

1 Like