ITK  6.0.0
Insight Toolkit
itkUpdateWhitakerSparseLevelSet.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 itkUpdateWhitakerSparseLevelSet_h
20#define itkUpdateWhitakerSparseLevelSet_h
21
22#include "itkImage.h"
30
31namespace itk
32{
42template <unsigned int VDimension, typename TLevelSetValueType, typename TEquationContainer>
43class ITK_TEMPLATE_EXPORT UpdateWhitakerSparseLevelSet : public Object
44{
45public:
46 ITK_DISALLOW_COPY_AND_MOVE(UpdateWhitakerSparseLevelSet);
47
52
54 itkNewMacro(Self);
55
57 itkOverrideGetNameOfClassMacro(UpdateWhitakerSparseLevelSet);
58
59 static constexpr unsigned int ImageDimension = VDimension;
60
61 using LevelSetOutputType = TLevelSetValueType;
62
67
70
75
81
85
86 using EquationContainerType = TEquationContainer;
88
89 using TermContainerType = typename EquationContainerType::TermContainerType;
90 using TermContainerPointer = typename EquationContainerType::TermContainerPointer;
91
94
97
98 itkGetModifiableObjectMacro(OutputLevelSet, LevelSetType);
99
101 void
103
105 itkSetObjectMacro(InputLevelSet, LevelSetType);
106 itkGetModifiableObjectMacro(InputLevelSet, LevelSetType);
110 itkSetMacro(TimeStep, LevelSetOutputType);
111 itkGetMacro(TimeStep, LevelSetOutputType);
115 itkGetMacro(RMSChangeAccumulator, LevelSetOutputType);
116
118 itkSetObjectMacro(EquationContainer, EquationContainerType);
119 itkGetModifiableObjectMacro(EquationContainer, EquationContainerType);
123 itkSetMacro(CurrentLevelSetId, IdentifierType);
124 itkGetMacro(CurrentLevelSetId, IdentifierType);
128 void
130
131protected:
133 ~UpdateWhitakerSparseLevelSet() override = default;
134
136 void
138
140 void
142
144 void
146
148 void
150
152 void
154
156 void
158
160 void
162
164 void
166
168 void
170
172 void
174
175private:
176 LevelSetOutputType m_TimeStep{};
177 LevelSetOutputType m_RMSChangeAccumulator{};
178 IdentifierType m_CurrentLevelSetId{};
179
180 EquationContainerPointer m_EquationContainer{};
181
183 LevelSetPointer m_InputLevelSet{};
184 LevelSetPointer m_OutputLevelSet{};
185
186 LevelSetPointer m_TempLevelSet{};
187 LevelSetLayerType m_TempPhi{};
188
189 LevelSetLayerIdType m_MinStatus{};
190 LevelSetLayerIdType m_MaxStatus{};
191
192 LabelImagePointer m_InternalImage{};
193
195
197
198 using NodePairType = std::pair<LevelSetInputType, LevelSetOutputType>;
199};
200} // namespace itk
201
202#ifndef ITK_MANUAL_INSTANTIATION
203# include "itkUpdateWhitakerSparseLevelSet.hxx"
204#endif
205#endif // itkUpdateWhitakerSparseLevelSet_h
Templated n-dimensional image class.
Definition: itkImage.h:89
convert a labeled image to a label collection image
Converts a LabelMap to a labeled image.
Templated n-dimensional image to store labeled objects.
Definition: itkLabelMap.h:71
The base class for the representation of a labeled binary object in an image.
typename LayerType::const_iterator LayerConstIterator
typename LabelObjectType::LineType LabelObjectLineType
std::map< LayerIdType, LayerType > LayerMapType
typename LabelObjectType::Pointer LabelObjectPointer
std::map< InputType, OutputType, Functor::LexicographicCompare > LayerType
typename LayerType::iterator LayerIterator
typename LabelMapType::Pointer LabelMapPointer
typename LayerMapType::iterator LayerMapIterator
typename LayerMapType::const_iterator LayerMapConstIterator
typename LabelObjectType::LengthType LabelObjectLengthType
Light weight base class for most itk classes.
Base class for most ITK classes.
Definition: itkObject.h:62
A neighborhood iterator which can take on an arbitrary shape.
Base class for updating the level-set function.
~UpdateWhitakerSparseLevelSet() override=default
typename LevelSetType::Pointer LevelSetPointer
typename LevelSetType::LabelObjectLineType LevelSetLabelObjectLineType
typename EquationContainerType::TermContainerPointer TermContainerPointer
typename LevelSetType::LabelMapPointer LevelSetLabelMapPointer
void SetUpdate(const LevelSetLayerType &update)
typename LevelSetType::InputType LevelSetInputType
typename LevelSetType::LayerConstIterator LevelSetLayerConstIterator
typename LevelSetType::LayerMapConstIterator LevelSetLayerMapConstIterator
std::pair< LevelSetInputType, LevelSetOutputType > NodePairType
typename EquationContainerType::Pointer EquationContainerPointer
typename LevelSetType::OffsetType LevelSetOffsetType
typename LevelSetType::OutputRealType LevelSetOutputRealType
typename EquationContainerType::TermContainerType TermContainerType
typename LevelSetType::LayerMapIterator LevelSetLayerMapIterator
typename LevelSetType::LayerIterator LevelSetLayerIterator
typename LabelImageType::Pointer LabelImagePointer
typename LevelSetType::LabelObjectType LevelSetLabelObjectType
typename LevelSetType::LayerIdType LevelSetLayerIdType
typename LevelSetType::LabelMapType LevelSetLabelMapType
typename LevelSetType::LayerType LevelSetLayerType
typename LevelSetType::LabelObjectLengthType LevelSetLabelObjectLengthType
typename LevelSetType::LayerMapType LevelSetLayerMapType
typename LevelSetType::LabelObjectPointer LevelSetLabelObjectPointer
Derived class for the sparse-field representation of level-set function.
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
SizeValueType IdentifierType
Definition: itkIntTypes.h:90