<meta http-equiv="content-type" content="text/html; charset=utf-8"><div class="gmail_quote">On Wed, Oct 20, 2010 at 6:31 PM, David Gobbi <span dir="ltr">&lt;<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Alexis,<br>
<br>
The vtkImageActor is the most common way of displaying an image.  It<br>
assumes that the image data is already in the correct coordinate<br>
system (and if the image is not yet in the right coordinate system,<br>
then its Origin and Spacing can be adjusted with<br>
vtkImageChangeInformation).  That is usually the best method for<br>
displaying an image.  If you try displaying an image with vtkTexture<br>
instead, then you have to take care of all the details like aspect<br>
ratio, position, texture coords, etc. yourself.<br>
<br>
And, as John said, you must also consider the camera, because it is<br>
what determines how the &quot;World Coordinates&quot; of the 3D scene are<br>
translated into view that you see on the computer screen.  For 2D<br>
image viewing, you usually want to set ParallelProjectionOn() and use<br>
SetParallelScale() to set how large the view is, in world coordinates.<br>
 Then set the camera FocalPoint to the center of your image, set the<br>
camera Position about 1000mm away from the focal point (i.e. looking<br>
towards it), and then set the ViewUp() so that the image will be<br>
correctly oriented on the screen.<br>
<font color="#888888"><br>
   David<br>
</font><div><div></div><div class="h5"></div></div></blockquote></div><br><div>Here is an example of using an ImageActor as David G. suggested:</div><div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/InteractWithImage">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/InteractWithImage</a></div>
<div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/InteractWithImage"></a><br>David</div>