ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkWatershedMiniPipelineProgressCommand.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 #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:
43  itkNewMacro(Self);
45 
47  void Execute(Object *caller, const EventObject & event) override;
48 
49  void Execute(const Object *caller, const EventObject & event) override;
50 
54  { m_Filter = p; }
56  { return m_Filter; }
58 
60  itkSetMacro(Count, double);
61  itkGetConstMacro(Count, double);
63 
66  itkSetMacro(NumberOfFilters, unsigned int);
67  itkGetConstMacro(NumberOfFilters, unsigned int);
69 
70 protected:
72  {}
73  ~WatershedMiniPipelineProgressCommand() override = default;
74  void PrintSelf(std::ostream & os, Indent indent) const override;
75 
76 private:
77  double m_Count{0.0};
78  ProcessObject *m_Filter{nullptr};
79  unsigned int m_NumberOfFilters{1};
80 };
81 } // end namespace itk
82 
83 #endif
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Abstraction of the Events used to communicating among filters and with GUIs.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
class ITK_FORWARD_EXPORT Command
Definition: itkObject.h:41
Base class for most ITK classes.
Definition: itkObject.h:60
Superclass for callback/observer methods.
Definition: itkCommand.h:44