[vtkusers] Change display origin from lower left 2 upper left
Frank Lindseth
Frank.Lindseth at sintef.no
Wed May 7 08:11:43 EDT 2008
Yes it's possible to manipulate the data sent to the new display-
system and vtkImageFlip could be used to convert vtkImageData,
but I would prefer (a least for the time being) to use the data as is,
and instead adapt the new VTK display system to the old one (basically
flipping the window/viewport y-axis),
it's pretty complicated in terms of view-layout (e.g. view-position
and width/hight in pixel coord. as well as overlay (e.g. line gong
from pixel (display/viewport) x1,y1 to x2,y2).
So somthing like:
renWin->SetOriginToUpperLeft();
would be very nice, is my vague recollection of such a method totally
wrong?
- Frank
On May 7, 2008, at 1:27 PM, Emmanouil Moschidis wrote:
> Hi Frank
> I know that with the vtkImageFlip class has this funtcionality when
> it comes to the manipulation of a vtkImageData object. I'm not sure
> about the viewport though... I'd suppose there is no problem as the
> origin is defined internally in each object and not by the viewport,
> am I right?
>
> Frank Lindseth <Frank.Lindseth at sintef.no> wrote:
> Hi all,
>
> Is it possible to change VTK's display/viewport convention from
> (origin in lower left):
> /\ y
> |
> |
> O--------> x
>
> To (origin in upper left):
> O--------> x
> |
> |
> \/ y
>
> Any help would be greatly appreciated.
>
>
> Background:
> We would like to replace the old "display system" in an existing
> application with a new based on VTK,
> i.e. both display/viewport layout and visualizing exiting data that
> "assumes" that the display/viewport origin is in the upper left
> corner,
> converting setup/data coordinates (y) is of course an option, but it
> would make things a lot easier if VTK used the same origin (as
> opposed to the lower-left default),
> I'm pretty sure that I was able to set this a long time ago
> (vtkRenderWindow-method maybe?), but can't find the needed
> functionality anywhere anymore,
> is it possible?
>
> - Frank
>
>
> _______________________________________________
> 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
>
>
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile.
> Try it now.
------------------------------
Frank Lindseth
Research Scientist (PhD)
SINTEF Health Research
Dept. Medical Technology
N-7465 Trondheim, Norway
Location: Olav Kyrres gt. 9, 4th floor, Trondheim
E-mail: Frank.Lindseth at sintef.no
Telephone: +47 928 09 372
Telefax: +47 930 70 800
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080507/ec3580a3/attachment.htm>
More information about the vtkusers
mailing list