[vtkusers] Problem with cursoring in vtkImagePlaneWidget
Peter Kok
peter.kok at gmail.com
Wed Sep 13 16:17:58 EDT 2006
Hi there,
I have a problem when I try to use the cursor in the vtkImagePlaneWidget. I
have three imagePlaneWidgets, with the orientation to the x, y and z-axis.
When I want to use the cursor in one of the planes, the plane seems to need
some kind of focus for the cursor to work as desired. That is, I first need
to select a plane by moving it slightly using the middle mouse button. When
I then use the cursor, it works well, but only on that plane. If a plane
doesn't have the focus, the cursor doesn't work, the displayed text is "Off
image" and the edge turns to green.
The code I use to set up the image planes is not extremely exciting:
planeWidgetX = vtkImagePlaneWidget::New();
planeWidgetX->DisplayTextOn();
planeWidgetX->SetInput(checkers->GetOutput());
planeWidgetX->SetPlaneOrientationToXAxes();
planeWidgetX->SetSliceIndex((wholeExtent[0] + wholeExtent[1]) / 2);
planeWidgetX->SetPicker(cellPicker);
planeWidgetX->SetKeyPressActivationValue('x');
planeWidgetX->GetPlaneProperty()->SetColor(1, 0, 0);
planeWidgetX->SetWindowLevel(256, 128);
planeWidgetX->GetColorMap()->PassAlphaToOutputOff();
planeWidgetX->SetInteractor(iren);
planeWidgetX->On();
With similar code for the y- and z-plane. Does anyone have an idea of what
the problem (and preferably also the solution) might be?
Thanks,
-Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060913/72e3a92f/attachment.htm>
More information about the vtkusers
mailing list