Medical Imaging Interaction Toolkit  2018.4.99-6a3ea89d
Medical Imaging Interaction Toolkit
mitkMultiStepper.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef MULTISTEPPER_H_HEADER_INCLUDED
14 #define MULTISTEPPER_H_HEADER_INCLUDED
15 
17 #include "mitkCommon.h"
18 #include "mitkStepper.h"
19 #include "mitkVector.h"
20 #include <itkObject.h>
21 #include <itkObjectFactory.h>
22 #include <set>
23 
24 namespace mitk
25 {
26  //##Documentation
27  //## @brief Helper class to step through a list
28  //##
29  //## A helper class to step through a list. Does not contain the list, just the
30  //## position in the list (between 0 and GetSteps()). Provides methods like
31  //## First (go to the first element), Next (go to the next one), etc.
32  //## @ingroup NavigationControl
34  {
35  public:
37  itkFactorylessNewMacro(Self);
38  itkCloneMacro(Self) void AddStepper(Stepper::Pointer stepper, unsigned int repeat = 1);
39  void RemoveStepper(Stepper::Pointer stepper, unsigned int repeat = 1);
40  /*void Next();
41  void Previous();
42  void First();
43  void Last(); */
44  // unsigned int GetPos();
45  void SetPos(unsigned int pos) override;
46  void SetSteps(const unsigned int steps) override;
47 
48  protected:
49  MultiStepper();
50  ~MultiStepper() override;
51  typedef std::set<Stepper::Pointer> StepperSet;
52  typedef std::map<Stepper::Pointer, unsigned int> ScaleFactorMap;
53  StepperSet m_SubSteppers;
54  ScaleFactorMap m_ScaleFactors;
56  void UpdateStepCount();
57  };
58 
59 } // namespace mitk
60 
61 #endif /* MULTISTEPPER_H_HEADER_INCLUDED */
Helper class to step through a list.
#define MITKDATATYPESEXT_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
Stepper::Pointer m_LargestRangeStepper
ScaleFactorMap m_ScaleFactors
std::set< Stepper::Pointer > StepperSet
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Helper class to step through a list.
Definition: mitkStepper.h:47
StepperSet m_SubSteppers
std::map< Stepper::Pointer, unsigned int > ScaleFactorMap