but now with a recent Slicer version (2022-04-26) it doesn’t produce the same output. There is no red line observed in the green and yellow slice view:
[WARNING][VTK] 28.04.2022 14:19:07 [vtkMRMLSliceCompositeNode (0000024DDED0EEB0)] (D:\D\P\S-0\Libs\MRML\Core\vtkMRMLSliceCompositeNode.cxx:301) - SetSliceIntersectionVisibility method is deprecated. Use SetIntersectingSlicesVisibility method of vtkMRMLSliceDisplayNode object instead.
Attempting to use a newer method I’m still unable to achieve the same results as previously (there is no red line in the green and yellow slice views upon calling SetIntersectingSlicesVisibility.
Both the deprecated and the new methods work, but the changes only take effect if a slice nodes are updated, for example like this:
sliceNodes = getNodesByClass('vtkMRMLSliceNode')
for sliceNode in sliceNodes:
sliceNode.Modified()
Of course this forced update should not be necessary. This is a regression introduced when the interactive slice intersection feature was introduced. We spent a lot of time trying to fix all the issues, but at some point we had to decide between rejecting this feature or get it in even though there are still problems with it. I think we fixed most of the issues that come up when using the GUI, but workarounds are needed when the feature is used programmatically.
You can submit a bug report and we’ll eventually get to it, but probably only when there is interest/funding for making interactive slice intersections fully functional (e.g., compatible with Segment Editor).