ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkLevelSetEquationChanAndVeseExternalTerm.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 
19 #ifndef itkLevelSetEquationChanAndVeseExternalTerm_h
20 #define itkLevelSetEquationChanAndVeseExternalTerm_h
21 
23 #include "itkNumericTraits.h"
24 
25 namespace itk
26 {
48 template< typename TInput, // Input image or mesh
49  typename TLevelSetContainer >
50 class ITK_TEMPLATE_EXPORT LevelSetEquationChanAndVeseExternalTerm :
51  public LevelSetEquationChanAndVeseInternalTerm< TInput, TLevelSetContainer >
52 {
53 public:
58  TLevelSetContainer > Superclass;
60 
62  itkNewMacro( Self );
63 
67 
68  typedef typename Superclass::InputImageType InputImageType;
69  typedef typename Superclass::InputImagePointer InputImagePointer;
70  typedef typename Superclass::InputPixelType InputPixelType;
71  typedef typename Superclass::InputPixelRealType InputPixelRealType;
72 
73  typedef typename Superclass::LevelSetContainerType LevelSetContainerType;
74  typedef typename Superclass::LevelSetContainerPointer LevelSetContainerPointer;
75  typedef typename Superclass::LevelSetType LevelSetType;
76  typedef typename Superclass::LevelSetPointer LevelSetPointer;
77  typedef typename Superclass::LevelSetOutputPixelType LevelSetOutputPixelType;
78  typedef typename Superclass::LevelSetOutputRealType LevelSetOutputRealType;
79  typedef typename Superclass::LevelSetInputIndexType LevelSetInputIndexType;
80  typedef typename Superclass::LevelSetGradientType LevelSetGradientType;
81  typedef typename Superclass::LevelSetHessianType LevelSetHessianType;
82  typedef typename Superclass::LevelSetIdentifierType LevelSetIdentifierType;
83 
86 
87  typedef typename DomainMapImageFilterType::DomainMapType::const_iterator DomainIteratorType;
88 
89  typedef typename LevelSetContainerType::IdListType IdListType;
90  typedef typename LevelSetContainerType::IdListIterator IdListIterator;
91  typedef typename LevelSetContainerType::IdListConstIterator IdListConstIterator;
92 
93  typedef typename Superclass::HeavisideType HeavisideType;
94  typedef typename Superclass::HeavisideConstPointer HeavisideConstPointer;
95 
97  virtual void ComputeProduct( const LevelSetInputIndexType& iP,
98  LevelSetOutputRealType& prod ) ITK_OVERRIDE;
99 
102  virtual void ComputeProductTerm( const LevelSetInputIndexType& iP,
103  LevelSetOutputRealType& prod ) ITK_OVERRIDE;
104 
106  virtual void UpdatePixel( const LevelSetInputIndexType& iP,
107  const LevelSetOutputRealType & oldValue,
108  const LevelSetOutputRealType & newValue ) ITK_OVERRIDE;
109 
110 protected:
112  virtual ~LevelSetEquationChanAndVeseExternalTerm() ITK_OVERRIDE;
113 
114 private:
115  ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetEquationChanAndVeseExternalTerm);
116 
117  DomainMapImageFilterType *m_DomainMapImageFilter;
118  CacheImageType *m_CacheImage;
119 };
120 
121 }
122 #ifndef ITK_MANUAL_INSTANTIATION
123 #include "itkLevelSetEquationChanAndVeseExternalTerm.hxx"
124 #endif
125 
126 #endif
Light weight base class for most itk classes.
Class to represent the internal energy Chan And Vese term.
DomainMapImageFilterType::DomainMapType::const_iterator DomainIteratorType
Class to represent the external energy Chan And Vese term.
LevelSetEquationChanAndVeseInternalTerm< TInput, TLevelSetContainer > Superclass