[vtkusers] display section of a volume with vtkImagePlaneWidget

raluca ancuta oprisa raluca_oprisa at yahoo.com
Thu Jun 9 03:56:31 EDT 2011


hello!
i am just discovering vtk, and i have a problem when i want to display the 
sections where the 3 planes are set on the volume (axial, sagital and coronal 
view). 

I want to get the image of the internal content of the volume, and display it in 
another vtkPanel, or vtkCanvas, i was trying both.
Here is a portion of code, how i was thinking to display it, and i cant figure 
out where is the mistake:

vtkImageData imagineX;
imagineX=vtkLookupTable bwLut = 
bwLut.SetTableRange(0,2000);
bwLut.SetSaturationRange(0.0, 0.0);
bwLut.SetHueRange(0, 0);
bwLut.SetValueRange(0,1);
bwLut.SetRampToLinear();
bwLut.Build();
vtkImageMapToColors colormap =
colormap.SetLookupTable(bwLut);//colormap.SetActiveComponent(0);//colormap.PassAlphaToOutputOff();System.vtkImageActor
 c1Actor=newvtkImageActor();out.println("planZ3");
// actor pentru 
slice//c1Actor.PickableOff();c1Actor.SetInput(colormap.GetOutput());
pan1.GetRenderer().AddActor(c1Actor);
 
where pan1 is type of vtkCanvas, the component where i want the section to be 
displayed. I have those 3 planes on the volume, i can move them, but i cannot 
get the image where they intersect the volume.
Thank you very much!!
I 
colormap.SetInput(imagineX);
colormap.SetOutputFormatToLuminance();newvtkLookupTable();newvtkImageMapToColors();
 planeWidgetX.GetResliceOutput();



More information about the vtkusers mailing list