ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkLevelSetEquationChanAndVeseExternalTerm.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 __itkLevelSetEquationChanAndVeseExternalTerm_h
00020 #define __itkLevelSetEquationChanAndVeseExternalTerm_h
00021 
00022 #include "itkLevelSetEquationChanAndVeseInternalTerm.h"
00023 #include "itkNumericTraits.h"
00024 
00025 namespace itk
00026 {
00048 template< class TInput, // Input image or mesh
00049           class TLevelSetContainer >
00050 class LevelSetEquationChanAndVeseExternalTerm :
00051     public LevelSetEquationChanAndVeseInternalTerm< TInput, TLevelSetContainer >
00052 {
00053 public:
00054   typedef LevelSetEquationChanAndVeseExternalTerm         Self;
00055   typedef SmartPointer< Self >                            Pointer;
00056   typedef SmartPointer< const Self >                      ConstPointer;
00057   typedef LevelSetEquationChanAndVeseInternalTerm< TInput,
00058                                     TLevelSetContainer >  Superclass;
00060 
00062   itkNewMacro( Self );
00063 
00065   itkTypeMacro( LevelSetEquationChanAndVeseExternalTerm,
00066                 LevelSetEquationChanAndVeseInternalTerm );
00067 
00068   typedef typename Superclass::InputImageType     InputImageType;
00069   typedef typename Superclass::InputImagePointer  InputImagePointer;
00070   typedef typename Superclass::InputPixelType     InputPixelType;
00071   typedef typename Superclass::InputPixelRealType InputPixelRealType;
00072 
00073   typedef typename Superclass::LevelSetContainerType      LevelSetContainerType;
00074   typedef typename Superclass::LevelSetContainerPointer   LevelSetContainerPointer;
00075   typedef typename Superclass::LevelSetType               LevelSetType;
00076   typedef typename Superclass::LevelSetPointer            LevelSetPointer;
00077   typedef typename Superclass::LevelSetOutputPixelType    LevelSetOutputPixelType;
00078   typedef typename Superclass::LevelSetOutputRealType     LevelSetOutputRealType;
00079   typedef typename Superclass::LevelSetInputIndexType     LevelSetInputIndexType;
00080   typedef typename Superclass::LevelSetGradientType       LevelSetGradientType;
00081   typedef typename Superclass::LevelSetHessianType        LevelSetHessianType;
00082   typedef typename Superclass::LevelSetIdentifierType     LevelSetIdentifierType;
00083 
00084   typedef typename Superclass::DomainMapImageFilterType   DomainMapImageFilterType;
00085   typedef typename Superclass::CacheImageType             CacheImageType;
00086 
00087   typedef typename DomainMapImageFilterType::DomainMapType::const_iterator  DomainIteratorType;
00088 
00089   typedef typename LevelSetContainerType::IdListType          IdListType;
00090   typedef typename LevelSetContainerType::IdListIterator      IdListIterator;
00091   typedef typename LevelSetContainerType::IdListConstIterator IdListConstIterator;
00092 
00093   typedef typename Superclass::HeavisideType         HeavisideType;
00094   typedef typename Superclass::HeavisideConstPointer HeavisideConstPointer;
00095 
00097   virtual void ComputeProduct( const LevelSetInputIndexType& iP,
00098                                LevelSetOutputRealType& prod );
00099 
00102   virtual void ComputeProductTerm( const LevelSetInputIndexType& iP,
00103                                   LevelSetOutputRealType& prod );
00104 
00106   virtual void UpdatePixel( const LevelSetInputIndexType& iP,
00107                            const LevelSetOutputRealType & oldValue,
00108                            const LevelSetOutputRealType & newValue );
00109 
00110 protected:
00111   LevelSetEquationChanAndVeseExternalTerm();
00112   virtual ~LevelSetEquationChanAndVeseExternalTerm();
00113 
00114 private:
00115   LevelSetEquationChanAndVeseExternalTerm( const Self& ); // purposely not implemented
00116   void operator = ( const Self& ); // purposely not implemented
00117 };
00118 
00119 }
00120 #ifndef ITK_MANUAL_INSTANTIATION
00121 #include "itkLevelSetEquationChanAndVeseExternalTerm.hxx"
00122 #endif
00123 
00124 #endif
00125