ITK  4.13.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:
49  typedef Object Superclass;
50 
52  itkNewMacro( Self );
53 
55  itkTypeMacro( UpdateMalcolmSparseLevelSet, Object );
56 
57  itkStaticConstMacro( ImageDimension, unsigned int, VDimension );
58 
64 
67 
72 
77 
81 
82  typedef TEquationContainer EquationContainerType;
83  typedef typename EquationContainerType::Pointer EquationContainerPointer;
84  typedef typename EquationContainerType::TermContainerPointer TermContainerPointer;
85 
86  itkGetModifiableObjectMacro(OutputLevelSet, LevelSetType );
87 
89  void Update();
90 
92  itkSetObjectMacro( InputLevelSet, LevelSetType );
93  itkGetModifiableObjectMacro(InputLevelSet, LevelSetType );
95 
97  itkGetMacro( RMSChangeAccumulator, LevelSetOutputRealType );
98 
100  itkSetObjectMacro( EquationContainer, EquationContainerType );
101  itkGetModifiableObjectMacro(EquationContainer, EquationContainerType );
103 
105  itkSetMacro( CurrentLevelSetId, IdentifierType );
106  itkGetMacro( CurrentLevelSetId, IdentifierType );
108 
109 protected:
111  virtual ~UpdateMalcolmSparseLevelSet() ITK_OVERRIDE;
112 
113  // output
114  LevelSetPointer m_OutputLevelSet;
115 
117 
118  IdentifierType m_CurrentLevelSetId;
119  LevelSetOutputRealType m_RMSChangeAccumulator;
120  EquationContainerPointer m_EquationContainer;
121 
122  typedef Image< int8_t, ImageDimension > LabelImageType;
123  typedef typename LabelImageType::Pointer LabelImagePointer;
124 
125  LabelImagePointer m_InternalImage;
126 
128 
129  bool m_IsUsingUnPhasedPropagation;
130 
132  void FillUpdateContainer();
133 
136  void EvolveWithUnPhasedPropagation();
137 
140  void EvolveWithPhasedPropagation( LevelSetLayerType& ioList,
141  LevelSetLayerType& ioUpdate,
142  const bool& iContraction );
143 
146  void CompactLayersToSinglePixelThickness();
147 
148 private:
149  ITK_DISALLOW_COPY_AND_ASSIGN(UpdateMalcolmSparseLevelSet);
150 
151  // input
152  LevelSetPointer m_InputLevelSet;
153 
155 
157 
158 };
159 }
160 
161 #ifndef ITK_MANUAL_INSTANTIATION
162 #include "itkUpdateMalcolmSparseLevelSet.hxx"
163 #endif
164 
165 #endif // itkUpdateMalcolmSparseLevelSet_h
LevelSetType::LayerMapConstIterator LevelSetLayerMapConstIterator
Light weight base class for most itk classes.
Represent the offset between two n-dimensional indexes in a n-dimensional image.
Definition: itkOffset.h:56
Superclass::LabelObjectType LabelObjectType
LevelSetType::LayerIterator LevelSetLayerIterator
LevelSetType::LabelObjectPointer LevelSetLabelObjectPointer
A neighborhood iterator which can take on an arbitrary shape.
MalcolmSparseLevelSetImage< ImageDimension > LevelSetType
LevelSetType::LabelObjectLineType LevelSetLabelObjectLineType
Superclass::LayerMapConstIterator LayerMapConstIterator
EquationContainerType::Pointer EquationContainerPointer
SizeValueType IdentifierType
Definition: itkIntTypes.h:147
Derived class for the Malcolm representation of level-set function.
LevelSetType::LabelObjectLengthType LevelSetLabelObjectLengthType
std::pair< LevelSetInputType, LevelSetOutputType > NodePairType
LevelSetType::OutputRealType LevelSetOutputRealType
LevelSetType::LayerConstIterator LevelSetLayerConstIterator
EquationContainerType::TermContainerPointer TermContainerPointer
LevelSetType::LabelObjectType LevelSetLabelObjectType
KWIML_INT_int8_t int8_t
Definition: itkIntTypes.h:82
Superclass::LabelObjectPointer LabelObjectPointer
Superclass::LayerConstIterator LayerConstIterator
Superclass::LabelObjectLineType LabelObjectLineType
Superclass::LayerMapIterator LayerMapIterator
Superclass::LabelObjectLengthType LabelObjectLengthType
Base class for most ITK classes.
Definition: itkObject.h:59
LevelSetType::LabelMapPointer LevelSetLabelMapPointer
LevelSetType::LayerMapIterator LevelSetLayerMapIterator
Templated n-dimensional image class.
Definition: itkImage.h:75
Base class for updating the Malcolm representation of level-set function.