ITK  5.4.0
Insight Toolkit
itkWatershedMiniPipelineProgressCommand.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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  * https://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 #ifndef itkWatershedMiniPipelineProgressCommand_h
19 #define itkWatershedMiniPipelineProgressCommand_h
20 
21 #include "itkProcessObject.h"
22 #include "itkCommand.h"
23 #include "ITKWatershedsExport.h"
24 
25 namespace itk
26 {
34 class ITKWatersheds_EXPORT WatershedMiniPipelineProgressCommand : public Command
35 {
36 public:
42  itkOverrideGetNameOfClassMacro(WatershedMiniPipelineProgressCommand);
43  itkNewMacro(Self);
47  void
48  Execute(Object * caller, const EventObject & event) override;
49 
50  void
51  Execute(const Object * caller, const EventObject & event) override;
52 
55  void
57  {
58  m_Filter = p;
59  }
60  const ProcessObject *
62  {
63  return m_Filter;
64  }
68  itkSetMacro(Count, double);
69  itkGetConstMacro(Count, double);
74  itkSetMacro(NumberOfFilters, unsigned int);
75  itkGetConstMacro(NumberOfFilters, unsigned int);
78 protected:
80  ~WatershedMiniPipelineProgressCommand() override = default;
81  void
82  PrintSelf(std::ostream & os, Indent indent) const override;
83 
84 private:
85  double m_Count{ 0.0 };
86  ProcessObject * m_Filter{ nullptr };
87  unsigned int m_NumberOfFilters{ 1 };
88 };
89 } // end namespace itk
90 
91 #endif
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::WatershedMiniPipelineProgressCommand
Definition: itkWatershedMiniPipelineProgressCommand.h:34
itk::Command
Superclass for callback/observer methods.
Definition: itkCommand.h:45
itk::WatershedMiniPipelineProgressCommand::GetFilter
const ProcessObject * GetFilter()
Definition: itkWatershedMiniPipelineProgressCommand.h:61
itkProcessObject.h
itk::Command
class ITK_FORWARD_EXPORT Command
Definition: itkObject.h:42
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:139
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:61
itk::EventObject
Abstraction of the Events used to communicating among filters and with GUIs.
Definition: itkEventObject.h:57
itk::WatershedMiniPipelineProgressCommand::SetFilter
void SetFilter(ProcessObject *p)
Definition: itkWatershedMiniPipelineProgressCommand.h:56
itkCommand.h