ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkLevelSetEquationOverlapPenaltyTerm.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 itkLevelSetEquationOverlapPenaltyTerm_h
20 #define itkLevelSetEquationOverlapPenaltyTerm_h
21 
24 
25 namespace itk
26 {
45 template< typename TInput, // Input image or mesh
46  typename TLevelSetContainer >
47 class ITK_TEMPLATE_EXPORT LevelSetEquationOverlapPenaltyTerm :
48  public LevelSetEquationTermBase< TInput, TLevelSetContainer >
49 {
50 public:
55 
57  itkNewMacro( Self );
58 
61 
62  typedef typename Superclass::InputImageType InputImageType;
63  typedef typename Superclass::InputImagePointer InputImagePointer;
64  typedef typename Superclass::InputPixelType InputPixelType;
65  typedef typename Superclass::InputPixelRealType InputPixelRealType;
66 
67  typedef typename Superclass::LevelSetContainerType LevelSetContainerType;
68  typedef typename Superclass::LevelSetContainerPointer LevelSetContainerPointer;
69  typedef typename Superclass::LevelSetType LevelSetType;
70  typedef typename Superclass::LevelSetPointer LevelSetPointer;
71  typedef typename Superclass::LevelSetOutputPixelType LevelSetOutputPixelType;
72  typedef typename Superclass::LevelSetOutputRealType LevelSetOutputRealType;
73  typedef typename Superclass::LevelSetInputIndexType LevelSetInputIndexType;
74  typedef typename Superclass::LevelSetGradientType LevelSetGradientType;
75  typedef typename Superclass::LevelSetHessianType LevelSetHessianType;
76  typedef typename Superclass::LevelSetIdentifierType LevelSetIdentifierType;
77 
78  typedef typename Superclass::HeavisideType HeavisideType;
79  typedef typename Superclass::HeavisideConstPointer HeavisideConstPointer;
80 
81  typedef typename Superclass::LevelSetDataType LevelSetDataType;
82 
83  typedef typename Superclass::DomainMapImageFilterType DomainMapImageFilterType;
84  typedef typename Superclass::CacheImageType CacheImageType;
85 
86  typedef typename LevelSetContainerType::IdListType IdListType;
87  typedef typename LevelSetContainerType::IdListIterator IdListIterator;
88  typedef typename LevelSetContainerType::IdListConstIterator IdListConstIterator;
89 
91 
92 
94  virtual void Update() ITK_OVERRIDE;
95 
97  virtual void InitializeParameters() ITK_OVERRIDE;
98 
100  virtual void Initialize( const LevelSetInputIndexType& index ) ITK_OVERRIDE;
101 
104  virtual void ComputeSumTerm( const LevelSetInputIndexType& index,
105  LevelSetOutputRealType& sum );
106 
108  virtual void UpdatePixel( const LevelSetInputIndexType& index,
109  const LevelSetOutputRealType& oldValue,
110  const LevelSetOutputRealType& newValue ) ITK_OVERRIDE;
111 
112 
113 protected:
115 
116  virtual ~LevelSetEquationOverlapPenaltyTerm() ITK_OVERRIDE;
117 
119  virtual LevelSetOutputRealType Value( const LevelSetInputIndexType& index ) ITK_OVERRIDE;
120 
122  virtual LevelSetOutputRealType Value( const LevelSetInputIndexType& index,
123  const LevelSetDataType& data ) ITK_OVERRIDE;
124 
125 private:
126  ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetEquationOverlapPenaltyTerm);
127 
128  DomainMapImageFilterType *m_DomainMapImageFilter;
129  CacheImageType *m_CacheImage;
130 };
131 
132 }
133 #ifndef ITK_MANUAL_INSTANTIATION
134 #include "itkLevelSetEquationOverlapPenaltyTerm.hxx"
135 #endif
136 
137 #endif
Light weight base class for most itk classes.
Superclass::LevelSetOutputPixelType LevelSetOutputPixelType
Superclass::DomainMapImageFilterType DomainMapImageFilterType
CompensatedSummation< LevelSetOutputRealType > CompensatedSummationType
Abstract class to represents a term in the level-set evolution PDE.
LevelSetEquationTermBase< TInput, TLevelSetContainer > Superclass
Class to represent the overlap penalty among many level-sets.
Perform more precise accumulation of floating point numbers.
LevelSetContainerType::IdListConstIterator IdListConstIterator
Superclass::LevelSetContainerPointer LevelSetContainerPointer