ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkUpdateWhitakerSparseLevelSet.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 itkUpdateWhitakerSparseLevelSet_h
20 #define itkUpdateWhitakerSparseLevelSet_h
21 
22 #include "itkImage.h"
30 
31 namespace itk
32 {
42 template< unsigned int VDimension,
43  typename TLevelSetValueType,
44  typename TEquationContainer >
45 class ITK_TEMPLATE_EXPORT UpdateWhitakerSparseLevelSet : public Object
46 {
47 public:
48  ITK_DISALLOW_COPY_AND_ASSIGN(UpdateWhitakerSparseLevelSet);
49 
53  using Superclass = Object;
54 
56  itkNewMacro( Self );
57 
59  itkTypeMacro( UpdateWhitakerSparseLevelSet, Object );
60 
61  static constexpr unsigned int ImageDimension = VDimension;
62 
63  using LevelSetOutputType = TLevelSetValueType;
64 
65  using LevelSetType =
70 
73 
78 
84 
88 
89  using EquationContainerType = TEquationContainer;
90  using EquationContainerPointer = typename EquationContainerType::Pointer;
91 
92  using TermContainerType = typename EquationContainerType::TermContainerType;
93  using TermContainerPointer = typename EquationContainerType::TermContainerPointer;
94 
97 
100 
101  itkGetModifiableObjectMacro(OutputLevelSet, LevelSetType );
102 
104  void Update();
105 
107  itkSetObjectMacro( InputLevelSet, LevelSetType );
108  itkGetModifiableObjectMacro(InputLevelSet, LevelSetType );
110 
112  itkSetMacro( TimeStep, LevelSetOutputType );
113  itkGetMacro( TimeStep, LevelSetOutputType );
115 
117  itkGetMacro( RMSChangeAccumulator, LevelSetOutputType );
118 
120  itkSetObjectMacro( EquationContainer, EquationContainerType );
121  itkGetModifiableObjectMacro(EquationContainer, EquationContainerType );
123 
125  itkSetMacro( CurrentLevelSetId, IdentifierType );
126  itkGetMacro( CurrentLevelSetId, IdentifierType );
128 
130  void SetUpdate( const LevelSetLayerType& update );
131 
132 protected:
134  ~UpdateWhitakerSparseLevelSet() override = default;
135 
137  void UpdateLayerZero();
138 
140  void UpdateLayerMinus1();
141 
143  void UpdateLayerPlus1();
144 
146  void UpdateLayerMinus2();
147 
149  void UpdateLayerPlus2();
150 
152  void MovePointIntoZeroLevelSet();
153 
155  void MovePointFromMinus1();
156 
158  void MovePointFromPlus1();
159 
161  void MovePointFromMinus2();
162 
164  void MovePointFromPlus2();
165 
166 private:
170 
172 
176 
179 
182 
184 
186 
188 
189  using NodePairType = std::pair< LevelSetInputType, LevelSetOutputType >;
190 };
191 }
192 
193 #ifndef ITK_MANUAL_INSTANTIATION
194 #include "itkUpdateWhitakerSparseLevelSet.hxx"
195 #endif
196 #endif // itkUpdateWhitakerSparseLevelSet_h
typename LevelSetType::LabelMapType LevelSetLabelMapType
convert a labeled image to a label collection image
Light weight base class for most itk classes.
typename Superclass::LayerConstIterator LayerConstIterator
typename LevelSetType::LabelObjectType LevelSetLabelObjectType
typename Superclass::LabelObjectType LabelObjectType
typename Superclass::InputType InputType
typename LevelSetType::Pointer LevelSetPointer
typename Superclass::LayerIterator LayerIterator
typename Superclass::LayerMapType LayerMapType
typename LevelSetType::LabelObjectPointer LevelSetLabelObjectPointer
typename LevelSetType::InputType LevelSetInputType
typename Superclass::LayerMapIterator LayerMapIterator
typename EquationContainerType::TermContainerPointer TermContainerPointer
std::pair< LevelSetInputType, LevelSetOutputType > NodePairType
A neighborhood iterator which can take on an arbitrary shape.
typename LevelSetType::LayerIterator LevelSetLayerIterator
typename EquationContainerType::TermContainerType TermContainerType
typename Superclass::LabelMapType LabelMapType
typename Superclass::LabelMapPointer LabelMapPointer
typename LevelSetType::LabelObjectLineType LevelSetLabelObjectLineType
Derived class for the sparse-field representation of level-set function.
typename LevelSetType::LabelMapPointer LevelSetLabelMapPointer
SizeValueType IdentifierType
Definition: itkIntTypes.h:87
typename LevelSetType::LayerMapConstIterator LevelSetLayerMapConstIterator
typename LevelSetType::LayerConstIterator LevelSetLayerConstIterator
typename LevelSetType::LayerType LevelSetLayerType
typename Superclass::LayerIdType LayerIdType
typename LevelSetType::OffsetType LevelSetOffsetType
typename Superclass::LabelObjectLengthType LabelObjectLengthType
typename Superclass::LayerType LayerType
Base class for updating the level-set function.
typename LabelImageType::Pointer LabelImagePointer
typename Superclass::LayerMapConstIterator LayerMapConstIterator
typename Superclass::LabelObjectLineType LabelObjectLineType
typename Superclass::LabelObjectPointer LabelObjectPointer
typename LevelSetType::LabelObjectLengthType LevelSetLabelObjectLengthType
Base class for most ITK classes.
Definition: itkObject.h:60
typename LevelSetType::OutputRealType LevelSetOutputRealType
typename EquationContainerType::Pointer EquationContainerPointer
Templated n-dimensional image class.
Definition: itkImage.h:75
typename LevelSetType::LayerIdType LevelSetLayerIdType
Converts a LabelMap to a labeled image.
typename Superclass::OutputRealType OutputRealType
typename LevelSetType::LayerMapIterator LevelSetLayerMapIterator
typename LevelSetType::LayerMapType LevelSetLayerMapType