Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MULTISTEPPER_H_HEADER_INCLUDED
18 #define MULTISTEPPER_H_HEADER_INCLUDED
19 
21 #include "mitkCommon.h"
22 #include "mitkStepper.h"
23 #include "mitkVector.h"
24 #include <itkObject.h>
25 #include <itkObjectFactory.h>
26 #include <set>
27 
28 namespace mitk
29 {
30  //##Documentation
31  //## @brief Helper class to step through a list
32  //##
33  //## A helper class to step through a list. Does not contain the list, just the
34  //## position in the list (between 0 and GetSteps()). Provides methods like
35  //## First (go to the first element), Next (go to the next one), etc.
36  //## @ingroup NavigationControl
38  {
39  public:
41  itkFactorylessNewMacro(Self) itkCloneMacro(Self) void AddStepper(Stepper::Pointer stepper, unsigned int repeat = 1);
42  void RemoveStepper(Stepper::Pointer stepper, unsigned int repeat = 1);
43  /*void Next();
44  void Previous();
45  void First();
46  void Last(); */
47  // unsigned int GetPos();
48  void SetPos(unsigned int pos) override;
49  void SetSteps(const unsigned int steps) override;
50 
51  protected:
52  MultiStepper();
53  virtual ~MultiStepper();
54  typedef std::set<Stepper::Pointer> StepperSet;
55  typedef std::map<Stepper::Pointer, unsigned int> ScaleFactorMap;
56  StepperSet m_SubSteppers;
57  ScaleFactorMap m_ScaleFactors;
59  void UpdateStepCount();
60  };
61 
62 } // namespace mitk
63 
64 #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:44
Helper class to step through a list.
Definition: mitkStepper.h:51
StepperSet m_SubSteppers
std::map< Stepper::Pointer, unsigned int > ScaleFactorMap