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

Method InternalViewInitialization

Modules/Core/src/Controllers/mitkRenderingManager.cpp:454–484  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

452 }
453
454 void RenderingManager::InternalViewInitialization(BaseRenderer *baseRenderer, const TimeGeometry *geometry,
455 bool boundingBoxInitialized, int mapperID, bool resetCamera)
456 {
457 SliceNavigationController *nc = baseRenderer->GetSliceNavigationController();
458 nc->SetViewDirectionToDefault();
459
460 if (boundingBoxInitialized)
461 {
462 // Set geometry for NC
463 nc->SetInputWorldTimeGeometry(geometry);
464 nc->Update();
465
466 if (resetCamera)
467 {
468 if (mapperID == BaseRenderer::Standard2D)
469 {
470 // For 2D SNCs, steppers are set so that the cross is centered in the image
471 nc->GetStepper()->SetPos(nc->GetStepper()->GetSteps() / 2);
472 baseRenderer->GetCameraController()->Fit();
473 }
474 else if (mapperID == BaseRenderer::Standard3D)
475 {
476 baseRenderer->GetCameraController()->SetViewToAnterior();
477 }
478 }
479 }
480 else
481 {
482 nc->Update();
483 }
484 }
485
486 bool RenderingManager::ExtendGeometryForBoundingBox(const TimeGeometry *geometry,
487 TimeGeometry::Pointer& modifiedGeometry)

Callers 2

InitializeViewsMethod · 0.95
InitializeViewMethod · 0.95

Calls 8

GetStepperMethod · 0.80
SetViewToAnteriorMethod · 0.80
UpdateMethod · 0.45
SetPosMethod · 0.45
FitMethod · 0.45

Tested by

no test coverage detected