ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkLevelSetEvolutionStoppingCriterionBase.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 
00019 #ifndef __itkLevelSetEvolutionStoppingCriterionBase_h
00020 #define __itkLevelSetEvolutionStoppingCriterionBase_h
00021 
00022 #include "itkStoppingCriterionBase.h"
00023 #include "itkNumericTraits.h"
00024 #include "itkIntTypes.h"
00025 
00026 namespace itk
00027 {
00031  template< class TLevelSetContainer >
00032  class LevelSetEvolutionStoppingCriterionBase : public StoppingCriterionBase
00033  {
00034  public:
00035    typedef LevelSetEvolutionStoppingCriterionBase       Self;
00036    typedef StoppingCriterionBase                        Superclass;
00037    typedef SmartPointer< Self >                         Pointer;
00038    typedef SmartPointer< const Self >                   ConstPointer;
00039 
00041    itkTypeMacro(LevelSetEvolutionStoppingCriterionBase, StoppingCriterionBase);
00042 
00043    typedef TLevelSetContainer                               LevelSetContainerType;
00044    typedef typename LevelSetContainerType::Pointer          LevelSetContainerPointer;
00045 
00046    typedef typename LevelSetContainerType::LevelSetIdentifierType
00047                                                             LevelSetIdentifierType;
00048 
00049    typedef typename LevelSetContainerType::LevelSetType     LevelSetType;
00050    typedef typename LevelSetContainerType::LevelSetPointer  LevelSetPointer;
00051 
00052    typedef typename LevelSetContainerType::InputIndexType   InputIndexType;
00053    typedef typename LevelSetContainerType::OutputType       OutputType;
00054    typedef typename LevelSetContainerType::OutputRealType   OutputRealType;
00055    typedef typename LevelSetContainerType::GradientType     GradientType;
00056    typedef typename LevelSetContainerType::HessianType      HessianType;
00057 
00058    typedef typename LevelSetContainerType::HeavisideType    HeavisideType;
00059    typedef typename LevelSetContainerType::HeavisideType    HeavisidePointer;
00060 
00061    typedef IdentifierType IterationIdType;
00062 
00063    itkSetObjectMacro( LevelSetContainer, LevelSetContainerType );
00064    itkGetObjectMacro( LevelSetContainer, LevelSetContainerType );
00065 
00066    itkSetMacro( NumberOfIterations, IterationIdType );
00067    itkGetMacro( NumberOfIterations, IterationIdType );
00068 
00069    itkSetMacro( CurrentIteration, IterationIdType );
00070    itkGetMacro( CurrentIteration, IterationIdType );
00071 
00072    itkSetMacro( RMSChangeAccumulator, OutputRealType );
00073    itkGetMacro( RMSChangeAccumulator, OutputRealType );
00074 
00075  protected:
00077    LevelSetEvolutionStoppingCriterionBase();
00078 
00080    virtual ~LevelSetEvolutionStoppingCriterionBase();
00081 
00082    LevelSetContainerPointer m_LevelSetContainer;
00083    OutputRealType           m_RMSChangeAccumulator;
00084    IterationIdType          m_NumberOfIterations;
00085    IterationIdType          m_CurrentIteration;
00086 
00087  private:
00088    LevelSetEvolutionStoppingCriterionBase( const Self& ); // purposely not implemented
00089     void operator = ( const Self& ); // purposely not implemented
00090  };
00091  }
00092 #ifndef ITK_MANUAL_INSTANTIATION
00093 #include "itkLevelSetEvolutionStoppingCriterionBase.hxx"
00094 #endif
00095 #endif
00096