[vtkusers] Using vtkImagePlaneWidget
raluca ancuta oprisa
raluca_oprisa at yahoo.com
Mon Jun 6 12:31:49 EDT 2011
Hello!
I am new to vtk, and im currently trying to display the images coresponding to 3
vtkImagePlaneWidget, as coronal, axial and sagittal view. I have the volume, i
set the plans, i can move them, but in those 3 panels where the inside sections
of the volume should be, there is nothing. I tried to make the panels as
vtkPanel, then vtkCanvas, but nothing works.
Here is the code im using:
vtkImageData imagineX;
imagineX=planeWidgetX.GetResliceOutput();
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 =newvtkLookupTable();newvtkImageMapToColors(); //
stabilirea tabelei de culoricolormap.SetLookupTable(bwLut);
colormap.SetInput(imagineX);
colormap.SetOutputFormatToLuminance();vtkImageActor c1Actor=newvtkImageActor();
// actor pentru
slice//c1Actor.PickableOff();c1Actor.SetInput(colormap.GetOutput());
pan1.GetRenderer().AddActor(c1Actor);
,....Where pan1 is vtkCanvas. I tried also vtkPanel but no result as i expected.
Please if someone can help me, i really dont have any clue why i see just a
black image, when the planWidgetX is initially put inside the volume. Thank you
very much!
More information about the vtkusers
mailing list