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