[vtkusers] Problems extracting a frustum using vtkBoxRepresentation and vtkExtractSelectedFrustum

Wagner Sales wsales at gmail.com
Thu Aug 13 12:48:27 EDT 2009


Hi all,

I trying to extract frustum by using vtkBoxRepresentation, vtkPlanes
and vtkExtractSelected frustum. My piece of code are above

vtkExtractSelectedFrustum *ext = vtkExtractSelectedFrustum::New();
vtkPlanes *pl = vtkPlanes::New();
boxRep->GetPlanes(pl); // take the planes from representation
ext->SetFrustum(cropPlanes);
ext->SetInput(mImage); //  my image are a dicom serie, and I can see
in volume and 2d views
ext->PreserveTopologyOn();
ext->Update();
vtkImageData *extIData = vtkImageData::SafeDownCast(ext->GetOutput());
my2DViewer->SetImage(extIData);

Well, the image aren't shown and, in a debug:
- extents aren't valid (0,-1,0,-1,0,-1)
- dimensions are all 0.

What's I'm doing wrong?

Regards,

Wagner Sales



More information about the vtkusers mailing list