[vtkusers] How to cut a grey slice by using vtkCutter
diaoxianfen
diaoxianfen at asisz.com
Wed Aug 3 06:51:19 EDT 2005
Hello every one,
I am using vtkCutter to extract slices of an image volume.I want to get the grey slice. But I don't know how to do.
Using the following program, I can get the colored slice.
vtkImageMapToColors *mapToColors = vtkImageMapToColors::New();
mapToColors->SetInput(reader2->GetOutput());//reader->GetOutput()
mapToColors->SetLookupTable(luk);
vtkCutter *cutter = vtkCutter::New();
cutter->SetInput(mapToColors->GetOutput());//mapped image volume
cutter->SetCutFunction(plane);
vtkPolyDataMapper *cutMapper = vtkPolyDataMapper::New();
cutMapper->SetInput(cutter->GetOutput());
vtkActor *cutActor = vtkActor::New();
cutActor->SetMapper(cutMapper);
However, when using the following program, I still get colored slice.
vtkCutter *cutter = vtkCutter::New();
cutter->SetInput(reader2->GetOutput());// original image volume
cutter->SetCutFunction(plane);
vtkPolyDataMapper *cutMapper = vtkPolyDataMapper::New();
cutMapper->SetInput(cutter->GetOutput());
vtkActor *cutActor = vtkActor::New();
cutActor->SetMapper(cutMapper);
How can get the grey slice?
If you know, please let me know.
Thanks.
Diao xian fen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050803/c0f8afab/attachment.htm>
More information about the vtkusers
mailing list