[vtkusers] Accessing values returned by GetBounds

Randy Heiland heiland at ncsa.uiuc.edu
Tue Jul 10 07:28:04 EDT 2001


On Jul 9,  5:31pm, Christopher Navarro wrote:
> Subject: [vtkusers] Accessing values returned by GetBounds
> Hi,
>
> I'm just starting to learn VTK for a project and I was wonder, how do I
access
> the individual values returned by GetBounds()?    From what I understand, it
> returns xmin, xmax,.....,zmin,zmax.  If I want just xmin, how would I get
> that?
> I want to put a coordinate system at one corner of the bounding box and need
> the (xmin, ymax, zmin) values only.  Any help would be greatly appreciated.
> Thanks!
>
> -chris
>

Chris,

You can learn a lot by looking at the examples that come with the VTK
distribution -- assuming you downloaded the source.  For example, if you go to
...vtk/graphics/examplesCxx and grep/search for 'GetBounds', you'll find it
used in finance.cxx:

  float bounds[6];
 ...
  popSplatter->GetOutput()->GetBounds(bounds);
 ..
  axes->SetOrigin(bounds[0], bounds[2], bounds[4]);

--Randy





More information about the vtkusers mailing list