ITK  6.0.0
Insight Toolkit
itkLevelSetEquationAdvectionTerm.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 itkLevelSetEquationAdvectionTerm_h
20#define itkLevelSetEquationAdvectionTerm_h
21
25#include "itkVector.h"
26#include "vnl/vnl_matrix_fixed.h"
27
28namespace itk
29{
50template <typename TInput, // Input image or mesh
51 typename TLevelSetContainer>
52class ITK_TEMPLATE_EXPORT LevelSetEquationAdvectionTerm : public LevelSetEquationTermBase<TInput, TLevelSetContainer>
53{
54public:
55 ITK_DISALLOW_COPY_AND_MOVE(LevelSetEquationAdvectionTerm);
62
64 itkNewMacro(Self);
65
67 itkOverrideGetNameOfClassMacro(LevelSetEquationAdvectionTerm);
68
69 using typename Superclass::InputImageType;
70 using typename Superclass::InputImagePointer;
71 using typename Superclass::InputPixelType;
72 using typename Superclass::InputPixelRealType;
73
74 using typename Superclass::LevelSetContainerType;
75 using typename Superclass::LevelSetContainerPointer;
76 using typename Superclass::LevelSetType;
77 using typename Superclass::LevelSetPointer;
78 using typename Superclass::LevelSetOutputPixelType;
79 using typename Superclass::LevelSetOutputRealType;
80 using typename Superclass::LevelSetInputIndexType;
81 using typename Superclass::LevelSetGradientType;
82 using typename Superclass::LevelSetHessianType;
83 using typename Superclass::LevelSetIdentifierType;
84 using typename Superclass::LevelSetDataType;
85
86 using typename Superclass::HeavisideType;
87 using typename Superclass::HeavisideConstPointer;
88
89 static constexpr unsigned int ImageDimension = InputImageType::ImageDimension;
90
92
95
96
97 void
99 itkGetModifiableObjectMacro(AdvectionImage, AdvectionImageType);
100
101 itkSetMacro(DerivativeSigma, LevelSetOutputRealType);
102 itkGetMacro(DerivativeSigma, LevelSetOutputRealType);
103
108
110
112 void
113 Update() override;
114
116 void
118
120 void
122
124 void
126 const LevelSetOutputRealType & oldValue,
127 const LevelSetOutputRealType & newValue) override;
128
129protected:
131
132 ~LevelSetEquationAdvectionTerm() override = default;
133
134 AdvectionImagePointer m_AdvectionImage{};
135
140
144 Value(const LevelSetInputIndexType & iP) override;
146 Value(const LevelSetInputIndexType & iP, const LevelSetDataType & iData) override;
149 LevelSetOutputRealType m_NeighborhoodScales[ImageDimension]{};
150
151private:
152 LevelSetOutputRealType m_DerivativeSigma{};
153
154 bool m_AutoGenerateAdvectionImage{};
155
156 void
158};
159
160} // namespace itk
161
162#ifndef ITK_MANUAL_INSTANTIATION
163# include "itkLevelSetEquationAdvectionTerm.hxx"
164#endif
165
166#endif
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
Templated n-dimensional image class.
Definition: itkImage.h:89
Derived class to represents an advection term in the level-set evolution PDE.
void SetAdvectionImage(AdvectionImageType *iImage)
~LevelSetEquationAdvectionTerm() override=default
LevelSetOutputRealType Value(const LevelSetInputIndexType &iP) override
typename AdvectionImageType::Pointer AdvectionImagePointer
void UpdatePixel(const LevelSetInputIndexType &iP, const LevelSetOutputRealType &oldValue, const LevelSetOutputRealType &newValue) override
void Initialize(const LevelSetInputIndexType &) override
typename ConstNeighborhoodIterator< InputImageType >::RadiusType RadiusType
LevelSetOutputRealType Value(const LevelSetInputIndexType &iP, const LevelSetDataType &iData) override
VectorType AdvectionSpeed(const LevelSetInputIndexType &iP) const
Abstract class to represents a term in the level-set evolution PDE.
typename LevelSetContainerType::LevelSetDataType LevelSetDataType
typename LevelSetContainerType::OutputRealType LevelSetOutputRealType
typename LevelSetContainerType::GradientType LevelSetGradientType
typename LevelSetContainerType::InputIndexType LevelSetInputIndexType
Light weight base class for most itk classes.
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:63
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....