20 #include <itkObject.h>
21 #include <itkObjectFactory.h>
51 itkFactorylessNewMacro(Self);
53 itkGetConstMacro(Pos,
unsigned int);
58 virtual void SetPos(
unsigned int pos)
63 newPos = (pos > m_Steps - 1 ? m_Steps - 1 : pos);
70 if (this->m_Pos != newPos)
77 itkGetConstMacro(Steps,
unsigned int);
78 itkSetMacro(Steps,
unsigned int);
80 itkGetConstMacro(AutoRepeat,
bool);
81 itkSetMacro(AutoRepeat,
bool);
82 itkBooleanMacro(AutoRepeat);
85 itkSetMacro(PingPong,
bool);
86 itkGetConstMacro(PingPong,
bool);
87 itkBooleanMacro(PingPong);
91 itkSetMacro(InverseDirection,
bool);
92 itkGetConstMacro(InverseDirection,
bool);
93 itkBooleanMacro(InverseDirection);
Helper class to step through a list.
bool HasValidRange() const
Check whether the range has been set and is currently valid.
virtual void SetPos(unsigned int pos)
Set the current position, clamped to [0, GetSteps()-1].
virtual void MoveSlice(int sliceDelta)
Move the position by a given delta (positive or negative).
void SetUnitName(const char *unitName)
Set the unit name string (e.g. "mm") for the stepping range.
mitkClassMacroItkParent(Stepper, itk::Object)
void Increase()
Increment position by one, respecting AutoRepeat and PingPong.
virtual void Previous()
Go to the previous position in the list.
ScalarType GetRangeMin() const
Get the minimum value of the range.
virtual void First()
Go to the first position (index 0).
void InvalidateRange()
Mark the current range as invalid while keeping the range itself.
bool HasRange() const
Check whether a range has been set (may or may not be valid).
const char * GetUnitName() const
Get the unit name string.
void RemoveUnitName()
Remove the unit name.
void Decrease()
Decrement position by one, respecting AutoRepeat and PingPong.
virtual void Last()
Go to the last position (index GetSteps() - 1).
void SetRange(ScalarType min, ScalarType max)
Set the scalar range (min/max) corresponding to the step positions.
ScalarType GetRangeMax() const
Get the maximum value of the range.
void RemoveRange()
Remove the range entirely.
virtual void Next()
Advance to the next position in the list.
bool HasUnitName() const
Check whether a unit name has been set.
Convenience header that includes all MITK numeric types.
Find image slices visible on a given plane.
double ScalarType
Scalar type used throughout MITK for geometric computations.