ITK  5.2.0
Insight Toolkit
itkLevelSetEquationChanAndVeseInternalTerm.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  * 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 itkLevelSetEquationChanAndVeseInternalTerm_h
20 #define itkLevelSetEquationChanAndVeseInternalTerm_h
21 
23 
24 namespace itk
25 {
46 template <typename TInput, // Input image or mesh
47  typename TLevelSetContainer>
48 class ITK_TEMPLATE_EXPORT LevelSetEquationChanAndVeseInternalTerm
49  : public LevelSetEquationTermBase<TInput, TLevelSetContainer>
50 {
51 public:
52  ITK_DISALLOW_COPY_AND_MOVE(LevelSetEquationChanAndVeseInternalTerm);
54 
59 
61  itkNewMacro(Self);
62 
65 
66  using InputImageType = typename Superclass::InputImageType;
67  using InputImagePointer = typename Superclass::InputImagePointer;
68  using InputPixelType = typename Superclass::InputPixelType;
69  using InputPixelRealType = typename Superclass::InputPixelRealType;
70 
71  using LevelSetContainerType = typename Superclass::LevelSetContainerType;
72  using LevelSetContainerPointer = typename Superclass::LevelSetContainerPointer;
73  using LevelSetType = typename Superclass::LevelSetType;
74  using LevelSetPointer = typename Superclass::LevelSetPointer;
75  using LevelSetOutputPixelType = typename Superclass::LevelSetOutputPixelType;
76  using LevelSetOutputRealType = typename Superclass::LevelSetOutputRealType;
77  using LevelSetInputIndexType = typename Superclass::LevelSetInputIndexType;
78  using LevelSetGradientType = typename Superclass::LevelSetGradientType;
79  using LevelSetHessianType = typename Superclass::LevelSetHessianType;
80  using LevelSetIdentifierType = typename Superclass::LevelSetIdentifierType;
81 
82  using HeavisideType = typename Superclass::HeavisideType;
83  using HeavisideConstPointer = typename Superclass::HeavisideConstPointer;
84 
85  using LevelSetDataType = typename Superclass::LevelSetDataType;
86 
87  using DomainMapImageFilterType = typename Superclass::DomainMapImageFilterType;
88  using CacheImageType = typename Superclass::CacheImageType;
89 
90  itkSetMacro(Mean, InputPixelRealType);
91  itkGetMacro(Mean, InputPixelRealType);
92 
94  void
95  Update() override;
96 
98  void
99  InitializeParameters() override;
100 
102  void
103  Initialize(const LevelSetInputIndexType & inputIndex) override;
104 
106  virtual void
107  ComputeProduct(const LevelSetInputIndexType & inputIndex, LevelSetOutputRealType & prod);
108 
111  virtual void
113  {}
114 
116  void
117  UpdatePixel(const LevelSetInputIndexType & inputIndex,
118  const LevelSetOutputRealType & oldValue,
119  const LevelSetOutputRealType & newValue) override;
120 
121 protected:
123 
124  ~LevelSetEquationChanAndVeseInternalTerm() override = default;
125 
128  LevelSetOutputRealType
129  Value(const LevelSetInputIndexType & inputIndex) override;
130 
133  LevelSetOutputRealType
134  Value(const LevelSetInputIndexType & inputIndex, const LevelSetDataType & data) override;
135 
137  void
138  Accumulate(const InputPixelType & inputPixel, const LevelSetOutputRealType & heavisideValue);
139 
143 };
144 
145 } // namespace itk
146 #ifndef ITK_MANUAL_INSTANTIATION
147 # include "itkLevelSetEquationChanAndVeseInternalTerm.hxx"
148 #endif
149 
150 #endif
itk::LevelSetEquationChanAndVeseInternalTerm::m_TotalValue
InputPixelRealType m_TotalValue
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:141
itk::LevelSetEquationChanAndVeseInternalTerm::InputPixelRealType
typename Superclass::InputPixelRealType InputPixelRealType
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:69
itk::LevelSetEquationChanAndVeseInternalTerm::DomainMapImageFilterType
typename Superclass::DomainMapImageFilterType DomainMapImageFilterType
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:87
itk::LevelSetEquationChanAndVeseInternalTerm::LevelSetInputIndexType
typename Superclass::LevelSetInputIndexType LevelSetInputIndexType
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:77
itk::LevelSetEquationChanAndVeseInternalTerm::LevelSetHessianType
typename Superclass::LevelSetHessianType LevelSetHessianType
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:79
itk::LevelSetEquationChanAndVeseInternalTerm::ComputeProductTerm
virtual void ComputeProductTerm(const LevelSetInputIndexType &, LevelSetOutputRealType &)
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:112
itk::SmartPointer< Self >
itk::LevelSetEquationChanAndVeseInternalTerm::LevelSetPointer
typename Superclass::LevelSetPointer LevelSetPointer
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:74
itk::LevelSetEquationChanAndVeseInternalTerm::LevelSetOutputRealType
typename Superclass::LevelSetOutputRealType LevelSetOutputRealType
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:76
itk::LevelSetEquationChanAndVeseInternalTerm::LevelSetContainerType
typename Superclass::LevelSetContainerType LevelSetContainerType
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:71
itk::LevelSetEquationChanAndVeseInternalTerm::LevelSetDataType
typename Superclass::LevelSetDataType LevelSetDataType
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:85
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::LevelSetEquationChanAndVeseInternalTerm::LevelSetIdentifierType
typename Superclass::LevelSetIdentifierType LevelSetIdentifierType
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:80
itk::LevelSetEquationChanAndVeseInternalTerm::LevelSetContainerPointer
typename Superclass::LevelSetContainerPointer LevelSetContainerPointer
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:72
itk::LevelSetEquationChanAndVeseInternalTerm::HeavisideType
typename Superclass::HeavisideType HeavisideType
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:82
itk::LevelSetEquationChanAndVeseInternalTerm::InputImageType
typename Superclass::InputImageType InputImageType
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:66
itk::LevelSetEquationChanAndVeseInternalTerm::LevelSetOutputPixelType
typename Superclass::LevelSetOutputPixelType LevelSetOutputPixelType
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:75
itk::LevelSetEquationChanAndVeseInternalTerm::InputPixelType
typename Superclass::InputPixelType InputPixelType
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:68
itk::LevelSetEquationChanAndVeseInternalTerm::m_TotalH
LevelSetOutputRealType m_TotalH
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:142
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::LevelSetEquationChanAndVeseInternalTerm::LevelSetGradientType
typename Superclass::LevelSetGradientType LevelSetGradientType
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:78
itk::LevelSetEquationChanAndVeseInternalTerm::LevelSetType
typename Superclass::LevelSetType LevelSetType
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:73
itk::LevelSetEquationChanAndVeseInternalTerm
Class to represent the internal energy Chan And Vese term.
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:48
itkLevelSetEquationTermBase.h
itk::LevelSetEquationChanAndVeseInternalTerm::InputImagePointer
typename Superclass::InputImagePointer InputImagePointer
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:67
itk::LevelSetEquationChanAndVeseInternalTerm::CacheImageType
typename Superclass::CacheImageType CacheImageType
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:88
itk::LevelSetEquationChanAndVeseInternalTerm::m_Mean
InputPixelRealType m_Mean
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:140
itk::LevelSetEquationChanAndVeseInternalTerm::HeavisideConstPointer
typename Superclass::HeavisideConstPointer HeavisideConstPointer
Definition: itkLevelSetEquationChanAndVeseInternalTerm.h:83