ITK  4.9.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 >
46 {
47 public:
51  typedef Object Superclass;
52 
54  itkNewMacro( Self );
55 
57  itkTypeMacro( UpdateWhitakerSparseLevelSet, Object );
58 
59  itkStaticConstMacro( ImageDimension, unsigned int, VDimension );
60 
61  typedef TLevelSetValueType LevelSetOutputType;
62 
68 
71 
76 
82 
86 
87  typedef TEquationContainer EquationContainerType;
88  typedef typename EquationContainerType::Pointer EquationContainerPointer;
89 
90  typedef typename EquationContainerType::TermContainerType TermContainerType;
91  typedef typename EquationContainerType::TermContainerPointer TermContainerPointer;
92 
95 
98 
99  itkGetModifiableObjectMacro(OutputLevelSet, LevelSetType );
100 
102  void 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 SetUpdate( const LevelSetLayerType& update );
129 
130 protected:
133 
135  void UpdateLayerZero();
136 
138  void UpdateLayerMinus1();
139 
141  void UpdateLayerPlus1();
142 
144  void UpdateLayerMinus2();
145 
147  void UpdateLayerPlus2();
148 
151 
153  void MovePointFromMinus1();
154 
156  void MovePointFromPlus1();
157 
159  void MovePointFromMinus2();
160 
162  void MovePointFromPlus2();
163 
164 private:
165  UpdateWhitakerSparseLevelSet( const Self& ) ITK_DELETE_FUNCTION;
166  void operator = ( const Self& ) ITK_DELETE_FUNCTION;
167 
171 
173 
177 
180 
183 
185 
187 
189 
191 };
192 }
193 
194 #ifndef ITK_MANUAL_INSTANTIATION
195 #include "itkUpdateWhitakerSparseLevelSet.hxx"
196 #endif
197 #endif // itkUpdateWhitakerSparseLevelSet_h
LabelImageToLabelMapFilter< LabelImageType, LevelSetLabelMapType > LabelImageToLabelMapFilterType
convert a labeled image to a label collection image
Light weight base class for most itk classes.
EquationContainerType::Pointer EquationContainerPointer
Represent the offset between two n-dimensional indexes in a n-dimensional image.
Definition: itkOffset.h:55
Superclass::LabelObjectLengthType LabelObjectLengthType
Superclass::LayerConstIterator LayerConstIterator
LevelSetType::LabelMapPointer LevelSetLabelMapPointer
LevelSetType::LayerMapIterator LevelSetLayerMapIterator
Superclass::LayerMapConstIterator LayerMapConstIterator
A neighborhood iterator which can take on an arbitrary shape.
Image< LevelSetLayerIdType, ImageDimension > LabelImageType
LabelMapToLabelImageFilter< LevelSetLabelMapType, LabelImageType > LabelMapToLabelImageFilterType
SizeValueType IdentifierType
Definition: itkIntTypes.h:147
Derived class for the sparse-field representation of level-set function.
EquationContainerType::TermContainerPointer TermContainerPointer
LevelSetType::LayerMapConstIterator LevelSetLayerMapConstIterator
LevelSetType::LayerConstIterator LevelSetLayerConstIterator
LevelSetType::LabelObjectLengthType LevelSetLabelObjectLengthType
void SetUpdate(const LevelSetLayerType &update)
Superclass::LabelObjectLineType LabelObjectLineType
Superclass::LayerMapIterator LayerMapIterator
Base class for updating the level-set function.
LevelSetType::LabelObjectLineType LevelSetLabelObjectLineType
EquationContainerType::TermContainerType TermContainerType
Superclass::LabelObjectPointer LabelObjectPointer
std::pair< LevelSetInputType, LevelSetOutputType > NodePairType
LevelSetType::LabelObjectPointer LevelSetLabelObjectPointer
Base class for most ITK classes.
Definition: itkObject.h:57
LevelSetType::OutputRealType LevelSetOutputRealType
LevelSetType::LabelObjectType LevelSetLabelObjectType
Templated n-dimensional image class.
Definition: itkImage.h:75
WhitakerSparseLevelSetImage< LevelSetOutputType, ImageDimension > LevelSetType
Converts a LabelMap to a labeled image.