[vtkusers] Axies image planes

Luca Picello luca.picello at libero.it
Sun May 30 12:24:43 EDT 2004


Thank you John but I think I need some more theorics before brutal code: 
I'm playing with VTK from few time!
More it should be python (I do not know and I cannot test).
My approch is using vtkImagePlaneWidget who should do all I need.
My idea is to show vtkImagePlaneWidget object class in one hidden window 
( sx in the screenshot ), take the result image and show it like a 
picture to user.
But like you can see, it does not work: output dimensions are wrong and 
I have a black unknown bar.
Take a look to the screenshot.

Code I used is:

planeWidgetX = vtkImagePlaneWidget::New();
planeWidgetX->SetInput(v16->GetOutput());
planeWidgetX->SetInteractor( vtkBorlandRenderWindow1->GetInteractor() );
planeWidgetX->SetPlaneOrientationToXAxes();
planeWidgetX->SetSliceIndex( TrackBarX->Position );
planeWidgetX->On();
planeWidgetX->InteractionOff();

vtkImageMapper* colorMap = vtkImageMapper::New();
colorMap->SetInput(planeWidgetX->GetResliceOutput());

vtkActor2D* imageActor = vtkActor2D::New();
imageActor->SetMapper(colorMap);

vtkBorlandRenderWindow1->GetRenderer()->ResetCamera();
vtkBorlandRenderWindow2->GetRenderer()->AddActor( imageActor );
vtkBorlandRenderWindow2->GetRenderer()->ResetCamera();

What's wrong?
Thank you,

Luca



John Hunter wrote:

>>>>>>"Luca" == Luca Picello <luca.picello at libero.it> writes:
>>>>>>            
>>>>>>
>
>    Luca> Hallo everybody, I am trying to write a simple program with
>    Luca> axial, coronal and sagittall planes in 3 different windows
>    Luca> like volview has.  I tried a lot of ways to extrude the
>    Luca> planes from the volume and show on screen but all the times
>    Luca> I get wrong results.  Any help will be appreciable.
>
>See
>http://public.kitware.com/pipermail/vtkusers/2004-April/048203.html
>
>JDH
>.
>
>  
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: imageplanewidget.JPG
Type: image/jpeg
Size: 16836 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040530/f52acfa3/attachment.jpeg>


More information about the vtkusers mailing list