[vtkusers] vtkImagePlaneWidget problem on vtkImageData (C++)

Adrian Wyssmann wyssa1 at hta-bi.bfh.ch
Thu Oct 28 11:34:28 EDT 2004


Hello

I have a simple 2D-image (vtkImageData). I want to be able to change the
window-level by the mouse. So I used a vtkImagePlaneWidget, which implements
that. Actual it works, but not as expected:
The widget seems to be like a fog over the image. Some pixels habe the
original color, others have been set to black. If I turn the widget by one
of it's margins, I see again the proper image.

vtkImageData* myImageData;
vtkImagePlaneWidget* = myImagePlaneWidget;
vtkLookupTable* = myLookupTable;

//initialization ...

myImagePlaneWidget->SetInput(myImageData);
myImagePlaneWidget->SetPlaneOrientation(2); //Z-Axe
myImagePlaneWidget->On();
myImagePlaneWidget->SetSlicePosition(0);
myImagePlaneWidget->GetLookuptable()->DeepCopy(myLookupTable);

//more code ...

Can anybody help?

Thanks

Adrian








More information about the vtkusers mailing list