ITK  5.2.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  * 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 itkUpdateWhitakerSparseLevelSet_h
20 #define itkUpdateWhitakerSparseLevelSet_h
21 
22 #include "itkImage.h"
30 
31 namespace itk
32 {
42 template <unsigned int VDimension, typename TLevelSetValueType, typename TEquationContainer>
43 class ITK_TEMPLATE_EXPORT UpdateWhitakerSparseLevelSet : public Object
44 {
45 public:
46  ITK_DISALLOW_COPY_AND_MOVE(UpdateWhitakerSparseLevelSet);
47 
51  using Superclass = Object;
52 
54  itkNewMacro(Self);
55 
57  itkTypeMacro(UpdateWhitakerSparseLevelSet, Object);
58 
59  static constexpr unsigned int ImageDimension = VDimension;
60 
61  using LevelSetOutputType = TLevelSetValueType;
62 
67 
70 
75 
81 
85 
86  using EquationContainerType = TEquationContainer;
87  using EquationContainerPointer = typename EquationContainerType::Pointer;
88 
89  using TermContainerType = typename EquationContainerType::TermContainerType;
90  using TermContainerPointer = typename EquationContainerType::TermContainerPointer;
91 
94 
97 
98  itkGetModifiableObjectMacro(OutputLevelSet, LevelSetType);
99 
101  void
102  Update();
103 
105  itkSetObjectMacro(InputLevelSet, LevelSetType);
106  itkGetModifiableObjectMacro(InputLevelSet, LevelSetType);
108 
110  itkSetMacro(TimeStep, LevelSetOutputType);
111  itkGetMacro(TimeStep, LevelSetOutputType);
113 
115  itkGetMacro(RMSChangeAccumulator, LevelSetOutputType);
116 
118  itkSetObjectMacro(EquationContainer, EquationContainerType);
119  itkGetModifiableObjectMacro(EquationContainer, EquationContainerType);
121 
123  itkSetMacro(CurrentLevelSetId, IdentifierType);
124  itkGetMacro(CurrentLevelSetId, IdentifierType);
126 
128  void
129  SetUpdate(const LevelSetLayerType & update);
130 
131 protected:
133  ~UpdateWhitakerSparseLevelSet() override = default;
134 
136  void
137  UpdateLayerZero();
138 
140  void
141  UpdateLayerMinus1();
142 
144  void
145  UpdateLayerPlus1();
146 
148  void
149  UpdateLayerMinus2();
150 
152  void
153  UpdateLayerPlus2();
154 
156  void
157  MovePointIntoZeroLevelSet();
158 
160  void
161  MovePointFromMinus1();
162 
164  void
165  MovePointFromPlus1();
166 
168  void
169  MovePointFromMinus2();
170 
172  void
173  MovePointFromPlus2();
174 
175 private:
179 
181 
185 
188 
191 
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
itkLabelImageToLabelMapFilter.h
itk::WhitakerSparseLevelSetImage
Derived class for the sparse-field representation of level-set function.
Definition: itkWhitakerSparseLevelSetImage.h:41
itk::UpdateWhitakerSparseLevelSet::m_TimeStep
LevelSetOutputType m_TimeStep
Definition: itkUpdateWhitakerSparseLevelSet.h:176
itk::UpdateWhitakerSparseLevelSet::m_TempPhi
LevelSetLayerType m_TempPhi
Definition: itkUpdateWhitakerSparseLevelSet.h:187
itk::UpdateWhitakerSparseLevelSet::LevelSetPointer
typename LevelSetType::Pointer LevelSetPointer
Definition: itkUpdateWhitakerSparseLevelSet.h:64
itk::UpdateWhitakerSparseLevelSet::m_OutputLevelSet
LevelSetPointer m_OutputLevelSet
Definition: itkUpdateWhitakerSparseLevelSet.h:184
itk::UpdateWhitakerSparseLevelSet::LevelSetLabelMapType
typename LevelSetType::LabelMapType LevelSetLabelMapType
Definition: itkUpdateWhitakerSparseLevelSet.h:68
itk::WhitakerSparseLevelSetImage::LabelObjectLengthType
typename Superclass::LabelObjectLengthType LabelObjectLengthType
Definition: itkWhitakerSparseLevelSetImage.h:69
itk::UpdateWhitakerSparseLevelSet::m_InternalImage
LabelImagePointer m_InternalImage
Definition: itkUpdateWhitakerSparseLevelSet.h:192
itkNeighborhoodAlgorithm.h
itk::UpdateWhitakerSparseLevelSet::EquationContainerType
TEquationContainer EquationContainerType
Definition: itkUpdateWhitakerSparseLevelSet.h:86
itk::UpdateWhitakerSparseLevelSet::m_MaxStatus
LevelSetLayerIdType m_MaxStatus
Definition: itkUpdateWhitakerSparseLevelSet.h:190
itk::WhitakerSparseLevelSetImage::LabelObjectLineType
typename Superclass::LabelObjectLineType LabelObjectLineType
Definition: itkWhitakerSparseLevelSetImage.h:70
itk::UpdateWhitakerSparseLevelSet::NodePairType
std::pair< LevelSetInputType, LevelSetOutputType > NodePairType
Definition: itkUpdateWhitakerSparseLevelSet.h:198
itk::UpdateWhitakerSparseLevelSet::m_Update
LevelSetLayerType m_Update
Definition: itkUpdateWhitakerSparseLevelSet.h:182
itkWhitakerSparseLevelSetImage.h
itk::LabelImageToLabelMapFilter
convert a labeled image to a label collection image
Definition: itkLabelImageToLabelMapFilter.h:49
itkDiscreteLevelSetImage.h
itk::UpdateWhitakerSparseLevelSet::EquationContainerPointer
typename EquationContainerType::Pointer EquationContainerPointer
Definition: itkUpdateWhitakerSparseLevelSet.h:87
itkImage.h
itk::UpdateWhitakerSparseLevelSet::LevelSetLayerIterator
typename LevelSetType::LayerIterator LevelSetLayerIterator
Definition: itkUpdateWhitakerSparseLevelSet.h:78
itk::SmartPointer< Self >
itk::WhitakerSparseLevelSetImage::LayerType
typename Superclass::LayerType LayerType
Definition: itkWhitakerSparseLevelSetImage.h:77
itk::UpdateWhitakerSparseLevelSet::LevelSetLayerMapIterator
typename LevelSetType::LayerMapIterator LevelSetLayerMapIterator
Definition: itkUpdateWhitakerSparseLevelSet.h:83
itk::UpdateWhitakerSparseLevelSet::LevelSetLabelObjectType
typename LevelSetType::LabelObjectType LevelSetLabelObjectType
Definition: itkUpdateWhitakerSparseLevelSet.h:71
itkImageRegionIteratorWithIndex.h
itk::ShapedNeighborhoodIterator
A neighborhood iterator which can take on an arbitrary shape.
Definition: itkShapedNeighborhoodIterator.h:150
itk::WhitakerSparseLevelSetImage::LayerIterator
typename Superclass::LayerIterator LayerIterator
Definition: itkWhitakerSparseLevelSetImage.h:78
itk::WhitakerSparseLevelSetImage::LayerMapConstIterator
typename Superclass::LayerMapConstIterator LayerMapConstIterator
Definition: itkWhitakerSparseLevelSetImage.h:83
itk::UpdateWhitakerSparseLevelSet
Base class for updating the level-set function.
Definition: itkUpdateWhitakerSparseLevelSet.h:43
itk::UpdateWhitakerSparseLevelSet::LevelSetLabelObjectPointer
typename LevelSetType::LabelObjectPointer LevelSetLabelObjectPointer
Definition: itkUpdateWhitakerSparseLevelSet.h:72
itk::UpdateWhitakerSparseLevelSet::m_CurrentLevelSetId
IdentifierType m_CurrentLevelSetId
Definition: itkUpdateWhitakerSparseLevelSet.h:178
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::UpdateWhitakerSparseLevelSet::m_EquationContainer
EquationContainerPointer m_EquationContainer
Definition: itkUpdateWhitakerSparseLevelSet.h:180
itk::WhitakerSparseLevelSetImage::LabelObjectType
typename Superclass::LabelObjectType LabelObjectType
Definition: itkWhitakerSparseLevelSetImage.h:67
itk::UpdateWhitakerSparseLevelSet::m_Offset
LevelSetOffsetType m_Offset
Definition: itkUpdateWhitakerSparseLevelSet.h:194
itk::UpdateWhitakerSparseLevelSet::m_TempLevelSet
LevelSetPointer m_TempLevelSet
Definition: itkUpdateWhitakerSparseLevelSet.h:186
itk::UpdateWhitakerSparseLevelSet::LevelSetLayerConstIterator
typename LevelSetType::LayerConstIterator LevelSetLayerConstIterator
Definition: itkUpdateWhitakerSparseLevelSet.h:79
itk::UpdateWhitakerSparseLevelSet::LevelSetLabelObjectLineType
typename LevelSetType::LabelObjectLineType LevelSetLabelObjectLineType
Definition: itkUpdateWhitakerSparseLevelSet.h:74
itk::WhitakerSparseLevelSetImage::LayerIdType
typename Superclass::LayerIdType LayerIdType
Definition: itkWhitakerSparseLevelSetImage.h:66
itk::UpdateWhitakerSparseLevelSet::LevelSetLayerType
typename LevelSetType::LayerType LevelSetLayerType
Definition: itkUpdateWhitakerSparseLevelSet.h:77
itk::UpdateWhitakerSparseLevelSet::LevelSetInputType
typename LevelSetType::InputType LevelSetInputType
Definition: itkUpdateWhitakerSparseLevelSet.h:65
itk::WhitakerSparseLevelSetImage::LabelObjectPointer
typename Superclass::LabelObjectPointer LabelObjectPointer
Definition: itkWhitakerSparseLevelSetImage.h:68
itk::WhitakerSparseLevelSetImage::LayerMapIterator
typename Superclass::LayerMapIterator LayerMapIterator
Definition: itkWhitakerSparseLevelSetImage.h:82
itk::WhitakerSparseLevelSetImage::LabelMapPointer
typename Superclass::LabelMapPointer LabelMapPointer
Definition: itkWhitakerSparseLevelSetImage.h:73
itk::UpdateWhitakerSparseLevelSet::TermContainerPointer
typename EquationContainerType::TermContainerPointer TermContainerPointer
Definition: itkUpdateWhitakerSparseLevelSet.h:90
itk::UpdateWhitakerSparseLevelSet::LabelImagePointer
typename LabelImageType::Pointer LabelImagePointer
Definition: itkUpdateWhitakerSparseLevelSet.h:93
itk::UpdateWhitakerSparseLevelSet::LevelSetLayerMapConstIterator
typename LevelSetType::LayerMapConstIterator LevelSetLayerMapConstIterator
Definition: itkUpdateWhitakerSparseLevelSet.h:84
itk::WhitakerSparseLevelSetImage::InputType
typename Superclass::InputType InputType
Definition: itkWhitakerSparseLevelSetImage.h:59
itk::UpdateWhitakerSparseLevelSet::LevelSetLabelObjectLengthType
typename LevelSetType::LabelObjectLengthType LevelSetLabelObjectLengthType
Definition: itkUpdateWhitakerSparseLevelSet.h:73
itkShapedNeighborhoodIterator.h
itk::WhitakerSparseLevelSetImage::LayerConstIterator
typename Superclass::LayerConstIterator LayerConstIterator
Definition: itkWhitakerSparseLevelSetImage.h:79
itk::UpdateWhitakerSparseLevelSet::LevelSetLabelMapPointer
typename LevelSetType::LabelMapPointer LevelSetLabelMapPointer
Definition: itkUpdateWhitakerSparseLevelSet.h:69
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::UpdateWhitakerSparseLevelSet::TermContainerType
typename EquationContainerType::TermContainerType TermContainerType
Definition: itkUpdateWhitakerSparseLevelSet.h:89
itk::WhitakerSparseLevelSetImage::LabelMapType
typename Superclass::LabelMapType LabelMapType
Definition: itkWhitakerSparseLevelSetImage.h:72
itk::WhitakerSparseLevelSetImage::LayerMapType
typename Superclass::LayerMapType LayerMapType
Definition: itkWhitakerSparseLevelSetImage.h:81
itk::LabelMapToLabelImageFilter
Converts a LabelMap to a labeled image.
Definition: itkLabelMapToLabelImageFilter.h:46
itk::WhitakerSparseLevelSetImage::OutputRealType
typename Superclass::OutputRealType OutputRealType
Definition: itkWhitakerSparseLevelSetImage.h:61
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
itk::UpdateWhitakerSparseLevelSet::LevelSetLayerIdType
typename LevelSetType::LayerIdType LevelSetLayerIdType
Definition: itkUpdateWhitakerSparseLevelSet.h:76
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:86
itk::UpdateWhitakerSparseLevelSet::LevelSetLayerMapType
typename LevelSetType::LayerMapType LevelSetLayerMapType
Definition: itkUpdateWhitakerSparseLevelSet.h:82
itk::UpdateWhitakerSparseLevelSet::LevelSetOutputRealType
typename LevelSetType::OutputRealType LevelSetOutputRealType
Definition: itkUpdateWhitakerSparseLevelSet.h:80
itkLabelMapToLabelImageFilter.h
itk::LevelSetImage< Index< VDimension >, VDimension, TOutput >::OffsetType
typename ImageBaseType::OffsetType OffsetType
Definition: itkLevelSetImage.h:62
itk::UpdateWhitakerSparseLevelSet::m_MinStatus
LevelSetLayerIdType m_MinStatus
Definition: itkUpdateWhitakerSparseLevelSet.h:189
itk::UpdateWhitakerSparseLevelSet::m_InputLevelSet
LevelSetPointer m_InputLevelSet
Definition: itkUpdateWhitakerSparseLevelSet.h:183
itk::UpdateWhitakerSparseLevelSet::m_RMSChangeAccumulator
LevelSetOutputType m_RMSChangeAccumulator
Definition: itkUpdateWhitakerSparseLevelSet.h:177
itk::IdentifierType
SizeValueType IdentifierType
Definition: itkIntTypes.h:87
itk::UpdateWhitakerSparseLevelSet::LevelSetOffsetType
typename LevelSetType::OffsetType LevelSetOffsetType
Definition: itkUpdateWhitakerSparseLevelSet.h:66
itk::UpdateWhitakerSparseLevelSet::LevelSetOutputType
TLevelSetValueType LevelSetOutputType
Definition: itkUpdateWhitakerSparseLevelSet.h:61