[vtkusers] extract any plane with vtkimageplanewidget.

Francois Louis LAILLIER flaillier at eldim.fr
Tue Apr 17 05:37:11 EDT 2007


Hello VtkUsers!

 

I need help... 

 

I program a control to view a volume. In this control we must extract a
any plane with orientation. I want use the setpoint1 and setpoint2.

 

But when I change coordinate I obtain the same volume...

 

I don't understand one thing. How define an axis with three coordinates?


http://www.vtk.org/doc/nightly/html/classvtkImagePlaneWidget.html#466f46
bd606a302080df47d99e891ea5

Go to the SetPoint1 definition

 

It is the origin which uses to second tuple of coordinates?

Maybe the axe it defines like a vector.

 

Can you help me please. 

 

I quote code.

 

Dim planeWidgetAP As New vtkImagePlaneWidget

planeWidgetAP.SetInput donnees.GetOutput

planeWidgetAP.SetPoint1 x1, y1, z1

planeWidgetAP.SetPoint2 x2, y2, z2

planeWidgetAP.SetOrigin 0, 0, 0

Dim center As Variant

center = planeWidgetAP.GetCenter

Dim norm As Variant

norm = planeWidgetAP.GetNormal

 

 

Dim surface As New vtkPolyData

planeWidgetAP.GetPolyData surface

 

Dim imagedata As New vtkImageData

Set imagedata = planeWidgetAP.GetResliceOutput

 

Dim slicer As New vtkImageReslice

slicer.SetInput imagedata

slicer.SetInformationInput imagedata

slicer.AutoCropOutputOn

 

Dim result As New vtkImageData

Set result = slicer.GetOutput

 

Dim shifter2 As New vtkImageShiftScale

shifter2.SetInput slicer.GetOutput

shifter2.SetOutputScalarTypeToUnsignedChar

 

Dim writer1 As New vtkPNGWriter

writer1.SetInput shifter2.GetOutput

writer1.SetFileName "C:\\ImageZ.PNG"

writer1.Write

 

In attach, you can see a image obtain with orthoplans, can you explain
why the image is bigger than the volume?

 

Thanks'

 

Best regards, Francois Louis.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070417/ea92a121/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ImageX.png
Type: image/png
Size: 9483 bytes
Desc: ImageX.png
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070417/ea92a121/attachment.png>


More information about the vtkusers mailing list