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

Adrian Wyssmann wyssa1 at hta-bi.bfh.ch
Fri Oct 29 03:06:42 EDT 2004


In the line of the declaration of vtkImageViewer2 I get the compile error
(using VS6):
vtkImageViewer2* pMyImageViewer2; //c2143 sytnax error: missing ";" before
'*'

Adrian

-----Original Message-----
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf
Of Dean Inglis
Sent: Donnerstag, 28. Oktober 2004 19:22
To: vtkusers archive
Subject: [vtkusers] Re: vtkImagePlaneWidget problem on vtkImageData (C++)

Adrian,

tyry using class vtkImageViewer2, as it was meant for 2D image display and
has built in window-level functionality controlled by the mouse.
vtkImagePlaneWidget is really designed to work with 3D image data.

Dean


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 On(); 
myImagePlaneWidget->SetSlicePosition(0);
myImagePlaneWidget->GetLookuptable()->DeepCopy(myLookupTable);

//more code ...

Can anybody help?

Thanks

Adrian


_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers





More information about the vtkusers mailing list