[vtkusers] Stretching and shrinking 2D images
Tanya S
tanya_lll at yahoo.com
Fri Jun 3 02:43:37 EDT 2005
Hi Julien,
I also had the same problem when I use vtkActor2D and vtkImageMapper.
Then I change the pipeline using vtkImageMapToWindowLevelColors and vtkImageActor, and it works fine.
Hope this helps.
.Tanya.
julien.barneoud at kodak.com wrote:
Hi all,
I am trying to stretch or shrink an image to fit the window size.
- When sizing its parent window, I also size the render window to make it have the same size as its parent.
- I am using a vtkImageMapper and a vtkActor2D to display the image into the render window. I have enabled RenderToRectangle functionnality into the vtkImageMapper , and set correct Position (0.0 0.0) and Position2 (1.0 1.0) of the vtkActor2D.
When I resize the window, making it larger than the raw image dimension, the image is well stretched, but if I reduce the size of the window to something smaller than the raw image size, the image is not shrunk to fit the window size: it is displayed with a 1.0 zoom factor (and so, only a part of the image is visible).
Is there any possibility to shrink a 2D image using vtkImageMapper and vtkActor2D, or should I use another set of classes ?
Thanks in advance for your help.
Regards,
Julien BARNEOUD_______________________________________________
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
---------------------------------
Discover Yahoo!
Get on-the-go sports scores, stock quotes, news & more. Check it out!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050602/95012546/attachment.htm>
More information about the vtkusers
mailing list