Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitk::RenderWindowViewDirectionController Class Reference

#include <mitkRenderWindowViewDirectionController.h>

Public Types

using ViewDirection = mitk::SliceNavigationController::ViewDirection
 

Public Member Functions

 RenderWindowViewDirectionController ()
 
void SetDataStorage (DataStorage::Pointer dataStorage)
 Set the data storage on which to work. More...
 
void SetControlledRenderer (RenderWindowLayerUtilities::RendererVector controlledRenderer)
 Set the controlled base renderer. More...
 
void SetViewDirectionOfRenderer (const std::string &viewDirection, BaseRenderer *renderer=nullptr)
 Set the view direction for the given renderer (nullptr = all renderer) More...
 
void SetViewDirectionOfRenderer (ViewDirection viewDirection, BaseRenderer *renderer=nullptr)
 Set the view direction for the given renderer (nullptr = all renderer) More...
 
void InitializeViewByBoundingObjects (const BaseRenderer *renderer)
 Reinitialize the given renderer with the currently visible nodes. More...
 

Detailed Description

The RenderWindowViewDirectionController is used to manipulate the 'sliceNavigationController' of a given base renderer. The 'sliceNavigationController' is used to set the view direction / camera perspective of a base renderer. The view direction can changed to 'mitk::SliceNavigationController::Axial', 'mitk::SliceNavigationController::Frontal' or 'mitk::SliceNavigationController::Sagittal'.

Functions with 'mitk::BaseRenderer* renderer' have 'nullptr' as their default argument. Using the nullptr these functions operate on all base renderer. Giving a specific base renderer will modify the view direction only for the given renderer.

Definition at line 35 of file mitkRenderWindowViewDirectionController.h.

Member Typedef Documentation

◆ ViewDirection

Constructor & Destructor Documentation

◆ RenderWindowViewDirectionController()

mitk::RenderWindowViewDirectionController::RenderWindowViewDirectionController ( )

Definition at line 20 of file mitkRenderWindowViewDirectionController.cpp.

Member Function Documentation

◆ InitializeViewByBoundingObjects()

void mitk::RenderWindowViewDirectionController::InitializeViewByBoundingObjects ( const BaseRenderer renderer)

Reinitialize the given renderer with the currently visible nodes.

Parameters
rendererPointer to the renderer instance for which the view direction should be changed. If it is a nullptr (default) all controlled renderer will be affected.

Definition at line 110 of file mitkRenderWindowViewDirectionController.cpp.

References mitk::RenderingManager::GetInstance(), mitk::BaseRenderer::GetRenderWindow(), mitk::RenderingManager::InitializeView(), mitk::BoolProperty::New(), mitk::NodePredicateNot::New(), mitk::NodePredicateAnd::New(), and mitk::NodePredicateProperty::New().

Referenced by SetViewDirectionOfRenderer().

◆ SetControlledRenderer()

void mitk::RenderWindowViewDirectionController::SetControlledRenderer ( RenderWindowLayerUtilities::RendererVector  controlledRenderer)

Set the controlled base renderer.

Definition at line 35 of file mitkRenderWindowViewDirectionController.cpp.

◆ SetDataStorage()

void mitk::RenderWindowViewDirectionController::SetDataStorage ( DataStorage::Pointer  dataStorage)

Set the data storage on which to work.

Definition at line 26 of file mitkRenderWindowViewDirectionController.cpp.

◆ SetViewDirectionOfRenderer() [1/2]

void mitk::RenderWindowViewDirectionController::SetViewDirectionOfRenderer ( const std::string &  viewDirection,
BaseRenderer renderer = nullptr 
)

Set the view direction for the given renderer (nullptr = all renderer)

Parameters
viewDirectionThe view direction that should be used for this renderer as a string. Currently "axial", "coronal" and "sagittal" is supported.
rendererPointer to the renderer instance for which the view direction should be changed. If it is a nullptr (default) all controlled renderer will be affected.

Definition at line 44 of file mitkRenderWindowViewDirectionController.cpp.

References mitk::BaseRenderer::GetSliceNavigationController(), InitializeViewByBoundingObjects(), mitk::BaseRenderer::SetMapperID(), mitk::BaseRenderer::Standard2D, and mitk::BaseRenderer::Standard3D.

Referenced by SetViewDirectionOfRenderer().

◆ SetViewDirectionOfRenderer() [2/2]

void mitk::RenderWindowViewDirectionController::SetViewDirectionOfRenderer ( ViewDirection  viewDirection,
BaseRenderer renderer = nullptr 
)

Set the view direction for the given renderer (nullptr = all renderer)

Parameters
viewDirectionThe view direction that should be used for this renderer.
rendererPointer to the renderer instance for which the view direction should be changed. If it is a nullptr (default) nothing happens.

Definition at line 87 of file mitkRenderWindowViewDirectionController.cpp.

References mitk::BaseRenderer::GetSliceNavigationController(), InitializeViewByBoundingObjects(), and SetViewDirectionOfRenderer().


The documentation for this class was generated from the following files: