ITK  4.3.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  class 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 
67 
70 
75 
81 
85 
86  typedef TEquationContainer EquationContainerType;
87  typedef typename EquationContainerType::Pointer EquationContainerPointer;
88 
89  typedef typename EquationContainerType::TermContainerType TermContainerType;
90  typedef typename EquationContainerType::TermContainerPointer TermContainerPointer;
91 
94 
97 
98  itkGetObjectMacro( OutputLevelSet, LevelSetType );
99 
101  void Update();
102 
104  itkSetObjectMacro( InputLevelSet, LevelSetType );
105  itkGetObjectMacro( InputLevelSet, LevelSetType );
107 
109  itkSetMacro( TimeStep, LevelSetOutputType );
110  itkGetMacro( TimeStep, LevelSetOutputType );
112 
114  itkGetMacro( RMSChangeAccumulator, LevelSetOutputType );
115 
117  itkSetObjectMacro( EquationContainer, EquationContainerType );
118  itkGetObjectMacro( EquationContainer, EquationContainerType );
120 
122  itkSetMacro( CurrentLevelSetId, IdentifierType );
123  itkGetMacro( CurrentLevelSetId, IdentifierType );
125 
127  void SetUpdate( const LevelSetLayerType& iUpdate );
128 
129 protected:
132 
134  void UpdateLayerZero();
135 
137  void UpdateLayerMinus1();
138 
140  void UpdateLayerPlus1();
141 
143  void UpdateLayerMinus2();
144 
146  void UpdateLayerPlus2();
147 
150 
152  void MovePointFromMinus1();
153 
155  void MovePointFromPlus1();
156 
158  void MovePointFromMinus2();
159 
161  void MovePointFromPlus2();
162 
163 private:
164  UpdateWhitakerSparseLevelSet( const Self& ); // purposely not implemented
165  void operator = ( const Self& ); // purposely not implemented
166 
170 
172 
176 
179 
182 
184 
186 
187  typedef std::pair< LevelSetInputType, LevelSetOutputType > NodePairType;
188 };
189 }
190 
191 #ifndef ITK_MANUAL_INSTANTIATION
192 #include "itkUpdateWhitakerSparseLevelSet.hxx"
193 #endif
194 #endif // __itkUpdateWhitakerSparseLevelSet_h
195