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 
118  virtual void Execute( const itk::Object * caller, const itk::EventObject & event );
119 
123  virtual void PrintProgress( const float & progress ) const;
124 
130  virtual void UpdateAndPrintProgress( const unsigned long & currentVoxelNumber ) const;
131 
133  itkSetStringMacro( StartString );
134  itkGetStringMacro( StartString );
135 
137  itkSetStringMacro( EndString );
138  itkGetStringMacro( EndString );
139 
141  itkGetConstReferenceMacro( StreamOutputIsConsole, bool );
142 
143 protected:
144 
146  ProgressCommand();
147 
149  virtual ~ProgressCommand();
150 
151 private:
152 
154  std::string m_StartString;
155  std::string m_EndString;
156 
159  unsigned long m_Tag;
162 
164  unsigned long m_NumberOfVoxels;
165  unsigned long m_NumberOfUpdates;
166 
167 };
168 
169 } // end namespace elastix
170 
171 #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)
virtual void SetUpdateFrequency(const unsigned long numberOfVoxels, const unsigned long numberOfUpdates)
virtual void DisconnectObserver(itk::ProcessObject *filter)
virtual void PrintProgress(const float &progress) const
virtual void ConnectObserver(itk::ProcessObject *filter)
ProcessObjectPointer m_ObservedProcessObject
itk::SmartPointer< Self > Pointer
A specialized Command object for updating the progress of a filter.
ProcessObjectType::Pointer ProcessObjectPointer
itk::SmartPointer< const Self > ConstPointer


Generated on 11-03-2014 for elastix by doxygen 1.8.6 elastix logo