[vtkusers] Re: turning auto scaling off in vtk

Anja Ende anja.ende at googlemail.com
Wed Aug 16 11:35:03 EDT 2006


Another curious thing is that if I do not call ResetCamera in my derived
class, the image gets displayed with a very high zoom factor!

I really do not understand what is happening with this function here.
Please, if anyone has some thoughts on this, please please share!

Thanks,

Anna

On 16/08/06, Anja Ende <anja.ende at googlemail.com> wrote:
>
> Hi everyone,
>
> It seems to be the ResetCamera() function that rescales the image.
>
> I tried calling the ResetCamera() with the bounds of my image but it did
> not seem to do much. It still rescales by image but puts it on the lower
> rows of the screen instead of the center.
>
> My rescaled image size is 2045, 2045... so, I cann ResetCamera like
>
> this->Renderer->ResetCamera(0, 2044, 0, 2044, 0, 0);
>
> If anyone has more insight into this, please help!
>
> Thanks,
> Anna
>
>
> On 16/08/06, Anja Ende <anja.ende at googlemail.com> wrote:
> >
> > Hi everyone,
> >
> > Another interesting observation:
> >
> > The scaling does not happen when I use vtkImageViewer instead of
> > vtkImageViewer2... so it must be something in the image viewer 2 component,
> > but I am yet to figure it out!
> >
> >
> > On 16/08/06, Anja Ende < anja.ende at googlemail.com> wrote:
> > >
> > > Hi everyone,
> > >
> > > I am using vtkImageViewer2 component to show a display image that I
> > > host in a QT Window.
> > >
> > > I have scaled the image through vtkImageReslice and vtkTransform.
> > > However, when the image is displayed, the vtkImageViewer2 scales it again to
> > > fit the window size. Somewhere along the line, VTK is telling its renderers
> > > or the render windows to rescale their displays.
> > >
> > > I am browsing through the code but have not found anything like that
> > > yet. My first instinct was to look in the vtkRenderInteractor and
> > > vtkRenderInteractorStyle but unless I have missed something, they seem to be
> > > ok.
> > >
> > > Also, vtkRenderWindow does not seem to rescale unless the SetSize
> > > method is being called by some other object to reduce the size again...
> > >
> > > If anyone ahs any idea on how to turn the auto scaling off completely,
> > > I would be very grateful.
> > >
> > > Thanks again everyone,
> > >
> > > Anna
> > >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060816/dea70b37/attachment.htm>


More information about the vtkusers mailing list