MCPcopy Create free account
hub / github.com/MITK/MITK / GetScaleFactorMMPerDisplayUnit

Method GetScaleFactorMMPerDisplayUnit

Modules/Core/src/Rendering/mitkBaseRenderer.cpp:634–644  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

632}
633
634double mitk::BaseRenderer::GetScaleFactorMMPerDisplayUnit() const
635{
636 if (this->GetMapperID() == BaseRenderer::Standard2D)
637 {
638 // GetParallelScale returns half of the height of the render window in mm.
639 // Divided by the half size of the Display size in pixel givest the mm per pixel.
640 return this->GetVtkRenderer()->GetActiveCamera()->GetParallelScale() * 2.0 / GetViewportSize()[1];
641 }
642 else
643 return 1.0;
644}
645
646mitk::Point2D mitk::BaseRenderer::GetDisplaySizeInMM() const
647{

Callers 6

DrawHelperLinesMethod · 0.80
MoveMethod · 0.80
CreateVtkCrosshairMethod · 0.80
CheckOverHandlesMethod · 0.80

Calls 1

GetVtkRendererMethod · 0.45

Tested by

no test coverage detected