[vtkusers] pblm in extracting slice from volume rendered image.

S, Maheshanand (MED, Contractor) maheshanand.s at med.ge.com
Thu Feb 12 08:47:09 EST 2004


Hi groups..
>I'm a new vtk user,working in interactive volume rendering of MR volume data.
>I want to extract slices from the volume rendered image.
>I think vtkImageClip will make an image smaller.Is it vtkClipVolume along 
>with vtkImplicitDataSet would perform this...
>My code is like..
>vtkSamplefunction *sample = vtkSamplefunction::New()
>sample->SetSampleDimensions(int,int,int)
>sample->computeNormalsOff();
>vtkImplicitDataSet * ImplicitDataSet = vtkImplicitDataSet::New();
>ImplicitDataSet -> SetDataSet(Sample->GetOutput());
>vtkImplicitWindowFunction *window = vtkImplicitWindowFunction::New();
>window->SetImplicitFunction  (ImplicitDataSet)
>window->SetWindowRange(float,float)
>Sample->SetImplicitFunction  (window)
>vtkClipVolume *clip = vtkClipVolume::New()
>clip->SetInput(obj of img reader->GetOutPut())
>clip->SetClipFunction(window)
>clip->SetValue(0.0)
>clip->GenerateClippedOutputOff()
>vtkDataSetMapper *clipMapper = vtkDataSetMapper::New()
>clipMapper->SetInput(clip->GetOutput())
>clipMapper->ScalarVisibilityOff()
>vtkActor *clipActor = vtkActor::New()
>clipActor->GetProperty()->SetColor(float,float,float)
>vtkOutlineFilter *outlineData = vtkOutlineFilter::New()
>outlineData-> SetInput(clip->GetInput())
>Then Actors are added to the renderers...here 
>particularly...renderer->InteractiveOn() is added
>Is this is sufficient or any other classes will do better then this?
>Looking 4 ur valuable suggestion
>Thanx in advance
>rgds...mahesh.
>
>
>
>








More information about the vtkusers mailing list