ITK  5.2.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  * 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 itkUpdateMalcolmSparseLevelSet_h
20 #define itkUpdateMalcolmSparseLevelSet_h
21 
22 #include "itkImage.h"
30 
31 namespace itk
32 {
41 template <unsigned int VDimension, typename TEquationContainer>
42 class ITK_TEMPLATE_EXPORT UpdateMalcolmSparseLevelSet : public Object
43 {
44 public:
45  ITK_DISALLOW_COPY_AND_MOVE(UpdateMalcolmSparseLevelSet);
46 
50  using Superclass = Object;
51 
53  itkNewMacro(Self);
54 
56  itkTypeMacro(UpdateMalcolmSparseLevelSet, Object);
57 
58  static constexpr unsigned int ImageDimension = VDimension;
59 
65 
68 
73 
78 
82 
83  using EquationContainerType = TEquationContainer;
84  using EquationContainerPointer = typename EquationContainerType::Pointer;
85  using TermContainerPointer = typename EquationContainerType::TermContainerPointer;
86 
87  itkGetModifiableObjectMacro(OutputLevelSet, LevelSetType);
88 
90  void
91  Update();
92 
94  itkSetObjectMacro(InputLevelSet, LevelSetType);
95  itkGetModifiableObjectMacro(InputLevelSet, LevelSetType);
97 
99  itkGetMacro(RMSChangeAccumulator, LevelSetOutputRealType);
100 
102  itkSetObjectMacro(EquationContainer, EquationContainerType);
103  itkGetModifiableObjectMacro(EquationContainer, EquationContainerType);
105 
107  itkSetMacro(CurrentLevelSetId, IdentifierType);
108  itkGetMacro(CurrentLevelSetId, IdentifierType);
110 
111 protected:
113  ~UpdateMalcolmSparseLevelSet() override = default;
114 
115  // output
117 
119 
123 
126 
128 
130 
131  bool m_IsUsingUnPhasedPropagation{ true };
132 
134  void
135  FillUpdateContainer();
136 
139  void
140  EvolveWithUnPhasedPropagation();
141 
144  void
145  EvolveWithPhasedPropagation(LevelSetLayerType & ioList, LevelSetLayerType & ioUpdate, const bool & iContraction);
146 
149  void
150  CompactLayersToSinglePixelThickness();
151 
152 private:
153  // input
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
itkLabelImageToLabelMapFilter.h
itk::MalcolmSparseLevelSetImage::LabelObjectLengthType
typename Superclass::LabelObjectLengthType LabelObjectLengthType
Definition: itkMalcolmSparseLevelSetImage.h:69
itk::MalcolmSparseLevelSetImage::LabelMapType
typename Superclass::LabelMapType LabelMapType
Definition: itkMalcolmSparseLevelSetImage.h:72
itk::MalcolmSparseLevelSetImage::LayerConstIterator
typename Superclass::LayerConstIterator LayerConstIterator
Definition: itkMalcolmSparseLevelSetImage.h:78
itkNeighborhoodAlgorithm.h
itk::UpdateMalcolmSparseLevelSet::LevelSetOffsetType
typename LevelSetType::OffsetType LevelSetOffsetType
Definition: itkUpdateMalcolmSparseLevelSet.h:64
itk::UpdateMalcolmSparseLevelSet::m_InputLevelSet
LevelSetPointer m_InputLevelSet
Definition: itkUpdateMalcolmSparseLevelSet.h:154
itk::UpdateMalcolmSparseLevelSet::LevelSetLayerType
typename LevelSetType::LayerType LevelSetLayerType
Definition: itkUpdateMalcolmSparseLevelSet.h:74
itk::UpdateMalcolmSparseLevelSet::LevelSetLayerMapIterator
typename LevelSetType::LayerMapIterator LevelSetLayerMapIterator
Definition: itkUpdateMalcolmSparseLevelSet.h:80
itk::MalcolmSparseLevelSetImage::LabelObjectType
typename Superclass::LabelObjectType LabelObjectType
Definition: itkMalcolmSparseLevelSetImage.h:67
itk::MalcolmSparseLevelSetImage::LayerIterator
typename Superclass::LayerIterator LayerIterator
Definition: itkMalcolmSparseLevelSetImage.h:77
itk::MalcolmSparseLevelSetImage::LayerMapIterator
typename Superclass::LayerMapIterator LayerMapIterator
Definition: itkMalcolmSparseLevelSetImage.h:81
itk::UpdateMalcolmSparseLevelSet::m_InternalImage
LabelImagePointer m_InternalImage
Definition: itkUpdateMalcolmSparseLevelSet.h:127
itkDiscreteLevelSetImage.h
itkImage.h
itk::SmartPointer< Self >
itk::MalcolmSparseLevelSetImage::LabelObjectPointer
typename Superclass::LabelObjectPointer LabelObjectPointer
Definition: itkMalcolmSparseLevelSetImage.h:68
itkImageRegionIteratorWithIndex.h
itk::UpdateMalcolmSparseLevelSet::LevelSetLabelMapType
typename LevelSetType::LabelMapType LevelSetLabelMapType
Definition: itkUpdateMalcolmSparseLevelSet.h:66
itk::ShapedNeighborhoodIterator
A neighborhood iterator which can take on an arbitrary shape.
Definition: itkShapedNeighborhoodIterator.h:150
itk::MalcolmSparseLevelSetImage::LabelObjectLineType
typename Superclass::LabelObjectLineType LabelObjectLineType
Definition: itkMalcolmSparseLevelSetImage.h:70
itkMalcolmSparseLevelSetImage.h
itk::UpdateMalcolmSparseLevelSet::LevelSetLabelMapPointer
typename LevelSetType::LabelMapPointer LevelSetLabelMapPointer
Definition: itkUpdateMalcolmSparseLevelSet.h:67
itk::UpdateMalcolmSparseLevelSet
Base class for updating the Malcolm representation of level-set function.
Definition: itkUpdateMalcolmSparseLevelSet.h:42
itk::UpdateMalcolmSparseLevelSet::LevelSetInputType
typename LevelSetType::InputType LevelSetInputType
Definition: itkUpdateMalcolmSparseLevelSet.h:62
itk::UpdateMalcolmSparseLevelSet::m_OutputLevelSet
LevelSetPointer m_OutputLevelSet
Definition: itkUpdateMalcolmSparseLevelSet.h:116
itk::UpdateMalcolmSparseLevelSet::LevelSetPointer
typename LevelSetType::Pointer LevelSetPointer
Definition: itkUpdateMalcolmSparseLevelSet.h:61
itk::UpdateMalcolmSparseLevelSet::EquationContainerPointer
typename EquationContainerType::Pointer EquationContainerPointer
Definition: itkUpdateMalcolmSparseLevelSet.h:84
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::MalcolmSparseLevelSetImage::LabelMapPointer
typename Superclass::LabelMapPointer LabelMapPointer
Definition: itkMalcolmSparseLevelSetImage.h:73
itk::UpdateMalcolmSparseLevelSet::m_Update
LevelSetLayerType m_Update
Definition: itkUpdateMalcolmSparseLevelSet.h:118
itk::UpdateMalcolmSparseLevelSet::m_CurrentLevelSetId
IdentifierType m_CurrentLevelSetId
Definition: itkUpdateMalcolmSparseLevelSet.h:120
itk::MalcolmSparseLevelSetImage::InputType
typename Superclass::InputType InputType
Definition: itkMalcolmSparseLevelSetImage.h:59
itk::UpdateMalcolmSparseLevelSet::LevelSetLayerConstIterator
typename LevelSetType::LayerConstIterator LevelSetLayerConstIterator
Definition: itkUpdateMalcolmSparseLevelSet.h:76
itk::UpdateMalcolmSparseLevelSet::LevelSetLayerMapType
typename LevelSetType::LayerMapType LevelSetLayerMapType
Definition: itkUpdateMalcolmSparseLevelSet.h:79
itk::UpdateMalcolmSparseLevelSet::EquationContainerType
TEquationContainer EquationContainerType
Definition: itkUpdateMalcolmSparseLevelSet.h:83
itk::UpdateMalcolmSparseLevelSet::LevelSetLabelObjectType
typename LevelSetType::LabelObjectType LevelSetLabelObjectType
Definition: itkUpdateMalcolmSparseLevelSet.h:69
itk::UpdateMalcolmSparseLevelSet::m_Offset
LevelSetOffsetType m_Offset
Definition: itkUpdateMalcolmSparseLevelSet.h:156
itk::MalcolmSparseLevelSetImage::OutputType
typename Superclass::OutputType OutputType
Definition: itkMalcolmSparseLevelSetImage.h:60
itk::MalcolmSparseLevelSetImage::LayerMapType
typename Superclass::LayerMapType LayerMapType
Definition: itkMalcolmSparseLevelSetImage.h:80
itk::UpdateMalcolmSparseLevelSet::LevelSetLayerMapConstIterator
typename LevelSetType::LayerMapConstIterator LevelSetLayerMapConstIterator
Definition: itkUpdateMalcolmSparseLevelSet.h:81
itk::UpdateMalcolmSparseLevelSet::LabelImagePointer
typename LabelImageType::Pointer LabelImagePointer
Definition: itkUpdateMalcolmSparseLevelSet.h:125
itk::MalcolmSparseLevelSetImage::LayerType
typename Superclass::LayerType LayerType
Definition: itkMalcolmSparseLevelSetImage.h:76
itk::UpdateMalcolmSparseLevelSet::TermContainerPointer
typename EquationContainerType::TermContainerPointer TermContainerPointer
Definition: itkUpdateMalcolmSparseLevelSet.h:85
itk::UpdateMalcolmSparseLevelSet::m_RMSChangeAccumulator
LevelSetOutputRealType m_RMSChangeAccumulator
Definition: itkUpdateMalcolmSparseLevelSet.h:121
itk::UpdateMalcolmSparseLevelSet::NodePairType
std::pair< LevelSetInputType, LevelSetOutputType > NodePairType
Definition: itkUpdateMalcolmSparseLevelSet.h:158
itkShapedNeighborhoodIterator.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::MalcolmSparseLevelSetImage::LayerMapConstIterator
typename Superclass::LayerMapConstIterator LayerMapConstIterator
Definition: itkMalcolmSparseLevelSetImage.h:82
itk::UpdateMalcolmSparseLevelSet::LevelSetLabelObjectLengthType
typename LevelSetType::LabelObjectLengthType LevelSetLabelObjectLengthType
Definition: itkUpdateMalcolmSparseLevelSet.h:71
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:86
itk::UpdateMalcolmSparseLevelSet::m_EquationContainer
EquationContainerPointer m_EquationContainer
Definition: itkUpdateMalcolmSparseLevelSet.h:122
itkLabelMapToLabelImageFilter.h
itk::UpdateMalcolmSparseLevelSet::LevelSetOutputRealType
typename LevelSetType::OutputRealType LevelSetOutputRealType
Definition: itkUpdateMalcolmSparseLevelSet.h:77
itk::LevelSetImage< Index< VDimension >, VDimension, int8_t >::OffsetType
typename ImageBaseType::OffsetType OffsetType
Definition: itkLevelSetImage.h:62
itk::UpdateMalcolmSparseLevelSet::LevelSetLayerIterator
typename LevelSetType::LayerIterator LevelSetLayerIterator
Definition: itkUpdateMalcolmSparseLevelSet.h:75
itk::MalcolmSparseLevelSetImage
Derived class for the Malcolm representation of level-set function.
Definition: itkMalcolmSparseLevelSetImage.h:41
itk::UpdateMalcolmSparseLevelSet::LevelSetLabelObjectPointer
typename LevelSetType::LabelObjectPointer LevelSetLabelObjectPointer
Definition: itkUpdateMalcolmSparseLevelSet.h:70
itk::UpdateMalcolmSparseLevelSet::LevelSetOutputType
typename LevelSetType::OutputType LevelSetOutputType
Definition: itkUpdateMalcolmSparseLevelSet.h:63
itk::IdentifierType
SizeValueType IdentifierType
Definition: itkIntTypes.h:87
itk::MalcolmSparseLevelSetImage::OutputRealType
typename Superclass::OutputRealType OutputRealType
Definition: itkMalcolmSparseLevelSetImage.h:61
itk::UpdateMalcolmSparseLevelSet::LevelSetLabelObjectLineType
typename LevelSetType::LabelObjectLineType LevelSetLabelObjectLineType
Definition: itkUpdateMalcolmSparseLevelSet.h:72