Hello everybody,
<div><br></div><div>I'm using vtkImagePlaneWidget to visualize a set of orthonormal (sagittal, coronal, axial) planes from a 3D grayscale volume. The documentation for this class states that selection of the widget with the middle mouse button "enables translation of the plane along its normal". However I'm not getting this behavior: clicking on the widget with the middle mouse button doesn't do anything.</div>
<div><br></div><div>Heres a piece of my python code:</div><div><br></div><div>#Initialize the renderer</div><div>renderer = vtk.vtkRenderer()</div><div><div>renderWindow = vtk.vtkRenderWindow()</div><div>renderWindow.AddRenderer(renderer)</div>
</div><div><div>renderWindowInteractor = vtk.vtkRenderWindowInteractor()</div><div>renderWindow.SetInteractor(renderWindowInteractor)</div></div><div><div>interactorStyle = vtk.vtkInteractorStyleTrackballCamera()</div><div>
renderWindowInteractor.SetInteractorStyle(interactorStyle)</div></div><div><br></div><div>#Initialize image plane widgets</div><div><div>picker = vtk.vtkCellPicker()</div><div>picker.SetTolerance(0.005)</div><div><br></div>
<div>planeWidgetX = vtk.vtkImagePlaneWidget()</div><div>planeWidgetX.SetResliceInterpolateToLinear()</div><div>planeWidgetX.SetTextureInterpolate(1)</div><div>planeWidgetX.SetUseContinuousCursor(0)</div><div>planeWidgetX.SetInput(image)</div>
<div>planeWidgetX.SetPlaneOrientationToXAxes()</div><div>planeWidgetX.SetSliceIndex(wholeExtent[1]/2)</div><div>planeWidgetX.DisplayTextOn()</div><div>planeWidgetX.SetPicker(picker)</div><div>planeWidgetX.KeyPressActivationOff()</div>
<div>planeWidgetX.SetInteractor(renderWindowInteractor)</div><div>planeWidgetX.SetMarginSizeX(0.0)</div><div>planeWidgetX.SetMarginSizeY(0.0)</div><div>planeWidgetX.On()</div></div><div><br></div><div>... and similar for planeWidgetY and planeWidgetZ</div>
<div><br></div><div><div># Render</div><div>renderWindowInteractor.Initialize()</div><div>renderWindow.Render()</div><div>renderWindowInteractor.Start()</div></div><div><br></div><div>Is there something with my code? What am I missing?</div>
<div><br></div><div>Thanks for your suggestions,</div><div>Miguel</div>