[vtkusers] vtkCamera with ParallelProjection

Thiago Franco de Moraes tfmoraes at cti.gov.br
Wed Jan 21 06:30:40 EST 2009


I looked at vtkImageViewer2 source code and I found it:

      // if it would be smaller than 150 by 100 then limit to 150 by 100
      this->RenderWindow->SetSize(
        xs < 150 ? 150 : xs, ys < 100 ? 100 : ys);

      if (this->Renderer)
        {
        this->Renderer->ResetCamera();
        this->Renderer->GetActiveCamera()->SetParallelScale(
          xs < 150 ? 75 : (xs - 1 ) / 2.0);
        }

But it sets the renderwindow size if needed. I need a way to best fit
the image into the renderwindow and the user can resize the
renderwindow, whatever the size. There is a way?




More information about the vtkusers mailing list