Slicer 5.3 Preview warnings and error messages

Testing the Lung CT Segmenter on Slicer 5.3 Preview (5.3.0-2022-11-25 r31426 / 0e36f10)
I get all kinds of errors and warnings and the extension is practically unusable overnight.

My question is: How should we handle these errors and messages, many of them QT / VTK related? Should we work on this at all?

Manual lung segmentation (creating segmentation in the end):

Python 3.9.10 (main, Nov 25 2022, 23:30:04) [MSC v.1930 64 bit (AMD64)] on win32
>>> 
[Qt] QLayout::addChildLayout: layout "" already has a parent
[Qt] ctkSliderWidget::setSingleStep()  0 is out of bounds. 0 1000 1
[Qt] qMRMLSegmentEditorWidget::setMasterVolumeNode is deprecated, use setSourceVolumeNode method instead.
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Segmentations\MRML\vtkMRMLSegmentEditorNode.h, line 175
[VTK] vtkMRMLSegmentEditorNode (000001E79EDC4EF0): vtkMRMLSegmentEditorNode::SetMasterVolumeIntensityMaskRange() method is deprecated, use SetSourceVolumeIntensityMaskRange method instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\Logic\vtkSlicerMarkupsLogic.h, line 355
[VTK] vtkSlicerMarkupsLogic (000001E78A8EF920): vtkSlicerMarkupsLogic::SetAllMarkupsLocked method is deprecated, please use SetAllControlPointsLocked instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\Logic\vtkSlicerMarkupsLogic.h, line 355
[VTK] vtkSlicerMarkupsLogic (000001E78A8EF920): vtkSlicerMarkupsLogic::SetAllMarkupsLocked method is deprecated, please use SetAllControlPointsLocked instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\Logic\vtkSlicerMarkupsLogic.h, line 355
[VTK] vtkSlicerMarkupsLogic (000001E78A8EF920): vtkSlicerMarkupsLogic::SetAllMarkupsLocked method is deprecated, please use SetAllControlPointsLocked instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\Logic\vtkSlicerMarkupsLogic.h, line 355
[VTK] vtkSlicerMarkupsLogic (000001E78A8EF920): vtkSlicerMarkupsLogic::SetAllMarkupsLocked method is deprecated, please use SetAllControlPointsLocked instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\Logic\vtkSlicerMarkupsLogic.h, line 355
[VTK] vtkSlicerMarkupsLogic (000001E78A8EF920): vtkSlicerMarkupsLogic::SetAllMarkupsLocked method is deprecated, please use SetAllControlPointsLocked instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\Logic\vtkSlicerMarkupsLogic.h, line 355
[VTK] vtkSlicerMarkupsLogic (000001E78A8EF920): vtkSlicerMarkupsLogic::SetAllMarkupsLocked method is deprecated, please use SetAllControlPointsLocked instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\Logic\vtkSlicerMarkupsLogic.h, line 355
[VTK] vtkSlicerMarkupsLogic (000001E78A8EF920): vtkSlicerMarkupsLogic::SetAllMarkupsLocked method is deprecated, please use SetAllControlPointsLocked instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\Logic\vtkSlicerMarkupsLogic.h, line 355
[VTK] vtkSlicerMarkupsLogic (000001E78A8EF920): vtkSlicerMarkupsLogic::SetAllMarkupsLocked method is deprecated, please use SetAllControlPointsLocked instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\Logic\vtkSlicerMarkupsLogic.h, line 355
[VTK] vtkSlicerMarkupsLogic (000001E78A8EF920): vtkSlicerMarkupsLogic::SetAllMarkupsLocked method is deprecated, please use SetAllControlPointsLocked instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\Logic\vtkSlicerMarkupsLogic.h, line 355
[VTK] vtkSlicerMarkupsLogic (000001E78A8EF920): vtkSlicerMarkupsLogic::SetAllMarkupsLocked method is deprecated, please use SetAllControlPointsLocked instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\Logic\vtkSlicerMarkupsLogic.h, line 355
[VTK] vtkSlicerMarkupsLogic (000001E78A8EF920): vtkSlicerMarkupsLogic::SetAllMarkupsLocked method is deprecated, please use SetAllControlPointsLocked instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\Logic\vtkSlicerMarkupsLogic.h, line 355
[VTK] vtkSlicerMarkupsLogic (000001E78A8EF920): vtkSlicerMarkupsLogic::SetAllMarkupsLocked method is deprecated, please use SetAllControlPointsLocked instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\Logic\vtkSlicerMarkupsLogic.h, line 355
[VTK] vtkSlicerMarkupsLogic (000001E78A8EF920): vtkSlicerMarkupsLogic::SetAllMarkupsLocked method is deprecated, please use SetAllControlPointsLocked instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\MRML\vtkMRMLMarkupsFiducialNode.h, line 107
[VTK] vtkMRMLMarkupsFiducialNode (000001E78A325C40): vtkMRMLMarkupsFiducialNode::GetNumberOfFiducials method is deprecated, please use GetNumberOfControlPoints instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\MRML\vtkMRMLMarkupsFiducialNode.h, line 126
[VTK] vtkMRMLMarkupsFiducialNode (000001E78A325C40): vtkMRMLMarkupsFiducialNode::GetNthFiducialPosition method is deprecated, please use GetNthControlPointPosition instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\MRML\vtkMRMLMarkupsFiducialNode.h, line 126
[VTK] vtkMRMLMarkupsFiducialNode (000001E78A325C40): vtkMRMLMarkupsFiducialNode::GetNthFiducialPosition method is deprecated, please use GetNthControlPointPosition instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\MRML\vtkMRMLMarkupsFiducialNode.h, line 126
[VTK] vtkMRMLMarkupsFiducialNode (000001E78A325C40): vtkMRMLMarkupsFiducialNode::GetNthFiducialPosition method is deprecated, please use GetNthControlPointPosition instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\MRML\vtkMRMLMarkupsFiducialNode.h, line 126
[VTK] vtkMRMLMarkupsFiducialNode (000001E78A325C40): vtkMRMLMarkupsFiducialNode::GetNthFiducialPosition method is deprecated, please use GetNthControlPointPosition instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\MRML\vtkMRMLMarkupsFiducialNode.h, line 126
[VTK] vtkMRMLMarkupsFiducialNode (000001E78A325C40): vtkMRMLMarkupsFiducialNode::GetNthFiducialPosition method is deprecated, please use GetNthControlPointPosition instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\MRML\vtkMRMLMarkupsFiducialNode.h, line 126
[VTK] vtkMRMLMarkupsFiducialNode (000001E78A325C40): vtkMRMLMarkupsFiducialNode::GetNthFiducialPosition method is deprecated, please use GetNthControlPointPosition instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\MRML\vtkMRMLMarkupsFiducialNode.h, line 107
[VTK] vtkMRMLMarkupsFiducialNode (000001E78A326EC0): vtkMRMLMarkupsFiducialNode::GetNumberOfFiducials method is deprecated, please use GetNumberOfControlPoints instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\MRML\vtkMRMLMarkupsFiducialNode.h, line 126
[VTK] vtkMRMLMarkupsFiducialNode (000001E78A326EC0): vtkMRMLMarkupsFiducialNode::GetNthFiducialPosition method is deprecated, please use GetNthControlPointPosition instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\MRML\vtkMRMLMarkupsFiducialNode.h, line 126
[VTK] vtkMRMLMarkupsFiducialNode (000001E78A326EC0): vtkMRMLMarkupsFiducialNode::GetNthFiducialPosition method is deprecated, please use GetNthControlPointPosition instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\MRML\vtkMRMLMarkupsFiducialNode.h, line 126
[VTK] vtkMRMLMarkupsFiducialNode (000001E78A326EC0): vtkMRMLMarkupsFiducialNode::GetNthFiducialPosition method is deprecated, please use GetNthControlPointPosition instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\MRML\vtkMRMLMarkupsFiducialNode.h, line 126
[VTK] vtkMRMLMarkupsFiducialNode (000001E78A326EC0): vtkMRMLMarkupsFiducialNode::GetNthFiducialPosition method is deprecated, please use GetNthControlPointPosition instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\MRML\vtkMRMLMarkupsFiducialNode.h, line 126
[VTK] vtkMRMLMarkupsFiducialNode (000001E78A326EC0): vtkMRMLMarkupsFiducialNode::GetNthFiducialPosition method is deprecated, please use GetNthControlPointPosition instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\MRML\vtkMRMLMarkupsFiducialNode.h, line 126
[VTK] vtkMRMLMarkupsFiducialNode (000001E78A326EC0): vtkMRMLMarkupsFiducialNode::GetNthFiducialPosition method is deprecated, please use GetNthControlPointPosition instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\MRML\vtkMRMLMarkupsFiducialNode.h, line 126
[VTK] vtkMRMLMarkupsFiducialNode (000001E78A326EC0): vtkMRMLMarkupsFiducialNode::GetNthFiducialPosition method is deprecated, please use GetNthControlPointPosition instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\MRML\vtkMRMLMarkupsFiducialNode.h, line 107
[VTK] vtkMRMLMarkupsFiducialNode (000001E78A327EF0): vtkMRMLMarkupsFiducialNode::GetNumberOfFiducials method is deprecated, please use GetNumberOfControlPoints instead
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Markups\MRML\vtkMRMLMarkupsFiducialNode.h, line 126
[VTK] vtkMRMLMarkupsFiducialNode (000001E78A327EF0): vtkMRMLMarkupsFiducialNode::GetNthFiducialPosition method is deprecated, please use GetNthControlPointPosition instead
self.extentGrowthRatio = 0.5
masterImageExtent = (0, 194, 0, 194, 0, 173)
labelsEffectiveExtent = (49, 156, 57, 132, 63, 141)
labelsExpandedExtent = [0, 194, 20, 169, 24, 173]
[VTK] Warning: In D:\D\P\S-0\Modules\Loadable\Segmentations\MRML\vtkMRMLSegmentEditorNode.h, line 175
[VTK] vtkMRMLSegmentEditorNode (000001E79EDC4EF0): vtkMRMLSegmentEditorNode::SetMasterVolumeIntensityMaskRange() method is deprecated, use SetSourceVolumeIntensityMaskRange method instead

These are all warnings, not errors. You can ignore them, but since they are all deprecation warnings, at some points (within a few years) the deprecated methods will be removed and so it is recommended to fix them. It is also nice to fix these warnings to make other errors/warnings (that may indicate actual problems) easier to see.

Since I think the new methods are not available in Slicer-5.0.x, you can wait for the fix until Slicer-5.2 is released (in a few days). You can then create a 5.0 branch in your repository to archive the current module version of the code (that works with Slicer-5.0), and fix the deprecation warnings in your main branch (that works with Slicer-5.2 and later).

How would I define the different branches to appear in the stores of 5.0 (archive) and 5.2 (stable) and 5.3 (preview)? I would like to support both stable and preview versions.

The 5.3 version already supports the SlicerTotalSegmentator call, which works great.

ExtensionsIndex repository stores the branch (or tag) name for each Slicer version

  1. Create a 5.0 branch in your repository
  2. Change the branch name in your s4ext file in the ExtensionsIndex repository’s 5.0 branch. (send a pull request or just write us here to change it for you)

“Lungmask” segmentation throws:

Traceback (most recent call last):
  File "C:/Users/rudol/Documents/MySlicerExtensions/SlicerLungCTAnalyzer/LungCTSegmenter/LungCTSegmenter.py", line 605, in runProcessing
    self.logic.applySegmentation()
  File "C:/Users/rudol/Documents/MySlicerExtensions/SlicerLungCTAnalyzer/LungCTSegmenter/LungCTSegmenter.py", line 1688, in applySegmentation
    inputVolumeSitk = sitkUtils.PullVolumeFromSlicer(self.inputVolume)
  File "C:\Users\rudol\AppData\Local\NA-MIC\Slicer 5.3.0-2022-11-26\bin\Python\sitkUtils.py", line 36, in PullVolumeFromSlicer
    sitkimage = sitk.ReadImage(myNodeFullITKAddress)
  File "C:\Users\rudol\AppData\Local\NA-MIC\Slicer 5.3.0-2022-11-26\lib\Python\Lib\site-packages\SimpleITK\extra.py", line 346, in ReadImage
    return reader.Execute()
  File "C:\Users\rudol\AppData\Local\NA-MIC\Slicer 5.3.0-2022-11-26\lib\Python\Lib\site-packages\SimpleITK\SimpleITK.py", line 5779, in Execute
    return _SimpleITK.ImageFileReader_Execute(self)
RuntimeError: Exception thrown in SimpleITK ImageFileReader_Execute: D:\a\1\sitk\Code\IO\src\sitkImageReaderBase.cxx:97:
sitk::ERROR: The file "slicer:000001B2EC1A8B20#vtkMRMLScalarVolumeNode1" does not exist.

in 5.3

@jcfr is this expected?

Can it be due to this extension using TotalSegmentator Python package, which uses SimpleITK, and TotalSegmentator is pip_installed with --upgrade option? Can we prevent pip to replace Slicer’s SimpleITK?

@lassoan There appears to be some confusion about where the log message originates. Where these aren’t all warnings in the core Qt or VTK toolkits, but rather in Qt and VTK based Slicer classes. So for example below the warning is not from QWidget, but qMRMLSegmentEditorWidget which is source contained in the Slicer repo. Should this log message be instead listed as [Slicer] or [Slicer Qt]? The example below is warning about a deprecated usage of Slicer code rather than pure Qt code.

[Qt] qMRMLSegmentEditorWidget::setMasterVolumeNode is deprecated, use setSourceVolumeNode method instead.