|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Helper class to step through a list. More...
#include <mitkStepper.h>


Public Member Functions | |
| mitkClassMacroItkParent (Stepper, itk::Object) | |
| Pointer | Clone () const |
| virtual unsigned int | GetPos () const |
| virtual void | SetPos (unsigned int pos) |
| Set the current position, clamped to [0, GetSteps()-1]. More... | |
| virtual unsigned int | GetSteps () const |
| virtual void | SetSteps (unsigned int _arg) |
| 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 () |
Protected Member Functions | |
| 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 | |
| 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 |
Helper class to step through a list.
A helper class to step through a list. Does not contain the list, just the position in the list (between 0 and GetSteps()). Provides methods like First (go to the first element), Next (go to the next one), etc.
Besides the actual number of steps, the stepper can also hold a stepping range, indicating the scalar values corresponding to the covered steps. For example, steppers are generally used to slice a dataset with a plane; Hereby, Steps indicates the total number of steps (positions) available for the plane, Pos indicates the current step, and Range indicates the physical minimum and maximum values for the plane, in this case a value in mm.
The range can also be supplied with a unit name (a string) which can be used by classes providing information about the stepping (e.g. graphical sliders).
Definition at line 47 of file mitkStepper.h.
|
protected |
|
overrideprotected |
|
virtual |
|
virtual |
| Pointer mitk::Stepper::Clone | ( | ) | const |
|
protected |
Decrement position by one, respecting AutoRepeat and PingPong.
|
virtual |
Go to the first position (index 0).
|
virtual |
|
virtual |
|
virtual |
|
virtual |
| ScalarType mitk::Stepper::GetRangeMax | ( | ) | const |
Get the maximum value of the range.
| ScalarType mitk::Stepper::GetRangeMin | ( | ) | const |
Get the minimum value of the range.
|
virtual |
| const char* mitk::Stepper::GetUnitName | ( | ) | const |
Get the unit name string.
| bool mitk::Stepper::HasRange | ( | ) | const |
Check whether a range has been set (may or may not be valid).
| bool mitk::Stepper::HasUnitName | ( | ) | const |
Check whether a unit name has been set.
| bool mitk::Stepper::HasValidRange | ( | ) | const |
Check whether the range has been set and is currently valid.
|
protected |
Increment position by one, respecting AutoRepeat and PingPong.
| void mitk::Stepper::InvalidateRange | ( | ) |
Mark the current range as invalid while keeping the range itself.
|
virtual |
|
virtual |
|
virtual |
Go to the last position (index GetSteps() - 1).
| mitk::Stepper::mitkClassMacroItkParent | ( | Stepper | , |
| itk::Object | |||
| ) |
|
virtual |
Move the position by a given delta (positive or negative).
Respects AutoRepeat wrapping. If the resulting position would be negative, it is clamped to 0 (unless AutoRepeat is on).
| [in] | sliceDelta | Number of steps to move (can be negative). |
|
static |
|
virtual |
Advance to the next position in the list.
Respects AutoRepeat, PingPong, and InverseDirection settings.
|
virtual |
|
virtual |
|
virtual |
Go to the previous position in the list.
Respects AutoRepeat, PingPong, and InverseDirection settings.
| void mitk::Stepper::RemoveRange | ( | ) |
Remove the range entirely.
| void mitk::Stepper::RemoveUnitName | ( | ) |
Remove the unit name.
|
virtual |
|
virtual |
If set to true, the Next() decreases the stepper and Previous() decreases it
|
virtual |
Causes the stepper to shift direction when the boundary is reached
|
inlinevirtual |
Set the current position, clamped to [0, GetSteps()-1].
| [in] | pos | The desired position. |
Reimplemented in mitk::MultiStepper.
Definition at line 58 of file mitkStepper.h.
| void mitk::Stepper::SetRange | ( | ScalarType | min, |
| ScalarType | max | ||
| ) |
Set the scalar range (min/max) corresponding to the step positions.
| [in] | min | The minimum scalar value. |
| [in] | max | The maximum scalar value. |
|
virtual |
Reimplemented in mitk::MultiStepper.
| void mitk::Stepper::SetUnitName | ( | const char * | unitName | ) |
Set the unit name string (e.g. "mm") for the stepping range.
| [in] | unitName | The unit name string. |
|
protected |
Definition at line 173 of file mitkStepper.h.
|
protected |
Definition at line 181 of file mitkStepper.h.
|
protected |
Definition at line 184 of file mitkStepper.h.
|
protected |
Definition at line 176 of file mitkStepper.h.
|
protected |
Definition at line 175 of file mitkStepper.h.
|
protected |
Definition at line 169 of file mitkStepper.h.
|
protected |
Definition at line 179 of file mitkStepper.h.
|
protected |
Definition at line 178 of file mitkStepper.h.
|
protected |
Definition at line 180 of file mitkStepper.h.
|
protected |
Definition at line 171 of file mitkStepper.h.
|
protected |
Definition at line 183 of file mitkStepper.h.