Nightly Release - Data Probe not working for Red Slice

Hi all,

I haven’t found a solution so I’m asking here. I can’t seem to activate the data probe instance for the Red Slice. It is working for Yellow and Green. The widget appears empty when hovering over the Red slice.

Is there a way to activate the data probe for Red? Preferably in code.

Thanks!
Greydon

What platform are you on? In, today’s windows package the data probe appears to be working correctly for all three slice viewers.

Did you encounter this this while trying some type of customization (you mention code)? Some more details about what you are trying to do would be helpful.

Sam

On Windows 10 and have 3D Slicer version 4.11.0-2019-08-13.

I am scripting a module, which runs the following lines of code to reset the slice views when the module loads:

applicationLogic = slicer.app.applicationLogic()
interactionNode = applicationLogic.GetInteractionNode()
interactionNode.Reset(None)
		
layoutManager = slicer.app.layoutManager()
layoutManager.setLayout(3)
		
interactorStyle = slicer.app.layoutManager().sliceWidget('Red').sliceView().sliceViewInteractorStyle()
interactorStyle.SetActionEnabled(interactorStyle.BrowseSlice, True)

slicer.util.resetSliceViews()

I’m wondering if these lines are causing the issue?

Greydon

These lines are the issue. You are changing the state of the red slice interactor, which is why it is the only one broken.

interactorStyle = slicer.app.layoutManager().sliceWidget('Red').sliceView().sliceViewInteractorStyle()

interactorStyle.SetActionEnabled(interactorStyle.BrowseSlice, True)

The default state can be obtained by instead using:

interactorStyle.SetActionEnabled(interactorStyle.AllActionsMask, True)

However, I am not sure why you are changing the slice interactor to reset the slices. You can just exclude the two lines relating to the interactorStyle entirely, and it should work as intended.

Thank you for the reply, that will help!

The module I am developing has a neurosurgical application. Surgeons will be using it to plan research cases. There is a step that requires detection of a stereotactic frame from a CT scan. The frame contains fiducial markings that are best seen on the axial slice. I use a search algorithm to find these fiducials through the entire z-plane. The surgeon has to scroll through the z-plane to confirm that the fiducials were accurately detected by my algorithm. So to make this easier, in the module script, I use this:

applicationLogic = slicer.app.applicationLogic()
selectionNode = applicationLogic.GetSelectionNode()
selectionNode.SetReferenceActiveVolumeID(self.frameFidVolume.GetID())
applicationLogic.PropagateVolumeSelection(0)
applicationLogic.FitSliceToAll()
		
interactionNode = applicationLogic.GetInteractionNode()
interactionNode.Reset(None)
			
layoutManager = slicer.app.layoutManager()
layoutManager.setLayout(6)
			
layoutManager = slicer.app.layoutManager()
			layoutManager.sliceWidget('Red').mrmlSliceNode().RotateToVolumePlane(self.frameFidVolume)

Which gives this display…

If 3D Slicer is closed I wanted to ensure the slice views are reset upon opening the module again.

Greydon

Sounds great. Slicer has been used for neurosurgical planning quite extensively since its inception, so it should be well suited for your project.

There is an automatic stereoractic frame registration extension available, if you need an other implementation for comparison.

You can also use Slicer for surgical navigation, using Medtronic or BrainLab systems or a wide range of standalone optical or electromagnetic trackers. Intra operative ultrasound, surface scanning, etc. are also available. See www.slicerigt.org for details.

All views are automatically reset when you close the scene, so there is no need for any additional node modifications.