go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxProgressCommand.h
Go to the documentation of this file.
1 /*======================================================================
2 
3  This file is part of the elastix software.
4 
5  Copyright (c) University Medical Center Utrecht. All rights reserved.
6  See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7  details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notices for more information.
12 
13 ======================================================================*/
14 
15 #ifndef __elxProgressCommand_h
16 #define __elxProgressCommand_h
17 
18 #include "itkProcessObject.h"
19 #include "itkCommand.h"
20 
21 namespace elastix
22 {
23 
86 class ProgressCommand : public itk::Command
87 {
88 public:
89 
92  typedef itk::Command Superclass;
93  typedef itk::SmartPointer<Self> Pointer;
94  typedef itk::SmartPointer<const Self> ConstPointer;
95 
97  itkTypeMacro( ProgressCommand, Command );
98  itkNewMacro( Self );
99 
101  typedef itk::ProcessObject ProcessObjectType;
102  typedef ProcessObjectType::Pointer ProcessObjectPointer;
103 
105  virtual void SetUpdateFrequency(
106  const unsigned long numberOfVoxels,
107  const unsigned long numberOfUpdates );
108 
110  virtual void ConnectObserver( itk::ProcessObject * filter );
111 
113  virtual void DisconnectObserver( itk::ProcessObject * filter );
114 
116  virtual void Execute( itk::Object *caller, const itk::EventObject &event );
117  virtual void Execute( const itk::Object *caller, const itk::EventObject &event );
118 
122  virtual void PrintProgress( const float & progress ) const;
123 
129  virtual void UpdateAndPrintProgress( const unsigned long & currentVoxelNumber ) const;
130 
132  itkSetStringMacro( StartString );
133  itkGetStringMacro( StartString );
134 
136  itkSetStringMacro( EndString );
137  itkGetStringMacro( EndString );
138 
140  itkGetConstReferenceMacro( StreamOutputIsConsole, bool );
141 
142 protected:
143 
145  ProgressCommand();
146 
148  virtual ~ProgressCommand();
149 
150 private:
151 
153  std::string m_StartString;
154  std::string m_EndString;
155 
158  unsigned long m_Tag;
161 
163  unsigned long m_NumberOfVoxels;
164  unsigned long m_NumberOfUpdates;
165 
166 }; // end class ProgressCommand
167 
168 } // end namespace elastix
169 
170 #endif // end #ifndef __elxProgressCommand_h
virtual void UpdateAndPrintProgress(const unsigned long &currentVoxelNumber) const
itk::ProcessObject ProcessObjectType
virtual void Execute(itk::Object *caller, const itk::EventObject &event)
itk::SmartPointer< const Self > ConstPointer
virtual void SetUpdateFrequency(const unsigned long numberOfVoxels, const unsigned long numberOfUpdates)
virtual void DisconnectObserver(itk::ProcessObject *filter)
itk::SmartPointer< Self > Pointer
virtual void PrintProgress(const float &progress) const
virtual void ConnectObserver(itk::ProcessObject *filter)
ProcessObjectPointer m_ObservedProcessObject
A specialized Command object for updating the progress of a filter.
ProcessObjectType::Pointer ProcessObjectPointer


Generated on 04-01-2014 for elastix by doxygen 1.8.5 elastix logo