Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit

Coordinates multiple Stepper instances to step through in parallel. More...

#include <mitkMultiStepper.h>

Inheritance diagram for mitk::MultiStepper:
Collaboration diagram for mitk::MultiStepper:

Public Member Functions

 mitkClassMacro (MultiStepper, Stepper)
 
Pointer Clone () const
 
void AddStepper (Stepper::Pointer stepper, unsigned int repeat=1)
 Add a sub-stepper with an optional repeat factor. More...
 
void RemoveStepper (Stepper::Pointer stepper, unsigned int repeat=1)
 Remove a sub-stepper. More...
 
void SetPos (unsigned int pos) override
 Set the position and synchronize all sub-steppers. More...
 
void SetSteps (const unsigned int steps) override
 Setting steps directly is not supported; triggers an assertion. More...
 
- Public Member Functions inherited from mitk::Stepper
 mitkClassMacroItkParent (Stepper, itk::Object)
 
Pointer Clone () const
 
virtual unsigned int GetPos () const
 
virtual unsigned int GetSteps () const
 
virtual bool GetAutoRepeat () const
 
virtual void SetAutoRepeat (bool _arg)
 
virtual void AutoRepeatOn ()
 
virtual void AutoRepeatOff ()
 
virtual void SetPingPong (bool _arg)
 
virtual bool GetPingPong () const
 
virtual void PingPongOn ()
 
virtual void PingPongOff ()
 
virtual void SetInverseDirection (bool _arg)
 
virtual bool GetInverseDirection () const
 
virtual void InverseDirectionOn ()
 
virtual void InverseDirectionOff ()
 
void SetRange (ScalarType min, ScalarType max)
 Set the scalar range (min/max) corresponding to the step positions. More...
 
void InvalidateRange ()
 Mark the current range as invalid while keeping the range itself. More...
 
ScalarType GetRangeMin () const
 Get the minimum value of the range. More...
 
ScalarType GetRangeMax () const
 Get the maximum value of the range. More...
 
bool HasValidRange () const
 Check whether the range has been set and is currently valid. More...
 
void RemoveRange ()
 Remove the range entirely. More...
 
bool HasRange () const
 Check whether a range has been set (may or may not be valid). More...
 
void SetUnitName (const char *unitName)
 Set the unit name string (e.g. "mm") for the stepping range. More...
 
const char * GetUnitName () const
 Get the unit name string. More...
 
void RemoveUnitName ()
 Remove the unit name. More...
 
bool HasUnitName () const
 Check whether a unit name has been set. More...
 
virtual void Next ()
 Advance to the next position in the list. More...
 
virtual void Previous ()
 Go to the previous position in the list. More...
 
virtual void MoveSlice (int sliceDelta)
 Move the position by a given delta (positive or negative). More...
 
virtual void First ()
 Go to the first position (index 0). More...
 
virtual void Last ()
 Go to the last position (index GetSteps() - 1). More...
 

Static Public Member Functions

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

Protected Types

typedef std::set< Stepper::Pointer > StepperSet
 
typedef std::map< Stepper::Pointer, unsigned int > ScaleFactorMap
 

Protected Member Functions

 MultiStepper ()
 
 ~MultiStepper () override
 
void UpdateStepCount ()
 
- Protected Member Functions inherited from mitk::Stepper
 Stepper ()
 
 ~Stepper () override
 
void Increase ()
 Increment position by one, respecting AutoRepeat and PingPong. More...
 
void Decrease ()
 Decrement position by one, respecting AutoRepeat and PingPong. More...
 

Protected Attributes

StepperSet m_SubSteppers
 
ScaleFactorMap m_ScaleFactors
 
Stepper::Pointer m_LargestRangeStepper
 
- Protected Attributes inherited from mitk::Stepper
unsigned int m_Pos
 
unsigned int m_Steps
 
bool m_AutoRepeat
 
bool m_PingPong
 
bool m_InverseDirection
 
ScalarType m_RangeMin
 
ScalarType m_RangeMax
 
bool m_RangeValid
 
bool m_HasRange
 
std::string m_UnitName
 
bool m_HasUnitName
 

Detailed Description

Coordinates multiple Stepper instances to step through in parallel.

A MultiStepper aggregates several sub-steppers and synchronizes their positions. When the MultiStepper's position is set, each sub-stepper is moved proportionally according to its range and repeat factor. The total step count is determined by the sub-stepper with the largest effective range.

See also
Stepper

Definition at line 38 of file mitkMultiStepper.h.

Member Typedef Documentation

◆ ScaleFactorMap

typedef std::map<Stepper::Pointer, unsigned int> mitk::MultiStepper::ScaleFactorMap
protected

Definition at line 86 of file mitkMultiStepper.h.

◆ StepperSet

typedef std::set<Stepper::Pointer> mitk::MultiStepper::StepperSet
protected

Definition at line 85 of file mitkMultiStepper.h.

Constructor & Destructor Documentation

◆ MultiStepper()

mitk::MultiStepper::MultiStepper ( )
protected

◆ ~MultiStepper()

mitk::MultiStepper::~MultiStepper ( )
overrideprotected

Member Function Documentation

◆ AddStepper()

void mitk::MultiStepper::AddStepper ( Stepper::Pointer  stepper,
unsigned int  repeat = 1 
)

Add a sub-stepper with an optional repeat factor.

The effective range of the stepper is its step count multiplied by the repeat factor.

Parameters
[in]stepperThe stepper to add.
[in]repeatThe repeat (scale) factor (default 1).

◆ Clone()

Pointer mitk::MultiStepper::Clone ( ) const

◆ mitkClassMacro()

mitk::MultiStepper::mitkClassMacro ( MultiStepper  ,
Stepper   
)

◆ New()

static Pointer mitk::MultiStepper::New ( )
static

◆ RemoveStepper()

void mitk::MultiStepper::RemoveStepper ( Stepper::Pointer  stepper,
unsigned int  repeat = 1 
)

Remove a sub-stepper.

Parameters
[in]stepperThe stepper to remove.
[in]repeatNot used; kept for API compatibility.

◆ SetPos()

void mitk::MultiStepper::SetPos ( unsigned int  pos)
overridevirtual

Set the position and synchronize all sub-steppers.

Each sub-stepper is moved proportionally to its range.

Parameters
[in]posThe new position.

Reimplemented from mitk::Stepper.

◆ SetSteps()

void mitk::MultiStepper::SetSteps ( const unsigned int  steps)
overridevirtual

Setting steps directly is not supported; triggers an assertion.

The step count is determined automatically from the sub-steppers.

Parameters
[in]stepsIgnored.

Reimplemented from mitk::Stepper.

◆ UpdateStepCount()

void mitk::MultiStepper::UpdateStepCount ( )
protected

Member Data Documentation

◆ m_LargestRangeStepper

Stepper::Pointer mitk::MultiStepper::m_LargestRangeStepper
protected

Definition at line 89 of file mitkMultiStepper.h.

◆ m_ScaleFactors

ScaleFactorMap mitk::MultiStepper::m_ScaleFactors
protected

Definition at line 88 of file mitkMultiStepper.h.

◆ m_SubSteppers

StepperSet mitk::MultiStepper::m_SubSteppers
protected

Definition at line 87 of file mitkMultiStepper.h.


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