Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::TimeNavigationController Class Reference

Controls the time-related properties of the time stepper, according to the given input world time geometry. More...

#include <mitkTimeNavigationController.h>

Inheritance diagram for mitk::TimeNavigationController:
Collaboration diagram for mitk::TimeNavigationController:

Classes

class  TimeEvent
 ITK event that carries the currently selected time step. More...
 

Public Member Functions

 mitkClassMacro (TimeNavigationController, BaseController)
 
void SetInputWorldTimeGeometry (const TimeGeometry *geometry)
 Set the input time geometry out of which the time-related properties will be generated. More...
 
virtual const mitk::TimeGeometry * GetInputWorldTimeGeometry ()
 
virtual void Update ()
 Do the actual time-related properties extraction and send the currently selected time step to the connected observers (renderers). More...
 
virtual void SendTime ()
 Send the currently selected time step to the connected observers (renderers). More...
 
template<typename T >
void ConnectTimeEvent (T *receiver)
 Connect a receiver to TimeEvent notifications. More...
 
template<typename T >
void Disconnect (T *receiver)
 Disconnect a receiver from TimeEvent notifications. More...
 
TimeStepType GetSelectedTimeStep () const
 Convenience method that returns the time step currently selected by the controller. More...
 
TimePointType GetSelectedTimePoint () const
 Convenience method that returns the time point that corresponds to the selected time step. The conversion is done using the time geometry of the controller. If the time geometry is not yet set, this function will always return 0.0. More...
 
- Public Member Functions inherited from mitk::BaseController
 mitkClassMacroItkParent (BaseController, OperationActor)
 
Stepper * GetStepper ()
 Get the stepper for stepping through the controlled dimension. More...
 
const Stepper * GetStepper () const
 Get the stepper for stepping through the controlled dimension (const). More...
 
- Public Member Functions inherited from mitk::OperationActor
 itkTypeMacroNoParent (OperationActor) virtual ~OperationActor()
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from mitk::BaseController
static Pointer New ()
 

Protected Types

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

Protected Member Functions

 TimeNavigationController ()
 
 ~TimeNavigationController () override
 
- Protected Member Functions inherited from mitk::BaseController
 BaseController ()
 Default constructor. More...
 
 ~BaseController () override
 Destructor. More...
 
void ExecuteOperation (Operation *) override
 Execute an undo/redo operation. More...
 

Protected Attributes

TimeGeometry::ConstPointer m_InputWorldTimeGeometry
 
bool m_BlockUpdate
 
ObserverTagsMapType m_ReceiverToObserverTagsMap
 
- Protected Attributes inherited from mitk::BaseController
Stepper::Pointer m_Stepper
 Stepper through the controlled dimension. More...
 
unsigned long m_LastUpdateTime
 Timestamp of the last update. More...
 

Detailed Description

Controls the time-related properties of the time stepper, according to the given input world time geometry.

A TimeNavigationController takes a TimeGeometry as input world time geometry and sets the properties of the associated stepper (BaseController). The time-related properties are:

  • steps: the number of input time steps
  • pos: the current time step / position of the stepper
  • range: the time bounds for the slider (minimum, maximum)

The timestep controls the selection of a specific time point from the TimeGeometry. The TimeNavigationController generates ITK events to tell observers, like a BaseRenderer, when the selected timestep changes.

Example:

// Initialize the time navigation controller.
// Set the required input world time geometry (a TimeGeometry::ConstPointer).
timeCtrl->SetInputWorldTimeGeometry(geometry.GetPointer());
// Set the time-related properties and send the information to the connected renderer(s).
timeCtrl->Update();

Visible navigation widgets can be connected to a TimeNavigationController, e.g., a QmitkSliceNavigationWidget (for Qt):

// Create the visible navigation widget (a slider with a spin-box).
// Connect the navigation widget to the time-stepper of the
// TimeNavigationController. For initialization (timestep, minimal and
// maximal values) the values of the TimeNavigationController are used.
// Thus, accessing methods of a navigation widget is normally not necessary,
// since everything can be set via the (Qt-independent) TimeNavigationController.
// The QmitkStepperAdapter converts the Qt-signals to Qt-independent
// itk-events.
new QmitkStepperAdapter(navigationWidget, timeCtrl->GetStepper());
Helper class to connect Qt-based navigators to instances of Stepper.

Definition at line 69 of file mitkTimeNavigationController.h.

Member Typedef Documentation

◆ ObserverTagsMapType

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

Definition at line 192 of file mitkTimeNavigationController.h.

Constructor & Destructor Documentation

◆ TimeNavigationController()

mitk::TimeNavigationController::TimeNavigationController ( )
protected

◆ ~TimeNavigationController()

mitk::TimeNavigationController::~TimeNavigationController ( )
overrideprotected

Member Function Documentation

◆ ConnectTimeEvent()

template<typename T >
void mitk::TimeNavigationController::ConnectTimeEvent ( T *  receiver)
inline

Connect a receiver to TimeEvent notifications.

The receiver must implement a SetGeometryTime() member function that accepts an itk::EventObject.

Template Parameters
TThe receiver type.
Parameters
[in]receiverThe object to connect. Must not be nullptr.

Definition at line 139 of file mitkTimeNavigationController.h.

◆ Disconnect()

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

Disconnect a receiver from TimeEvent notifications.

Removes all observer tags associated with the given receiver. If the receiver was not connected, this method does nothing.

Template Parameters
TThe receiver type.
Parameters
[in]receiverThe object to disconnect.

Definition at line 158 of file mitkTimeNavigationController.h.

◆ GetInputWorldTimeGeometry()

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

◆ GetSelectedTimePoint()

TimePointType mitk::TimeNavigationController::GetSelectedTimePoint ( ) const

Convenience method that returns the time point that corresponds to the selected time step. The conversion is done using the time geometry of the controller. If the time geometry is not yet set, this function will always return 0.0.

◆ GetSelectedTimeStep()

TimeStepType mitk::TimeNavigationController::GetSelectedTimeStep ( ) const

Convenience method that returns the time step currently selected by the controller.

◆ mitkClassMacro()

mitk::TimeNavigationController::mitkClassMacro ( TimeNavigationController  ,
BaseController   
)

◆ New()

static Pointer mitk::TimeNavigationController::New ( )
static

◆ SendTime()

virtual void mitk::TimeNavigationController::SendTime ( )
virtual

Send the currently selected time step to the connected observers (renderers).

Called by Update().

◆ SetInputWorldTimeGeometry()

void mitk::TimeNavigationController::SetInputWorldTimeGeometry ( const TimeGeometry *  geometry)

Set the input time geometry out of which the time-related properties will be generated.

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

◆ Update()

virtual void mitk::TimeNavigationController::Update ( )
virtual

Do the actual time-related properties extraction and send the currently selected time step to the connected observers (renderers).

Member Data Documentation

◆ m_BlockUpdate

bool mitk::TimeNavigationController::m_BlockUpdate
protected

Definition at line 190 of file mitkTimeNavigationController.h.

◆ m_InputWorldTimeGeometry

TimeGeometry::ConstPointer mitk::TimeNavigationController::m_InputWorldTimeGeometry
protected

Definition at line 188 of file mitkTimeNavigationController.h.

◆ m_ReceiverToObserverTagsMap

ObserverTagsMapType mitk::TimeNavigationController::m_ReceiverToObserverTagsMap
protected

Definition at line 193 of file mitkTimeNavigationController.h.


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