[vtkusers] Problems extracting a frustum using vtkBoxRepresentation and vtkExtractSelectedFrustum

David E DeMarle dave.demarle at kitware.com
Thu Aug 13 13:52:35 EDT 2009


Check that the frustum has the sense that the extractor expects. That is,
points inside the frustum should evaluate to a negative number and those
outside should be positive. Compare with the frustum that vtkAreaPicker
creates for example, that one is correct and is tested with the
TestAreaSelections test nightly. The ordering of the planes might have to be
the same too.

David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109


On Thu, Aug 13, 2009 at 12:48 PM, Wagner Sales <wsales at gmail.com> wrote:

> 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
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090813/c5d9e3fb/attachment.htm>


More information about the vtkusers mailing list