[vtkusers] How to get the extent points of a render window..??

David Gobbi david.gobbi at gmail.com
Tue Apr 12 18:13:10 EDT 2011


Use a view-to-world coordinate transformation.  In view coordinates,
the X and Y vary from -1.0 to +1.0 and Z varies from 0.0 to 1.0.

One way to do this is with the vtkRenderer::ViewToWorld() function,
but I prefer t get the CompositeProjectionTransformMatrix from the
camera, invert it, and then use it directly as a 4x4 transformation
matrix between view coords and world coords.

 - David


On Tue, Apr 12, 2011 at 4:01 PM, rakesh patil <prakeshofficial at gmail.com> wrote:
> Hello Users,
>
> How can I get the extents coordinates of a render window? I mean, suppose a
> grid is displayed on a render window, and I want to know min_lat, max_lat,
> min_lon, max_lon for that entire scene. I dont want the min/max lat/lons, of
> the grid, but the extreme coordinate points of the render window?
>
> Is it possible in VTK?
>
> Thanks in advance
>
> Regards
> Rakesh Patil



More information about the vtkusers mailing list