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  * Copyright UMC Utrecht and contributors
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 
19 #ifndef __elxProgressCommand_h
20 #define __elxProgressCommand_h
21 
22 #include "itkProcessObject.h"
23 #include "itkCommand.h"
24 
25 namespace elastix
26 {
27 
90 class ProgressCommand : public itk::Command
91 {
92 public:
93 
96  typedef itk::Command Superclass;
97  typedef itk::SmartPointer< Self > Pointer;
98  typedef itk::SmartPointer< const Self > ConstPointer;
99 
101  itkTypeMacro( ProgressCommand, Command );
102  itkNewMacro( Self );
103 
105  typedef itk::ProcessObject ProcessObjectType;
106  typedef ProcessObjectType::Pointer ProcessObjectPointer;
107 
109  virtual void SetUpdateFrequency(
110  const unsigned long numberOfVoxels,
111  const unsigned long numberOfUpdates );
112 
114  virtual void ConnectObserver( itk::ProcessObject * filter );
115 
117  virtual void DisconnectObserver( itk::ProcessObject * filter );
118 
120  virtual void Execute( itk::Object * caller, const itk::EventObject & event ) ITK_OVERRIDE;
121 
122  virtual void Execute( const itk::Object * caller, const itk::EventObject & event ) ITK_OVERRIDE;
123 
127  virtual void PrintProgress( const float & progress ) const;
128 
134  virtual void UpdateAndPrintProgress( const unsigned long & currentVoxelNumber ) const;
135 
137  itkSetStringMacro( StartString );
138  itkGetStringMacro( StartString );
139 
141  itkSetStringMacro( EndString );
142  itkGetStringMacro( EndString );
143 
145  itkGetConstReferenceMacro( StreamOutputIsConsole, bool );
146 
147 protected:
148 
151 
153  virtual ~ProgressCommand();
154 
155 private:
156 
158  std::string m_StartString;
159  std::string m_EndString;
160 
163  unsigned long m_Tag;
166 
168  unsigned long m_NumberOfVoxels;
169  unsigned long m_NumberOfUpdates;
170 
171 };
172 
173 } // end namespace elastix
174 
175 #endif // end #ifndef __elxProgressCommand_h
elastix::ProgressCommand::m_StreamOutputIsConsole
bool m_StreamOutputIsConsole
Definition: elxProgressCommand.h:162
elastix::ProgressCommand::m_NumberOfUpdates
unsigned long m_NumberOfUpdates
Definition: elxProgressCommand.h:169
elastix::ProgressCommand::m_NumberOfVoxels
unsigned long m_NumberOfVoxels
Definition: elxProgressCommand.h:168
elastix::ProgressCommand
A specialized Command object for updating the progress of a filter.
Definition: elxProgressCommand.h:91
elastix::ProgressCommand::m_Tag
unsigned long m_Tag
Definition: elxProgressCommand.h:163
elastix::ProgressCommand::ProcessObjectPointer
ProcessObjectType::Pointer ProcessObjectPointer
Definition: elxProgressCommand.h:106
elastix::ProgressCommand::SetUpdateFrequency
virtual void SetUpdateFrequency(const unsigned long numberOfVoxels, const unsigned long numberOfUpdates)
elastix::ProgressCommand::PrintProgress
virtual void PrintProgress(const float &progress) const
elastix::ProgressCommand::Superclass
itk::Command Superclass
Definition: elxProgressCommand.h:96
elastix::ProgressCommand::UpdateAndPrintProgress
virtual void UpdateAndPrintProgress(const unsigned long &currentVoxelNumber) const
elastix::ProgressCommand::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: elxProgressCommand.h:98
elastix::ProgressCommand::m_ObservedProcessObject
ProcessObjectPointer m_ObservedProcessObject
Definition: elxProgressCommand.h:165
elastix::ProgressCommand::Execute
virtual void Execute(const itk::Object *caller, const itk::EventObject &event) ITK_OVERRIDE
elastix::ProgressCommand::m_EndString
std::string m_EndString
Definition: elxProgressCommand.h:159
elastix::ProgressCommand::Pointer
itk::SmartPointer< Self > Pointer
Definition: elxProgressCommand.h:97
elastix::ProgressCommand::m_TagIsSet
bool m_TagIsSet
Definition: elxProgressCommand.h:164
elastix::ProgressCommand::Execute
virtual void Execute(itk::Object *caller, const itk::EventObject &event) ITK_OVERRIDE
elastix::ProgressCommand::m_StartString
std::string m_StartString
Definition: elxProgressCommand.h:158
elastix::ProgressCommand::ProgressCommand
ProgressCommand()
elastix::ProgressCommand::ProcessObjectType
itk::ProcessObject ProcessObjectType
Definition: elxProgressCommand.h:102
elastix::ProgressCommand::~ProgressCommand
virtual ~ProgressCommand()
elastix::ProgressCommand::Self
ProgressCommand Self
Definition: elxProgressCommand.h:95
elastix
Definition: elxFixedGenericPyramid.h:25
elastix::ProgressCommand::DisconnectObserver
virtual void DisconnectObserver(itk::ProcessObject *filter)
elastix::ProgressCommand::ConnectObserver
virtual void ConnectObserver(itk::ProcessObject *filter)


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.8.18 elastix logo