<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Thanks guys. it works now by resetting the camera via the renderer of the viewer.<br><br>Cheers,<br><br>J. <br><br><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Mathieu Malaterre &lt;mathieu.malaterre@gmail.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> Shakes &lt;Shekhar.Chandra@sci.monash.edu.au&gt;<br><b><span style="font-weight: bold;">Cc:</span></b> John Smith &lt;af3113@yahoo.com&gt;; vtk &lt;vtkusers@vtk.org&gt;<br><b><span style="font-weight: bold;">Sent:</span></b> Wednesday, October 29, 2008 1:44:24 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re:
 [vtkusers] Problem with vtkImageViewer2 Class<br></font><br>
John is right, IMHO you only need that part:<br><br>viewer-&gt;GetRenderer()-&gt;ResetCameraClippingRange();<br><br>2cts<br><br>On Wed, Oct 29, 2008 at 9:52 AM, Shakes<br>&lt;<a ymailto="mailto:Shekhar.Chandra@sci.monash.edu.au" href="mailto:Shekhar.Chandra@sci.monash.edu.au">Shekhar.Chandra@sci.monash.edu.au</a>&gt; wrote:<br>&gt; Hi John,<br>&gt;<br>&gt; Have u tried to reset the camera by pressing 'r'. To do this in code, I<br>&gt; believe its something like:<br>&gt; viewer-&gt;GetRenderer()-&gt;ResetCamera();<br>&gt;<br>&gt; Hope that works.<br>&gt;<br>&gt; Cheers<br>&gt; Shakes<br>&gt;<br>&gt; John Smith wrote:<br>&gt;<br>&gt; Hi,<br>&gt;<br>&gt; I hope that I'm not disturbing you with my mails recently. Anyway, I have a<br>&gt; small problem with vtkImagViewer2 Class. It works fine and shows the image.<br>&gt; The only problem is that the image is zoomed in too much and I have to zoom<br>&gt; it out manually. I want to adjust the view automatically
 when opening the<br>&gt; image. I try to use "imageViewer2-&gt;UpdateDisplayExtent()" but it says that<br>&gt; cannot access protected member. It's not wirtten there that it is protected<br>&gt; and I don't know the problem. On the other hand, if no one knows how to<br>&gt; solve this, does anyone know another way to adjust the size of the image<br>&gt; automatically when showing the image for first time?<br>&gt;<br>&gt; Thanks,<br>&gt;<br>&gt; J.<br>&gt;<br>&gt; MS VisualStudio 9.0 (2008)<br>&gt; Windows XP SP3<br>&gt; VTK5<br>&gt;<br>&gt;<br>&gt; ________________________________<br>&gt; _______________________________________________<br>&gt; This is the private VTK discussion list.<br>&gt; Please keep messages on-topic. Check the FAQ at:<br>&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>&gt; Follow this link to subscribe/unsubscribe:<br>&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers"
 target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; This is the private VTK discussion list.<br>&gt; Please keep messages on-topic. Check the FAQ at:<br>&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>&gt; Follow this link to subscribe/unsubscribe:<br>&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>&gt;<br>&gt;<br><br><br><br>-- <br>Mathieu<br></div></div></div><br>



      </body></html>