| 316 | } |
| 317 | |
| 318 | void mitk::CameraController::Fit() |
| 319 | { |
| 320 | if (this->GetRenderer()->GetMapperID() == BaseRenderer::Standard2D) |
| 321 | { |
| 322 | this->GetRenderer()->GetVtkRenderer()->GetActiveCamera()->SetParallelScale(ComputeMaxParallelScale()); |
| 323 | |
| 324 | this->GetRenderer()->GetVtkRenderer()->GetActiveCamera()->SetClippingRange(0.1, 1000000); |
| 325 | // Reason for huge range: VTK seems to calculate the clipping planes wrong for small values. See VTK bug (id #7823) |
| 326 | // in VTK bugtracker. |
| 327 | |
| 328 | Point2D planePoint; |
| 329 | planePoint[0] = this->GetRenderer()->GetCurrentWorldPlaneGeometry()->GetExtentInMM(0) * 0.5; |
| 330 | planePoint[1] = this->GetRenderer()->GetCurrentWorldPlaneGeometry()->GetExtentInMM(1) * 0.5; |
| 331 | MoveCameraToPoint(planePoint); |
| 332 | } |
| 333 | } |
| 334 | |
| 335 | void mitk::CameraController::SetScaleFactorInMMPerDisplayUnit(ScalarType scale) |
| 336 | { |
no test coverage detected