ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkUpdateShiSparseLevelSet.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 __itkUpdateShiSparseLevelSet_h
20 #define __itkUpdateShiSparseLevelSet_h
21 
22 #include "itkImage.h"
30 
31 namespace itk
32 {
41 template< unsigned int VDimension,
42  typename TEquationContainer >
44 {
45 public:
49  typedef Object Superclass;
50 
52  itkNewMacro( Self );
53 
55  itkTypeMacro( UpdateShiSparseLevelSet, 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 ~UpdateShiSparseLevelSet();
112 
113  // output
115 
119 
122 
124 
126 
128  // this is the same as Procedure 2
129  // Input is a update image point m_UpdateImage
130  // Input is also ShiSparseLevelSetImagePointer
131  void UpdateLayerPlusOne();
132 
134  void UpdateLayerMinusOne();
135 
137  bool Con( const LevelSetInputType& iIdx,
138  const LevelSetOutputType& iCurrentStatus,
139  const LevelSetOutputRealType& iCurrentUpdate ) const;
140 
141 private:
142  UpdateShiSparseLevelSet( const Self& ); // purposely not implemented
143  void operator = ( const Self& ); // purposely not implemented
144 
145  // input
148 
149  typedef std::pair< LevelSetInputType, LevelSetOutputType > NodePairType;
150 };
151 }
152 
153 #ifndef ITK_MANUAL_INSTANTIATION
154 #include "itkUpdateShiSparseLevelSet.hxx"
155 #endif
156 
157 #endif // __itkUpdateShiSparseLevelSet_h
EquationContainerType::Pointer EquationContainerPointer
Light weight base class for most itk classes.
Superclass::LabelObjectLineType LabelObjectLineType
Represent the offset between two n-dimensional indexes in a n-dimensional image.
Definition: itkOffset.h:55
LevelSetType::LabelObjectLengthType LevelSetLabelObjectLengthType
LevelSetType::LayerMapIterator LevelSetLayerMapIterator
Derived class for the shi representation of level-set function.
LevelSetType::LabelMapPointer LevelSetLabelMapPointer
LevelSetType::LayerConstIterator LevelSetLayerConstIterator
Superclass::LabelMapType LabelMapType
LevelSetType::OutputRealType LevelSetOutputRealType
A neighborhood iterator which can take on an arbitrary shape.
LevelSetOutputRealType m_RMSChangeAccumulator
Superclass::OutputRealType OutputRealType
std::pair< LevelSetInputType, LevelSetOutputType > NodePairType
SizeValueType IdentifierType
Definition: itkIntTypes.h:147
LevelSetType::LabelObjectLineType LevelSetLabelObjectLineType
static const unsigned int ImageDimension
LevelSetType::LabelObjectPointer LevelSetLabelObjectPointer
Superclass::LayerIterator LayerIterator
Superclass::LayerMapIterator LayerMapIterator
Superclass::LabelObjectType LabelObjectType
LevelSetType::LayerMapType LevelSetLayerMapType
Superclass::LabelObjectPointer LabelObjectPointer
void operator=(const Self &)
EquationContainerPointer m_EquationContainer
LabelImageType::Pointer LabelImagePointer
Superclass::LabelObjectLengthType LabelObjectLengthType
ShapedNeighborhoodIterator< LabelImageType > NeighborhoodIteratorType
LevelSetType::LayerIterator LevelSetLayerIterator
Base class for updating the Shi representation of level-set function.
ShiSparseLevelSetImage< ImageDimension > LevelSetType
LevelSetType::InputType LevelSetInputType
LevelSetType::OutputType LevelSetOutputType
EquationContainerType::TermContainerPointer TermContainerPointer
LevelSetType::LabelMapType LevelSetLabelMapType
LevelSetType::OffsetType LevelSetOffsetType
Image< int8_t, ImageDimension > LabelImageType
Base class for most ITK classes.
Definition: itkObject.h:57
SmartPointer< const Self > ConstPointer
Superclass::LayerMapConstIterator LayerMapConstIterator
bool Con(const LevelSetInputType &iIdx, const LevelSetOutputType &iCurrentStatus, const LevelSetOutputRealType &iCurrentUpdate) const
Templated n-dimensional image class.
Definition: itkImage.h:75
Superclass::LayerMapType LayerMapType
Superclass::LayerConstIterator LayerConstIterator
LevelSetType::LayerMapConstIterator LevelSetLayerMapConstIterator
LevelSetType::LayerType LevelSetLayerType
LevelSetType::LabelObjectType LevelSetLabelObjectType