View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001432VTK(No Category)public2004-12-15 11:222016-08-12 09:54
ReporterKatharina.Quintus 
Assigned ToKitware Robot 
PrioritylowSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001432: documentation of method SetParallelScale of vtkCamera not correct?
DescriptionThe 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."
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0016856)
Paul Melis (reporter)
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 (reporter)
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 (administrator)
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.

 Issue History
Date Modified Username Field Change
2008-11-30 09:20 Mathieu Malaterre Assigned To Mathieu Malaterre => François Bertel
2008-11-30 20:17 François Bertel Assigned To François Bertel =>
2009-07-14 04:25 Paul Melis Note Added: 0016856
2010-07-27 15:56 jjinnsoft Note Added: 0021501
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2016-08-12 09:54 Kitware Robot Note Added: 0036758
2016-08-12 09:54 Kitware Robot Status expired => closed
2016-08-12 09:54 Kitware Robot Resolution open => moved
2016-08-12 09:54 Kitware Robot Assigned To => Kitware Robot


Copyright © 2000 - 2018 MantisBT Team