Mouse movement causes screen flickering in 2D views after using slicer.modules.segmentations.logic().ImportLabelmapToSegmentationNodeWithTerminology()

When I add a node using slicer.modules.segmentations.logic().ImportLabelmapToSegmentationNode() everything is normal. However, when I use slicer.modules.segmentations.logic().ImportLabelmapToSegmentationNodeWithTerminology() instead, I get a lot of screen flickering whenever I move my mouse cursor over the 2D view (axial, sagittal, coronal). Is there some reason why importing using a terminology would cause screen flickering? I’m on a M3 MacBook Pro, Sequoia 15.6, Slicer v5.8.1.

Do you also see flickering when you load a sample dataset that has terminology information?

What is the resolution of the labelmap you use?

I’ve been thinking what to answer for days but this is so little information that it is basically impossible. Please provide a lot more information, given the special nature of your question. We need to know about your dataset, your use case, your algorithm, etc. Thanks.

Apologies for the lack of detail. I experimented with this quite a bit more and found that I was getting the flickering seemingly randomly with either function. The flickering is intermittent and rather unpredictable. Restarting Slicer seems to fix it. I wish I knew more about what caused it but at this point, it does not seem to be related to this particular function.

I am using 1.5x1.5x1.5mm images, segmentations, and label maps

Could you please share a video? I thought it was due to slowness (like time of computation of getting terminology of segment in voxel under mouse) but now it does not seem so.

Yes but are they large volumes? I was asking because I thought it was a performance issue. I guess they are smaller then a normal CT (which are 512x512x150ish)

Has anyone else using Mac has seen flickering?

I have not noticed the flickering since switching to 5.10.0

I have noticed a different issue with very large volumes (high slice count) in which certain Segment Editor operations will take a very long time (several seconds rather than nearly immediate). Limiting the number of visible segments and applying to ‘only visible segments’ can speed these operations up so that one at least does seem to be a computation issue.

1 Like

Thanks for reporting back! I’ll mark your answer as solution because the particular issue for which you opened the topic has solved itself.

This is a separate problem but seems important. Can you please start a new post (or issue on GitHub, whichever seems easier for you) with this? Ideally, if you want the community (who work on the Slicer core in their free time) to help in an efficient manner, we’d need a simple way to reproduce it. For example if you could find a short sequence of steps with one of the sample data that brings this out, it would be super helpful. Thanks a lot!