[vtkusers] problem with vtkImageReslice vtkImageMapper (section display)
liuy
ly8221 at 163.com
Mon Jun 27 06:13:29 EDT 2005
Hi to all,
I have a serise of transect volume slice ,but I want to see arbitrary section.So my code as follows :
vtkImageReslice *reslice=vtkImageReslice ::New();
reslice->SetInput (body->GetOutput());
reslice->SetResliceAxesDirectionCosines(1,0,1,0,1,0,-1,0,1);
reslice->InterpolateOn();
reslice->TransformInputSamplingOn();
reslice->AutoCropOutputOn();
reslice->SetInterpolationModeToLinear();
reslice->SetOutputSpacing(0.8,0.95,0.8);
vtkImageMapper *rmapper=vtkImageMapper ::New();
rmapper->SetInput(reslice->GetOutput());
rmapper->SetZSlice(90);
rmapper->SetColorWindow(2000);
rmapper->SetColorLevel(1000);
vtkActor2D *ractor=vtkActor2D :: New();
ractor->SetMapper(rmapper);
ren->SetViewport(0,0.2,0.5,0.8);
ren->AddActor(ractor);
My problem is that when the ResliceAxesDirection is inlined,i can only see a part of the image,or only see the same slice.
By the way ,I want to know how to implement arbitrary shape section ,specially curved surface from volume.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050627/81b5ef91/attachment.htm>
More information about the vtkusers
mailing list