[vtkusers] Non-square pixels and SetPixelAspect()

John Platt jcplatt at lineone.net
Tue Jul 5 17:00:15 EDT 2005


Thanks Tom & Amy.

I forgot to mention that I am using parallel projection.

It looks like this is a case of new technology meets CRT user from the
past! My flat panel monitor has an aspect ratio of 5:4 and will draw
'squares' at 1280 x 1024. Since this resolution is not comfortable, I
run at 1024 x 768 (aspect ratio of 4:3) matching the older generation on
monitors. Consequently, the pixel aspect ratio is 5/4 x 3/4 = 15/16.

Does anybody bother with setting the pixel aspect ratio according to the
screen resolution?

Thanks for your suggestions.

John.

-----Original Message-----
From: vtkusers-bounces+jcplatt=lineone.net at vtk.org
[mailto:vtkusers-bounces+jcplatt=lineone.net at vtk.org] On Behalf Of Amy
Squillacote
Sent: 05 July 2005 20:04
To: tom fogal; John Platt
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] Non-square pixels and SetPixelAspect() 

To use parallel projection in VTK, assuming you have a vtkRenderer*
called 
ren, do the following.

ren->GetActiveCamera()->ParallelProjectionOn();

- Amy

At 02:28 PM 7/5/2005, tom fogal wrote:
>  <000001c5818c$ff3587f0$314b2f50 at pacsys4>"John Platt" writes:
> >Maybe it's because I'm an engineer but I expected a square in world
> >coordinates to be displayed as a square on my monitor.
>
>if you're using a perspective viewing transformation and the square is
>not in a single plane, you will get this behavior.
>
>Perhaps VTK can be configured to give you a parallel projection. If
>you're using it to display some type of blueprint / map in which exact
>sizes matter, this is probably what you want.
>
>See "Projection and Clipping":
>
>http://pubpages.unh.edu/~cs770/notes/lectures.html
>
>HTH,
>
>-tom
>
> >------=_NextPart_000_0001_01C58195.60F9EFF0
> >Content-Type: text/html;
> >       charset="us-ascii"
> >Content-Transfer-Encoding: quoted-printable
> >
> ><html>
><snip>
>
>Please do not send HTML mail.
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
>http://www.vtk.org/Wiki/VTK_FAQ
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers

_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers





More information about the vtkusers mailing list