[vtkusers] Problem with vtkImageViewer2 Class

John Smith af3113 at yahoo.com
Wed Oct 29 09:31:40 EDT 2008


Thanks guys. it works now by resetting the camera via the renderer of the viewer.

Cheers,

J.




________________________________
From: Mathieu Malaterre <mathieu.malaterre at gmail.com>
To: Shakes <Shekhar.Chandra at sci.monash.edu.au>
Cc: John Smith <af3113 at yahoo.com>; vtk <vtkusers at vtk.org>
Sent: Wednesday, October 29, 2008 1:44:24 PM
Subject: Re: [vtkusers] Problem with vtkImageViewer2 Class

John is right, IMHO you only need that part:

viewer->GetRenderer()->ResetCameraClippingRange();

2cts

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



-- 
Mathieu



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081029/d2becd06/attachment.htm>


More information about the vtkusers mailing list