ITK  5.4.0
Insight Toolkit
itkLevelSetEquationOverlapPenaltyTerm.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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  * https://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:
51  ITK_DISALLOW_COPY_AND_MOVE(LevelSetEquationOverlapPenaltyTerm);
58 
60  itkNewMacro(Self);
61 
63  itkOverrideGetNameOfClassMacro(LevelSetEquationOverlapPenaltyTerm);
64 
65  using typename Superclass::InputImageType;
66  using typename Superclass::InputImagePointer;
67  using typename Superclass::InputPixelType;
68  using typename Superclass::InputPixelRealType;
69 
70  using typename Superclass::LevelSetContainerType;
71  using typename Superclass::LevelSetContainerPointer;
72  using typename Superclass::LevelSetType;
73  using typename Superclass::LevelSetPointer;
74  using typename Superclass::LevelSetOutputPixelType;
75  using typename Superclass::LevelSetOutputRealType;
76  using typename Superclass::LevelSetInputIndexType;
77  using typename Superclass::LevelSetGradientType;
78  using typename Superclass::LevelSetHessianType;
79  using typename Superclass::LevelSetIdentifierType;
80 
81  using typename Superclass::HeavisideType;
82  using typename Superclass::HeavisideConstPointer;
83 
84  using typename Superclass::LevelSetDataType;
85 
86  using typename Superclass::DomainMapImageFilterType;
87  using typename Superclass::CacheImageType;
88 
89  using IdListType = typename LevelSetContainerType::IdListType;
90  using IdListIterator = typename LevelSetContainerType::IdListIterator;
91  using IdListConstIterator = typename LevelSetContainerType::IdListConstIterator;
92 
94 
95 
97  void
98  Update() override;
99 
101  void
102  InitializeParameters() override;
103 
105  void
106  Initialize(const LevelSetInputIndexType & index) override;
107 
110  virtual void
111  ComputeSumTerm(const LevelSetInputIndexType & index, LevelSetOutputRealType & sum);
112 
114  void
115  UpdatePixel(const LevelSetInputIndexType & index,
116  const LevelSetOutputRealType & oldValue,
117  const LevelSetOutputRealType & newValue) override;
118 
119 
120 protected:
122 
123  ~LevelSetEquationOverlapPenaltyTerm() override = default;
124 
127  Value(const LevelSetInputIndexType & index) override;
128 
131  Value(const LevelSetInputIndexType & index, const LevelSetDataType & data) override;
132 
133 private:
134  DomainMapImageFilterType * m_DomainMapImageFilter{};
135  CacheImageType * m_CacheImage{};
136 };
137 
138 } // namespace itk
139 #ifndef ITK_MANUAL_INSTANTIATION
140 # include "itkLevelSetEquationOverlapPenaltyTerm.hxx"
141 #endif
142 
143 #endif
itk::CompensatedSummation
Perform more precise accumulation of floating point numbers.
Definition: itkCompensatedSummation.h:66
itk::LevelSetEquationOverlapPenaltyTerm::IdListConstIterator
typename LevelSetContainerType::IdListConstIterator IdListConstIterator
Definition: itkLevelSetEquationOverlapPenaltyTerm.h:91
itk::SmartPointer< Self >
itkCompensatedSummation.h
itk::LevelSetEquationTermBase< TInput, TLevelSetContainer >::DomainMapImageFilterType
typename LevelSetContainerType::DomainMapImageFilterType DomainMapImageFilterType
Definition: itkLevelSetEquationTermBase.h:81
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::LevelSetEquationTermBase< TInput, TLevelSetContainer >::LevelSetInputIndexType
typename LevelSetContainerType::InputIndexType LevelSetInputIndexType
Definition: itkLevelSetEquationTermBase.h:76
itk::LevelSetEquationOverlapPenaltyTerm::IdListType
typename LevelSetContainerType::IdListType IdListType
Definition: itkLevelSetEquationOverlapPenaltyTerm.h:89
itk::LevelSetEquationTermBase< TInput, TLevelSetContainer >::CacheImageType
typename LevelSetContainerType::CacheImageType CacheImageType
Definition: itkLevelSetEquationTermBase.h:82
itk::LevelSetEquationOverlapPenaltyTerm
Class to represent the overlap penalty among many level-sets.
Definition: itkLevelSetEquationOverlapPenaltyTerm.h:47
itk::LevelSetEquationTermBase
Abstract class to represents a term in the level-set evolution PDE.
Definition: itkLevelSetEquationTermBase.h:49
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::LevelSetEquationTermBase< TInput, TLevelSetContainer >::LevelSetDataType
typename LevelSetContainerType::LevelSetDataType LevelSetDataType
Definition: itkLevelSetEquationTermBase.h:79
itkLevelSetEquationTermBase.h
itk::LevelSetEquationTermBase< TInput, TLevelSetContainer >::LevelSetOutputRealType
typename LevelSetContainerType::OutputRealType LevelSetOutputRealType
Definition: itkLevelSetEquationTermBase.h:75
itk::LevelSetEquationOverlapPenaltyTerm::IdListIterator
typename LevelSetContainerType::IdListIterator IdListIterator
Definition: itkLevelSetEquationOverlapPenaltyTerm.h:90