ITK  4.2.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 
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& ); // purposely not implemented
166  void operator = ( const Self& ); // purposely not implemented
167 
171 
173 
177 
180 
183 
185 
187 
188  typedef std::pair< LevelSetInputType, LevelSetOutputType > NodePairType;
189 };
190 }
191 
192 #ifndef ITK_MANUAL_INSTANTIATION
193 #include "itkUpdateWhitakerSparseLevelSet.hxx"
194 #endif
195 #endif // __itkUpdateWhitakerSparseLevelSet_h
196