[vtkusers] how to get the length of diagonal of the bounding box?

David Doria daviddoria at gmail.com
Thu Nov 24 17:51:14 EST 2011


On Thu, Nov 24, 2011 at 4:50 PM, rimaS <rima.sb4 at gmail.com> wrote:
> Hi all,
>  i drew the bounding box of an object with vtkOutlineFilter, does someone
> know how can i get the length of its diagonal?
> thank you in advance

As far as I know the OutlineFilter just draws the bounding box of the
data. You can get the bounds of the data with:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataBounds

and determine the length of the diagonal by finding the distance
between (minx,miny,minz) and (maxx, maxy, maxz).

David



More information about the vtkusers mailing list