Hello, I want to perform MPR on my 3D volume and display the 3 planes (axial, coronal and sagittal) in one render window. Problem is that, if I want to change the cursor (and update the other 2 views) in the upper plane I can’t because the mouse takes the red line of the lower plane, so that I have to rotate this line (figure 2) if I want to move the cursor of the upper plane.
Now I can move the cursor of the upper plane
How can I do so that the red line of the lower plane ‘exists’ only in the lower viewport?
This is the part of the code I think I need to fix:
vtkSmartPointer< vtkResliceImageViewer > viewer = vtkSmartPointer< vtkResliceImageViewer >::New();
vtkSmartPointer< vtkRenderWindowInteractor > interactor = vtkSmartPointer< vtkRenderWindowInteractor >::New();
interactor -> SetRenderWindow( viewer -> GetRenderWindow() );
viewer -> SetupInteractor( interactor );
viewer -> SetInputData( reader -> GetOutput() ); // pipeline
viewer -> SetResliceMode( 1 );
viewer -> GetRenderer() -> SetViewport( xmins[0], ymins[0], xmaxs[0], ymaxs[0] );
vtkSmartPointer< vtkResliceImageViewer > viewer2 = vtkSmartPointer< vtkResliceImageViewer >::New();
viewer2 -> SetRenderWindow( viewer -> GetRenderWindow() );
viewer2 -> SetupInteractor( interactor );
viewer2 -> GetRenderer() -> SetViewport( xmins[1], ymins[1], xmaxs[1], ymaxs[1] ); // questo viewer verrà visualizzato in alto a sx
viewer2 -> SetInputData( reader -> GetOutput() );
viewer2 -> SetResliceMode( 1 );
// make them all share the same reslice cursor object.
vtkResliceCursorLineRepresentation *rep = vtkResliceCursorLineRepresentation::SafeDownCast( viewer -> GetResliceCursorWidget() -> GetRepresentation() );
viewer -> SetResliceCursor( viewer -> GetResliceCursor() );
rep -> GetResliceCursorActor() -> GetCursorAlgorithm() -> SetReslicePlaneNormal( 2 );
viewer -> SetSliceOrientation( 2 );
vtkResliceCursorLineRepresentation *rep2 = vtkResliceCursorLineRepresentation::SafeDownCast( viewer2 -> GetResliceCursorWidget() -> GetRepresentation());
viewer2 -> SetResliceCursor( viewer -> GetResliceCursor() );
rep2 -> GetResliceCursorActor() -> GetCursorAlgorithm() -> SetReslicePlaneNormal( 1 );
viewer2 -> SetSliceOrientation( 1 );
Thanks in advance for any help!!