[vtkusers] parallel and projection mode, stretch an image to fit in a window

Renaud Isabelle renauisa at yahoo.fr
Wed May 25 19:22:18 EDT 2005


Yes, a part of my rendow window background is still seen when I'm displaying my image. This part of this frame will be used to add another control in my interface. 
 
If my aim is to stretch my image with different factors in x and y in my render window, I suppose that I'm not in the parallel projection mode anymore but in the perspective mode, right? 
So, I suppose that, what I really need to use is not SetParallelScale() but maybe SetViewShear() instead.   
 
Is it correct?


Goodwin Lawlor <goodwin.lawlor at ucd.ie> a écrit:

> - you should use vtkImageViewer2... it uses vtkImageActor; or use the
exact classes in the code below
> What do you mean by that: do I have to choose between using
vtkImageViewer2 and implementing code like I did
> below?

Yeah- either use a vtkImageActor/vtkRenderer/vtkRenderWindow or just a
vtkImageViewer2 (its a convenience class for the former classes).

>- you have to set the renWin to the same size as your image dimensions
>Actually, I would like to do the contrary: that is to say, to set the image
dimensions to the same size as my renWin. >Indeed, the image that I have to
display is about 1552*128 (because of different pixel size according to
directions), >and I would like to display it in a frame of my MFC interface.

ok - if you dont match the window aspect ratio to the image aspect ratio
then the background of the renderer maybe visible


Goodwin



		
---------------------------------
 Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, photos et vidéos !
Créez votre Yahoo! Mail  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050526/1709937f/attachment.htm>


More information about the vtkusers mailing list