Goodwin &amp; Obada,<br><br>Thanks for your replies. I will play around with it today and if no joy, I will stick with vtkImageViewer.<br><br>Thanks again :)<br><br><div><span class="gmail_quote">On 17/08/06, <b class="gmail_sendername">
Obada Mahdi</b> &lt;<a href="mailto:omahdi@gmx.de">omahdi@gmx.de</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Anja!
<br><br>Anja Ende wrote:<br>[undistorted display of preprocessed image using vtkImageViewer2]<br>&gt; Another curious thing is that if I do not call ResetCamera in my derived<br>&gt; class, the image gets displayed with a very high zoom factor!
<br>&gt;<br>&gt; I really do not understand what is happening with this function here.<br>&gt; Please, if anyone has some thoughts on this, please please share!<br><br>Some thoughts, coming up:<br><br>According to the documentation, vtkImageViewer2 provides a simple 3D
<br>scenario that places an vtkImageActor into the scene (facing the<br>camera).&nbsp;&nbsp;In particular, displaying an image this way involves other<br>(projection) transforms defined by camera parameters, just like with any<br>other 3D scenario.
<br><br>&gt;&gt; It seems to be the ResetCamera() function that rescales the image.<br><br>What you are experiencing as &quot;auto-scaling&quot; is indeed a result of<br>ResetCamera(), which tries to adjust camera parameters in a way such
<br>that all actors are visible (or, more precisely, such that the enclosing<br>sphere of any actor's bounding box fits into the resulting view frustrum<br>-- that's why a single rectangular image still doesn't max out the
<br>render window in either dimension).<br><br>Without an initial call to ResetCamera(), camera defaults are used,<br>which, in conjunction with your image dimensions and spacing, result in<br>that &quot;very high zoom factor&quot; you mentioned.
<br><br>The vtkImageViewer wrapper class, on the other hand, uses 2D<br>actors/mappers, so there is no projection transform to bother with.<br><br><br>I guess the &quot;right&quot; way to deal with this depends on what you want to
<br>do.&nbsp;&nbsp;If you just want to display image data exactly as produced by your<br>own filtering pipeline, you might be better off with vtkImageViewer (or<br>a home-brewed analogon involving vtkActor2D/vtkImageMapper).<br><br>
If, on the other hand, you'd rather stick with vtkImageViewer2 but want<br>to have more control over the transform induced by camera parameters,<br>you might want to have a closer look at what vtkCamera and<br>vtkRenderer::ResetCamera() do.&nbsp;&nbsp;I'd say there is a way to set up the
<br>camera such that the results mimic vtkImageViewer (starting with<br>ParallelProjectionOn()), and calls to vtkRenderer::ResetCamera() can be<br>observed and acted upon by registering for the ResetCameraEvent -- but<br>
frankly, I'm not sure if it is worth the effort.<br><br><br>HTH, and apologies if I shared too much :-)<br><br>Obada<br><br></blockquote></div><br>