ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkWatershedMiniPipelineProgressCommand.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkWatershedMiniPipelineProgressCommand_h
00019 #define __itkWatershedMiniPipelineProgressCommand_h
00020 
00021 #include "itkProcessObject.h"
00022 #include "itkCommand.h"
00023 
00024 namespace itk
00025 {
00033 class ITK_EXPORT WatershedMiniPipelineProgressCommand:public Command
00034 {
00035 public:
00037   typedef WatershedMiniPipelineProgressCommand Self;
00038   typedef Command                              Superclass;
00039   typedef itk::SmartPointer< Self >            Pointer;
00040   typedef itk::SmartPointer< const Self >      ConstPointer;
00041   itkTypeMacro(WatershedMiniPipelineProgressCommand, Command);
00042   itkNewMacro(Self);
00044 
00046   void Execute(Object *caller, const EventObject & event);
00047 
00048   void Execute(const Object *caller, const EventObject & event);
00049 
00052   void SetFilter(ProcessObject *p)
00053   { m_Filter = p; }
00054   const ProcessObject * GetFilter()
00055   { return m_Filter; }
00057 
00059   itkSetMacro(Count, double);
00060   itkGetConstMacro(Count, double);
00062 
00065   itkSetMacro(NumberOfFilters, double);
00066   itkGetConstMacro(NumberOfFilters, double);
00067 protected:
00068   WatershedMiniPipelineProgressCommand():m_Count(0.0), m_Filter(NULL),
00069     m_NumberOfFilters(1.0) {}
00070   virtual ~WatershedMiniPipelineProgressCommand() {}
00071   void PrintSelf(std::ostream & os, Indent indent) const;
00073 
00074 private:
00075   double         m_Count;
00076   ProcessObject *m_Filter;
00077   double         m_NumberOfFilters;
00078 };
00079 } // end namespace itk
00080 
00081 #endif
00082