Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit

Controls the selection of the slice the associated BaseRenderer will display. More...

#include <mitkSliceNavigationController.h>

Inheritance diagram for mitk::SliceNavigationController:
Collaboration diagram for mitk::SliceNavigationController:

Classes

class  GeometrySendEvent
 
class  GeometrySliceEvent
 
class  GeometryUpdateEvent
 
class  TimeGeometryEvent
 

Public Types

typedef SliceNavigationController Self
 
typedef BaseController Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
- Public Types inherited from mitk::BaseController
typedef BaseController Self
 
typedef OperationActor Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

Public Member Functions

virtual std::vector< std::string > GetClassHierarchy () const override
 
virtual const char * GetClassName () const
 
void SetInputWorldTimeGeometry (const TimeGeometry *geometry)
 Set the input world time geometry out of which the geometries for slicing will be created. More...
 
virtual const TimeGeometryGetInputWorldTimeGeometry ()
 
virtual const TimeGeometryGetCreatedWorldGeometry ()
 Access the created geometry. More...
 
virtual TimeGeometryGetCreatedWorldGeometry ()
 
 itkSetEnumMacro (ViewDirection, AnatomicalPlane)
 Set the desired view directions. More...
 
 itkGetEnumMacro (ViewDirection, AnatomicalPlane)
 
 itkSetEnumMacro (DefaultViewDirection, AnatomicalPlane)
 Set the default view direction. More...
 
 itkGetEnumMacro (DefaultViewDirection, AnatomicalPlane)
 
const char * GetViewDirectionAsString () const
 
virtual void SetViewDirectionToDefault ()
 
virtual void Update ()
 Do the actual creation and send it to the connected observers (renderers) More...
 
virtual void Update (AnatomicalPlane viewDirection, bool top=true, bool frontside=true, bool rotated=false)
 Extended version of Update, additionally allowing to specify the direction/orientation of the created geometry. More...
 
virtual void SendCreatedWorldGeometry ()
 Send the created geometry to the connected observers (renderers) More...
 
virtual void SendCreatedWorldGeometryUpdate ()
 Tell observers to re-read the currently selected 2D geometry. More...
 
virtual void SendSlice ()
 Send the currently selected slice to the connected observers (renderers) More...
 
template<typename T >
void ConnectGeometrySendEvent (T *receiver)
 
template<typename T >
void ConnectGeometryUpdateEvent (T *receiver)
 
template<typename T >
void ConnectGeometrySliceEvent (T *receiver)
 
template<typename T >
void Disconnect (T *receiver)
 
void SelectSliceByPoint (const Point3D &point)
 Positions the SNC according to the specified point. More...
 
const BaseGeometryGetCurrentGeometry3D ()
 Returns the BaseGeometry of the currently selected time step. More...
 
const PlaneGeometryGetCurrentPlaneGeometry ()
 Returns the currently selected Plane in the current BaseGeometry (if existent). More...
 
virtual void SetRenderer (BaseRenderer *_arg)
 Sets / gets the BaseRenderer associated with this SNC (if any). While the BaseRenderer is not directly used by SNC, this is a convenience method to enable BaseRenderer access via the SNC. More...
 
virtual BaseRendererGetRenderer ()
 
void ReorientSlices (const Point3D &point, const Vector3D &normal)
 Re-orients the slice stack. All slices will be oriented to the given normal vector. The given point (world coordinates) defines the selected slice. Careful: The resulting axis vectors are not clearly defined this way. If you want to define them clearly, use ReorientSlices (const Point3D &point, const Vector3D &axisVec0, const Vector3D &axisVec1). More...
 
void ReorientSlices (const Point3D &point, const Vector3D &axisVec0, const Vector3D &axisVec1)
 Re-orients the slice stack so that all planes are oriented according to the given axis vectors. The given Point eventually defines selected slice. More...
 
void ExecuteOperation (Operation *operation) override
 
virtual void SetSliceLocked (bool _arg)
 Feature option to lock planes during mouse interaction. This option flag disables the mouse event which causes the center cross to move near by. More...
 
virtual bool GetSliceLocked ()
 
virtual void SliceLockedOn ()
 
virtual void SliceLockedOff ()
 
virtual void SetSliceRotationLocked (bool _arg)
 Feature option to lock slice rotation. More...
 
virtual bool GetSliceRotationLocked ()
 
virtual void SliceRotationLockedOn ()
 
virtual void SliceRotationLockedOff ()
 
void AdjustSliceStepperRange ()
 Adjusts the numerical range of the slice stepper according to the current geometry orientation of this SNC's SlicedGeometry. More...
 
- Public Member Functions inherited from mitk::BaseController
StepperGetStepper ()
 Get the stepper through the corresponding dimension. More...
 
const StepperGetStepper () const
 
- Public Member Functions inherited from mitk::OperationActor
 itkTypeMacroNoParent (OperationActor) virtual ~OperationActor()
 

Static Public Member Functions

static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 
- Static Public Member Functions inherited from mitk::BaseController
static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 

Public Attributes

Message1< const Point3D & > SetCrosshairEvent
 

Protected Types

typedef std::map< void *, std::list< unsigned long > > ObserverTagsMapType
 

Protected Member Functions

 SliceNavigationController ()
 
 ~SliceNavigationController () override
 
void CreateWorldGeometry (bool top, bool frontside, bool rotated)
 
- Protected Member Functions inherited from mitk::BaseController
 BaseController ()
 Default Constructor. More...
 
 ~BaseController () override
 Default Destructor. More...
 

Protected Attributes

TimeGeometry::ConstPointer m_InputWorldTimeGeometry
 
TimeGeometry::Pointer m_CreatedWorldGeometry
 
AnatomicalPlane m_ViewDirection
 
AnatomicalPlane m_DefaultViewDirection
 
RenderingManager::Pointer m_RenderingManager
 
BaseRendererm_Renderer
 
bool m_BlockUpdate
 
bool m_SliceLocked
 
bool m_SliceRotationLocked
 
ObserverTagsMapType m_ReceiverToObserverTagsMap
 
- Protected Attributes inherited from mitk::BaseController
Stepper::Pointer m_Stepper
 
unsigned long m_LastUpdateTime
 

Detailed Description

Controls the selection of the slice the associated BaseRenderer will display.

A SliceNavigationController takes a TimeGeometry as input world time geometry and generates a different TimeGeometry as output, depending on the current view direction and the current time step. The TimeGeometry holds a number of SlicedGeometry3Ds and these in turn hold a series of PlaneGeometries. One of these PlaneGeometries is selected as world geometry for the BaseRenderers associated to 2D views.

The SliceNavigationController holds a Stepper, which controls the slice-selection of a single PlaneGeometry from the TimeGeometry. SliceNavigationController generates ITK events to tell observers, like a BaseRenderer, when the selected slice changes.

Example:

// Initialization
// Tell the navigation controller the geometry to be sliced
// (with geometry a BaseGeometry::ConstPointer)
sliceCtrl->SetInputWorldTimeGeometry(geometry.GetPointer());
// Tell the navigation controller in which direction it shall slice the data
sliceCtrl->SetViewDirection(mitk::AnatomicalPlane::Axial);
// Connect one or more BaseRenderer to this navigation controller, i.e.:
// events sent by the navigation controller when stepping through the slices
// (e.g. by sliceCtrl->GetStepper()->Next()) will be received by the BaseRenderer
// (in this example only slice-changes, see also ConnectGeometryEvents.)
sliceCtrl->ConnectGeometrySliceEvent(renderer.GetPointer());
//create a world geometry and send the information to the connected renderer(s)
sliceCtrl->Update();

You can connect visible navigation widgets to a SliceNavigationController, e.g., a QmitkSliceNavigationWidget (for Qt):

// Create the visible navigation widget (a slider with a spin-box)
QmitkSliceNavigationWidget* navigationWidget =
// Connect the navigation widget to the slice-stepper of the
// SliceNavigationController. For initialization (position, minimal and
// maximal values) the values of the SliceNavigationController are used.
// Thus, accessing methods of a navigation widget is normally not necessary,
// since everything can be set via the (Qt-independent) SliceNavigationController.
// The QmitkStepperAdapter converts the Qt-signals to Qt-independent
// itk-events.
new QmitkStepperAdapter(navigationWidget, sliceCtrl->GetStepper());

If you do not want that all renderwindows are updated when a new slice is selected, you can use a specific RenderingManager, which updates only those renderwindows that should be updated. This is sometimes useful when a 3D view does not need to be updated when the slices in some 2D views are changed.

// create a specific RenderingManager
// tell the RenderingManager to update only renderwindow1 and renderwindow2
myManager->AddRenderWindow(renderwindow1);
myManager->AddRenderWindow(renderwindow2);
// tell the SliceNavigationController of renderwindow1 and renderwindow2
// to use the specific RenderingManager instead of the global one
renderwindow1->GetSliceNavigationController()->SetRenderingManager(myManager);
renderwindow2->GetSliceNavigationController()->SetRenderingManager(myManager);

Definition at line 130 of file mitkSliceNavigationController.h.

Member Typedef Documentation

◆ ConstPointer

◆ ObserverTagsMapType

typedef std::map<void*, std::list<unsigned long> > mitk::SliceNavigationController::ObserverTagsMapType
protected

Definition at line 365 of file mitkSliceNavigationController.h.

◆ Pointer

◆ Self

◆ Superclass

Constructor & Destructor Documentation

◆ SliceNavigationController()

mitk::SliceNavigationController::SliceNavigationController ( )
protected

◆ ~SliceNavigationController()

mitk::SliceNavigationController::~SliceNavigationController ( )
overrideprotected

Member Function Documentation

◆ AdjustSliceStepperRange()

void mitk::SliceNavigationController::AdjustSliceStepperRange ( )

Adjusts the numerical range of the slice stepper according to the current geometry orientation of this SNC's SlicedGeometry.

◆ ConnectGeometrySendEvent()

template<typename T >
void mitk::SliceNavigationController::ConnectGeometrySendEvent ( T *  receiver)
inline

Definition at line 243 of file mitkSliceNavigationController.h.

◆ ConnectGeometrySliceEvent()

template<typename T >
void mitk::SliceNavigationController::ConnectGeometrySliceEvent ( T *  receiver)
inline

Definition at line 261 of file mitkSliceNavigationController.h.

◆ ConnectGeometryUpdateEvent()

template<typename T >
void mitk::SliceNavigationController::ConnectGeometryUpdateEvent ( T *  receiver)
inline

Definition at line 252 of file mitkSliceNavigationController.h.

◆ CreateWorldGeometry()

void mitk::SliceNavigationController::CreateWorldGeometry ( bool  top,
bool  frontside,
bool  rotated 
)
protected

◆ Disconnect()

template<typename T >
void mitk::SliceNavigationController::Disconnect ( T *  receiver)
inline

Definition at line 271 of file mitkSliceNavigationController.h.

◆ ExecuteOperation()

void mitk::SliceNavigationController::ExecuteOperation ( Operation operation)
overridevirtual

Reimplemented from mitk::BaseController.

◆ GetClassHierarchy()

virtual std::vector<std::string> mitk::SliceNavigationController::GetClassHierarchy ( ) const
inlineoverridevirtual

Reimplemented from mitk::BaseController.

Definition at line 134 of file mitkSliceNavigationController.h.

◆ GetClassName()

virtual const char* mitk::SliceNavigationController::GetClassName ( ) const
virtual

Reimplemented from mitk::BaseController.

◆ GetCreatedWorldGeometry() [1/2]

virtual const TimeGeometry* mitk::SliceNavigationController::GetCreatedWorldGeometry ( )
virtual

Access the created geometry.

◆ GetCreatedWorldGeometry() [2/2]

virtual TimeGeometry* mitk::SliceNavigationController::GetCreatedWorldGeometry ( )
virtual

◆ GetCurrentGeometry3D()

const BaseGeometry* mitk::SliceNavigationController::GetCurrentGeometry3D ( )

Returns the BaseGeometry of the currently selected time step.

◆ GetCurrentPlaneGeometry()

const PlaneGeometry* mitk::SliceNavigationController::GetCurrentPlaneGeometry ( )

Returns the currently selected Plane in the current BaseGeometry (if existent).

◆ GetInputWorldTimeGeometry()

virtual const TimeGeometry* mitk::SliceNavigationController::GetInputWorldTimeGeometry ( )
virtual

◆ GetRenderer()

virtual BaseRenderer* mitk::SliceNavigationController::GetRenderer ( )
virtual

◆ GetSliceLocked()

virtual bool mitk::SliceNavigationController::GetSliceLocked ( )
virtual

◆ GetSliceRotationLocked()

virtual bool mitk::SliceNavigationController::GetSliceRotationLocked ( )
virtual

◆ GetStaticNameOfClass()

static const char* mitk::SliceNavigationController::GetStaticNameOfClass ( )
inlinestatic

Definition at line 134 of file mitkSliceNavigationController.h.

◆ GetViewDirectionAsString()

const char* mitk::SliceNavigationController::GetViewDirectionAsString ( ) const

◆ itkGetEnumMacro() [1/2]

mitk::SliceNavigationController::itkGetEnumMacro ( DefaultViewDirection  ,
AnatomicalPlane   
)

◆ itkGetEnumMacro() [2/2]

mitk::SliceNavigationController::itkGetEnumMacro ( ViewDirection  ,
AnatomicalPlane   
)

◆ itkSetEnumMacro() [1/2]

mitk::SliceNavigationController::itkSetEnumMacro ( DefaultViewDirection  ,
AnatomicalPlane   
)

Set the default view direction.

This is used to re-initialize the view direction of the SNC to the default value with SetViewDirectionToDefault()

See also
ViewDirection
Update(AnatomicalPlane viewDirection, bool top = true, bool frontside = true, bool rotated = false)

◆ itkSetEnumMacro() [2/2]

mitk::SliceNavigationController::itkSetEnumMacro ( ViewDirection  ,
AnatomicalPlane   
)

Set the desired view directions.

See also
ViewDirection
Update(AnatomicalPlane viewDirection, bool top = true, bool frontside = true, bool rotated = false)

◆ New()

static Pointer mitk::SliceNavigationController::New ( )
static

◆ ReorientSlices() [1/2]

void mitk::SliceNavigationController::ReorientSlices ( const Point3D point,
const Vector3D axisVec0,
const Vector3D axisVec1 
)

Re-orients the slice stack so that all planes are oriented according to the given axis vectors. The given Point eventually defines selected slice.

◆ ReorientSlices() [2/2]

void mitk::SliceNavigationController::ReorientSlices ( const Point3D point,
const Vector3D normal 
)

Re-orients the slice stack. All slices will be oriented to the given normal vector. The given point (world coordinates) defines the selected slice. Careful: The resulting axis vectors are not clearly defined this way. If you want to define them clearly, use ReorientSlices (const Point3D &point, const Vector3D &axisVec0, const Vector3D &axisVec1).

◆ SelectSliceByPoint()

void mitk::SliceNavigationController::SelectSliceByPoint ( const Point3D point)

Positions the SNC according to the specified point.

◆ SendCreatedWorldGeometry()

virtual void mitk::SliceNavigationController::SendCreatedWorldGeometry ( )
virtual

Send the created geometry to the connected observers (renderers)

Called by Update().

◆ SendCreatedWorldGeometryUpdate()

virtual void mitk::SliceNavigationController::SendCreatedWorldGeometryUpdate ( )
virtual

Tell observers to re-read the currently selected 2D geometry.

◆ SendSlice()

virtual void mitk::SliceNavigationController::SendSlice ( )
virtual

Send the currently selected slice to the connected observers (renderers)

Called by Update().

◆ SetInputWorldTimeGeometry()

void mitk::SliceNavigationController::SetInputWorldTimeGeometry ( const TimeGeometry geometry)

Set the input world time geometry out of which the geometries for slicing will be created.

Any previous set input geometry (3D or Time) will be ignored in the future.

◆ SetRenderer()

virtual void mitk::SliceNavigationController::SetRenderer ( BaseRenderer _arg)
virtual

Sets / gets the BaseRenderer associated with this SNC (if any). While the BaseRenderer is not directly used by SNC, this is a convenience method to enable BaseRenderer access via the SNC.

◆ SetSliceLocked()

virtual void mitk::SliceNavigationController::SetSliceLocked ( bool  _arg)
virtual

Feature option to lock planes during mouse interaction. This option flag disables the mouse event which causes the center cross to move near by.

◆ SetSliceRotationLocked()

virtual void mitk::SliceNavigationController::SetSliceRotationLocked ( bool  _arg)
virtual

Feature option to lock slice rotation.

This option flag disables separately the rotation of a slice which is implemented in mitkSliceRotator.

◆ SetViewDirectionToDefault()

virtual void mitk::SliceNavigationController::SetViewDirectionToDefault ( )
virtual

◆ SliceLockedOff()

virtual void mitk::SliceNavigationController::SliceLockedOff ( )
virtual

◆ SliceLockedOn()

virtual void mitk::SliceNavigationController::SliceLockedOn ( )
virtual

◆ SliceRotationLockedOff()

virtual void mitk::SliceNavigationController::SliceRotationLockedOff ( )
virtual

◆ SliceRotationLockedOn()

virtual void mitk::SliceNavigationController::SliceRotationLockedOn ( )
virtual

◆ Update() [1/2]

virtual void mitk::SliceNavigationController::Update ( )
virtual

Do the actual creation and send it to the connected observers (renderers)

◆ Update() [2/2]

virtual void mitk::SliceNavigationController::Update ( AnatomicalPlane  viewDirection,
bool  top = true,
bool  frontside = true,
bool  rotated = false 
)
virtual

Extended version of Update, additionally allowing to specify the direction/orientation of the created geometry.

Member Data Documentation

◆ m_BlockUpdate

bool mitk::SliceNavigationController::m_BlockUpdate
protected

Definition at line 360 of file mitkSliceNavigationController.h.

◆ m_CreatedWorldGeometry

TimeGeometry::Pointer mitk::SliceNavigationController::m_CreatedWorldGeometry
protected

Definition at line 351 of file mitkSliceNavigationController.h.

◆ m_DefaultViewDirection

AnatomicalPlane mitk::SliceNavigationController::m_DefaultViewDirection
protected

Definition at line 354 of file mitkSliceNavigationController.h.

◆ m_InputWorldTimeGeometry

TimeGeometry::ConstPointer mitk::SliceNavigationController::m_InputWorldTimeGeometry
protected

Definition at line 350 of file mitkSliceNavigationController.h.

◆ m_ReceiverToObserverTagsMap

ObserverTagsMapType mitk::SliceNavigationController::m_ReceiverToObserverTagsMap
protected

Definition at line 366 of file mitkSliceNavigationController.h.

◆ m_Renderer

BaseRenderer* mitk::SliceNavigationController::m_Renderer
protected

Definition at line 358 of file mitkSliceNavigationController.h.

◆ m_RenderingManager

RenderingManager::Pointer mitk::SliceNavigationController::m_RenderingManager
protected

Definition at line 356 of file mitkSliceNavigationController.h.

◆ m_SliceLocked

bool mitk::SliceNavigationController::m_SliceLocked
protected

Definition at line 362 of file mitkSliceNavigationController.h.

◆ m_SliceRotationLocked

bool mitk::SliceNavigationController::m_SliceRotationLocked
protected

Definition at line 363 of file mitkSliceNavigationController.h.

◆ m_ViewDirection

AnatomicalPlane mitk::SliceNavigationController::m_ViewDirection
protected

Definition at line 353 of file mitkSliceNavigationController.h.

◆ SetCrosshairEvent

Message1<const Point3D&> mitk::SliceNavigationController::SetCrosshairEvent

Definition at line 284 of file mitkSliceNavigationController.h.


The documentation for this class was generated from the following file:
QmitkStepperAdapter
Helper class to connect Qt-based navigators to instances of Stepper.
Definition: QmitkStepperAdapter.h:32
itk::SmartPointer< Self >
mitk::AnatomicalPlane::Axial
@ Axial
mitk::RenderingManager::New
static Pointer New()
QmitkSliceNavigationWidget
Definition: QmitkSliceNavigationWidget.h:24
mitk::SliceNavigationController::New
static Pointer New()