<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 <mathieu.malaterre@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> Shakes <Shekhar.Chandra@sci.monash.edu.au><br><b><span style="font-weight: bold;">Cc:</span></b> John Smith <af3113@yahoo.com>; vtk <vtkusers@vtk.org><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->GetRenderer()->ResetCameraClippingRange();<br><br>2cts<br><br>On Wed, Oct 29, 2008 at 9:52 AM, Shakes<br><<a ymailto="mailto:Shekhar.Chandra@sci.monash.edu.au" href="mailto:Shekhar.Chandra@sci.monash.edu.au">Shekhar.Chandra@sci.monash.edu.au</a>> wrote:<br>> Hi John,<br>><br>> Have u tried to reset the camera by pressing 'r'. To do this in code, I<br>> believe its something like:<br>> viewer->GetRenderer()->ResetCamera();<br>><br>> Hope that works.<br>><br>> Cheers<br>> Shakes<br>><br>> John Smith wrote:<br>><br>> Hi,<br>><br>> I hope that I'm not disturbing you with my mails recently. Anyway, I have a<br>> small problem with vtkImagViewer2 Class. It works fine and shows the image.<br>> The only problem is that the image is zoomed in too much and I have to zoom<br>> it out manually. I want to adjust the view automatically
when opening the<br>> image. I try to use "imageViewer2->UpdateDisplayExtent()" but it says that<br>> cannot access protected member. It's not wirtten there that it is protected<br>> and I don't know the problem. On the other hand, if no one knows how to<br>> solve this, does anyone know another way to adjust the size of the image<br>> automatically when showing the image for first time?<br>><br>> Thanks,<br>><br>> J.<br>><br>> MS VisualStudio 9.0 (2008)<br>> Windows XP SP3<br>> VTK5<br>><br>><br>> ________________________________<br>> _______________________________________________<br>> This is the private VTK discussion list.<br>> Please keep messages on-topic. Check the FAQ at:<br>> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>> Follow this link to subscribe/unsubscribe:<br>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers"
target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>><br>><br>> _______________________________________________<br>> This is the private VTK discussion list.<br>> Please keep messages on-topic. Check the FAQ at:<br>> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>> Follow this link to subscribe/unsubscribe:<br>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>><br>><br><br><br><br>-- <br>Mathieu<br></div></div></div><br>
</body></html>