ITK  6.0.0
Insight Toolkit
itkUpdateMalcolmSparseLevelSet.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 itkUpdateMalcolmSparseLevelSet_h
20#define itkUpdateMalcolmSparseLevelSet_h
21
22#include "itkImage.h"
30
31namespace itk
32{
41template <unsigned int VDimension, typename TEquationContainer>
42class ITK_TEMPLATE_EXPORT UpdateMalcolmSparseLevelSet : public Object
43{
44public:
45 ITK_DISALLOW_COPY_AND_MOVE(UpdateMalcolmSparseLevelSet);
46
51
53 itkNewMacro(Self);
54
56 itkOverrideGetNameOfClassMacro(UpdateMalcolmSparseLevelSet);
57
58 static constexpr unsigned int ImageDimension = VDimension;
59
65
68
73
78
82
83 using EquationContainerType = TEquationContainer;
85 using TermContainerPointer = typename EquationContainerType::TermContainerPointer;
86
87 itkGetModifiableObjectMacro(OutputLevelSet, LevelSetType);
88
90 void
92
94 itkSetObjectMacro(InputLevelSet, LevelSetType);
95 itkGetModifiableObjectMacro(InputLevelSet, LevelSetType);
99 itkGetMacro(RMSChangeAccumulator, LevelSetOutputRealType);
100
102 itkSetObjectMacro(EquationContainer, EquationContainerType);
103 itkGetModifiableObjectMacro(EquationContainer, EquationContainerType);
107 itkSetMacro(CurrentLevelSetId, IdentifierType);
108 itkGetMacro(CurrentLevelSetId, IdentifierType);
111protected:
113 ~UpdateMalcolmSparseLevelSet() override = default;
114
115 // output
116 LevelSetPointer m_OutputLevelSet{};
117
119
120 IdentifierType m_CurrentLevelSetId{};
121 LevelSetOutputRealType m_RMSChangeAccumulator{};
122 EquationContainerPointer m_EquationContainer{};
123
126
127 LabelImagePointer m_InternalImage{};
128
130
131 bool m_IsUsingUnPhasedPropagation{ true };
132
134 void
136
139 void
141
144 void
145 EvolveWithPhasedPropagation(LevelSetLayerType & ioList, LevelSetLayerType & ioUpdate, const bool iContraction);
146
149 void
151
152private:
153 // input
154 LevelSetPointer m_InputLevelSet{};
155
157
158 using NodePairType = std::pair<LevelSetInputType, LevelSetOutputType>;
159};
160} // namespace itk
161
162#ifndef ITK_MANUAL_INSTANTIATION
163# include "itkUpdateMalcolmSparseLevelSet.hxx"
164#endif
165
166#endif // itkUpdateMalcolmSparseLevelSet_h
Templated n-dimensional image class.
Definition: itkImage.h:89
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 LayerMapType::const_iterator LayerMapConstIterator
typename LabelObjectType::LengthType LabelObjectLengthType
Light weight base class for most itk classes.
Derived class for the Malcolm representation of level-set function.
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 Malcolm representation of level-set function.
typename LevelSetType::LabelObjectLengthType LevelSetLabelObjectLengthType
typename EquationContainerType::TermContainerPointer TermContainerPointer
typename LevelSetType::Pointer LevelSetPointer
~UpdateMalcolmSparseLevelSet() override=default
typename LevelSetType::OffsetType LevelSetOffsetType
std::pair< LevelSetInputType, LevelSetOutputType > NodePairType
typename LevelSetType::LabelMapType LevelSetLabelMapType
typename LevelSetType::LayerType LevelSetLayerType
typename LevelSetType::OutputType LevelSetOutputType
void EvolveWithPhasedPropagation(LevelSetLayerType &ioList, LevelSetLayerType &ioUpdate, const bool iContraction)
typename LabelImageType::Pointer LabelImagePointer
typename LevelSetType::LayerIterator LevelSetLayerIterator
typename LevelSetType::OutputRealType LevelSetOutputRealType
typename LevelSetType::LayerMapIterator LevelSetLayerMapIterator
typename LevelSetType::LabelMapPointer LevelSetLabelMapPointer
typename EquationContainerType::Pointer EquationContainerPointer
typename LevelSetType::LabelObjectPointer LevelSetLabelObjectPointer
typename LevelSetType::InputType LevelSetInputType
typename LevelSetType::LayerMapType LevelSetLayerMapType
typename LevelSetType::LabelObjectType LevelSetLabelObjectType
typename LevelSetType::LabelObjectLineType LevelSetLabelObjectLineType
typename LevelSetType::LayerConstIterator LevelSetLayerConstIterator
typename LevelSetType::LayerMapConstIterator LevelSetLayerMapConstIterator
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
SizeValueType IdentifierType
Definition: itkIntTypes.h:90