ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkUpdateMalcolmSparseLevelSet.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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,
42  typename TEquationContainer >
43 class ITK_TEMPLATE_EXPORT UpdateMalcolmSparseLevelSet : public Object
44 {
45 public:
46  ITK_DISALLOW_COPY_AND_ASSIGN(UpdateMalcolmSparseLevelSet);
47 
51  using Superclass = Object;
52 
54  itkNewMacro( Self );
55 
57  itkTypeMacro( UpdateMalcolmSparseLevelSet, Object );
58 
59  static constexpr unsigned int ImageDimension = VDimension;
60 
66 
69 
74 
79 
83 
84  using EquationContainerType = TEquationContainer;
85  using EquationContainerPointer = typename EquationContainerType::Pointer;
86  using TermContainerPointer = typename EquationContainerType::TermContainerPointer;
87 
88  itkGetModifiableObjectMacro(OutputLevelSet, LevelSetType );
89 
91  void 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 FillUpdateContainer();
135 
138  void EvolveWithUnPhasedPropagation();
139 
142  void EvolveWithPhasedPropagation( LevelSetLayerType& ioList,
143  LevelSetLayerType& ioUpdate,
144  const bool& iContraction );
145 
148  void CompactLayersToSinglePixelThickness();
149 
150 private:
151  // input
153 
155 
156  using NodePairType = std::pair< LevelSetInputType, LevelSetOutputType >;
157 
158 };
159 }
160 
161 #ifndef ITK_MANUAL_INSTANTIATION
162 #include "itkUpdateMalcolmSparseLevelSet.hxx"
163 #endif
164 
165 #endif // itkUpdateMalcolmSparseLevelSet_h
typename LevelSetType::OutputType LevelSetOutputType
typename LevelSetType::OffsetType LevelSetOffsetType
typename LevelSetType::OutputRealType LevelSetOutputRealType
Light weight base class for most itk classes.
typename LevelSetType::LayerMapIterator LevelSetLayerMapIterator
typename Superclass::LayerConstIterator LayerConstIterator
typename Superclass::LayerIterator LayerIterator
typename LevelSetType::InputType LevelSetInputType
typename Superclass::LabelObjectLengthType LabelObjectLengthType
typename LevelSetType::LayerIterator LevelSetLayerIterator
typename Superclass::LabelObjectType LabelObjectType
typename Superclass::LayerMapConstIterator LayerMapConstIterator
typename LevelSetType::LabelMapType LevelSetLabelMapType
typename LevelSetType::LabelMapPointer LevelSetLabelMapPointer
A neighborhood iterator which can take on an arbitrary shape.
typename LevelSetType::LabelObjectPointer LevelSetLabelObjectPointer
typename LevelSetType::LayerConstIterator LevelSetLayerConstIterator
Derived class for the Malcolm representation of level-set function.
typename Superclass::LabelObjectPointer LabelObjectPointer
SizeValueType IdentifierType
Definition: itkIntTypes.h:87
typename Superclass::OutputType OutputType
typename LevelSetType::LayerMapConstIterator LevelSetLayerMapConstIterator
typename LevelSetType::Pointer LevelSetPointer
typename Superclass::LayerMapIterator LayerMapIterator
typename LevelSetType::LayerMapType LevelSetLayerMapType
typename Superclass::LabelMapPointer LabelMapPointer
typename Superclass::InputType InputType
typename Superclass::OutputRealType OutputRealType
typename Superclass::LayerMapType LayerMapType
typename EquationContainerType::TermContainerPointer TermContainerPointer
std::pair< LevelSetInputType, LevelSetOutputType > NodePairType
typename Superclass::LabelObjectLineType LabelObjectLineType
typename LevelSetType::LabelObjectType LevelSetLabelObjectType
typename LevelSetType::LabelObjectLineType LevelSetLabelObjectLineType
typename Superclass::LayerType LayerType
typename LevelSetType::LayerType LevelSetLayerType
Base class for most ITK classes.
Definition: itkObject.h:60
typename EquationContainerType::Pointer EquationContainerPointer
Templated n-dimensional image class.
Definition: itkImage.h:75
Base class for updating the Malcolm representation of level-set function.
typename Superclass::LabelMapType LabelMapType
typename LabelImageType::Pointer LabelImagePointer
typename LevelSetType::LabelObjectLengthType LevelSetLabelObjectLengthType