MantisBT - VTK
View Issue Details
0001432VTK(No Category)public2004-12-15 11:222016-08-12 09:54
Katharina.Quintus 
Kitware Robot 
lowminoralways
closedmoved 
 
 
0001432: documentation of method SetParallelScale of vtkCamera not correct?
The documentation of the method SetParallelScale/ GetParallelScale in vtkCamera tells "Set/Get the scaling used for a parallel projection, i.e. the height of the viewport in world-coordinate distances."
I tried several times and I think it should say "... the half of the height of the viewport."
No tags attached.
Issue History
2008-11-30 09:20Mathieu MalaterreAssigned ToMathieu Malaterre => François Bertel
2008-11-30 20:17François BertelAssigned ToFrançois Bertel =>
2009-07-14 04:25Paul MelisNote Added: 0016856
2010-07-27 15:56jjinnsoftNote Added: 0021501
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2016-08-12 09:54Kitware RobotNote Added: 0036758
2016-08-12 09:54Kitware RobotStatusexpired => closed
2016-08-12 09:54Kitware RobotResolutionopen => moved
2016-08-12 09:54Kitware RobotAssigned To => Kitware Robot

Notes
(0016856)
Paul Melis   
2009-07-14 04:25   
I ran into this as well. The relevant code in vtkCamera::ComputePerspectiveTransform is

  if (this->ParallelProjection)
    {
    // set up a rectangular parallelipiped

    double width = this->ParallelScale*aspect;
    double height = this->ParallelScale;

    double xmin = (this->WindowCenter[0]-1.0)*width;
    double xmax = (this->WindowCenter[0]+1.0)*width;
    double ymin = (this->WindowCenter[1]-1.0)*height;
    double ymax = (this->WindowCenter[1]+1.0)*height;

    this->PerspectiveTransform->Ortho(xmin,xmax,ymin,ymax,
                                      this->ClippingRange[0],
                                      this->ClippingRange[1]);

Note that this leads to an orthographic view with height
  
  ymax - ymin
  = (WC[1]+1)*PS - (WC[1]-1)*PS
  = PS*WC[1] + PS - PS*WC[1] + PS
  = 2 * ParallelScale

So even though the parallel scale value is indeed taken as viewport height the computed orthographic projection results in a view twice as high.
(0021501)
jjinnsoft   
2010-07-27 15:56   
I also ran into this. I'm trying to capture 2D images with a specific dots per inch (the 3D model is in real-world millimeters). It seemed like my calculations to pass into this parameter were wrong by a factor of 2 and this explains why.
(0036758)
Kitware Robot   
2016-08-12 09:54   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.