ITK  5.0.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 >
43 class ITK_TEMPLATE_EXPORT UpdateShiSparseLevelSet : public Object
44 {
45 public:
46  ITK_DISALLOW_COPY_AND_ASSIGN(UpdateShiSparseLevelSet);
47 
51  using Superclass = Object;
52 
54  itkNewMacro( Self );
55 
57  itkTypeMacro( UpdateShiSparseLevelSet, Object );
58 
59  static constexpr unsigned int ImageDimension = VDimension;
60 
65  using LevelSetOffsetType = typename LevelSetType::OffsetType;
66 
69 
74 
79 
83 
84  using EquationContainerType = TEquationContainer;
85  using EquationContainerPointer = typename EquationContainerType::Pointer;
86  using TermContainerPointer = typename EquationContainerType::TermContainerPointer;
87 
88  itkGetModifiableObjectMacro(OutputLevelSet, LevelSetType );
89 
91  void Update();
92 
94  itkSetObjectMacro( InputLevelSet, LevelSetType );
95  itkGetModifiableObjectMacro(InputLevelSet, LevelSetType );
97 
99  itkGetMacro( RMSChangeAccumulator, LevelSetOutputRealType );
100 
102  itkSetObjectMacro( EquationContainer, EquationContainerType );
103  itkGetModifiableObjectMacro(EquationContainer, EquationContainerType );
105 
107  itkSetMacro( CurrentLevelSetId, IdentifierType );
108  itkGetMacro( CurrentLevelSetId, IdentifierType );
110 
111 protected:
113  ~UpdateShiSparseLevelSet() override = default;
114 
115  // output
117 
121 
124 
126 
128 
130  // this is the same as Procedure 2
131  // Input is a update image point m_UpdateImage
132  // Input is also ShiSparseLevelSetImagePointer
133  void UpdateLayerPlusOne();
134 
136  void UpdateLayerMinusOne();
137 
139  bool Con( const LevelSetInputType& idx,
140  const LevelSetOutputType& currentStatus,
141  const LevelSetOutputRealType& currentUpdate ) const;
142 
143 private:
144  // input
147 
148  using NodePairType = std::pair< LevelSetInputType, LevelSetOutputType >;
149 };
150 }
151 
152 #ifndef ITK_MANUAL_INSTANTIATION
153 #include "itkUpdateShiSparseLevelSet.hxx"
154 #endif
155 
156 #endif // itkUpdateShiSparseLevelSet_h
typename LevelSetType::LabelObjectLengthType LevelSetLabelObjectLengthType
typename Superclass::LayerIterator LayerIterator
typename Superclass::LabelObjectType LabelObjectType
Light weight base class for most itk classes.
typename Superclass::LabelObjectLineType LabelObjectLineType
typename EquationContainerType::TermContainerPointer TermContainerPointer
typename Superclass::LayerMapConstIterator LayerMapConstIterator
typename LevelSetType::LayerMapIterator LevelSetLayerMapIterator
Derived class for the shi representation of level-set function.
typename LevelSetType::LayerType LevelSetLayerType
typename LevelSetType::OutputType LevelSetOutputType
typename Superclass::LabelObjectPointer LabelObjectPointer
typename LevelSetType::LabelObjectPointer LevelSetLabelObjectPointer
typename Superclass::LayerType LayerType
typename LevelSetType::LabelMapType LevelSetLabelMapType
typename Superclass::InputType InputType
typename Superclass::LayerMapType LayerMapType
typename Superclass::LayerMapIterator LayerMapIterator
typename Superclass::LabelObjectLengthType LabelObjectLengthType
typename EquationContainerType::Pointer EquationContainerPointer
typename LevelSetType::LabelObjectLineType LevelSetLabelObjectLineType
typename LevelSetType::LabelMapPointer LevelSetLabelMapPointer
std::pair< LevelSetInputType, LevelSetOutputType > NodePairType
A neighborhood iterator which can take on an arbitrary shape.
LevelSetOutputRealType m_RMSChangeAccumulator
typename LevelSetType::LabelObjectType LevelSetLabelObjectType
typename LevelSetType::OutputRealType LevelSetOutputRealType
typename LevelSetType::LayerMapType LevelSetLayerMapType
typename LevelSetType::LayerConstIterator LevelSetLayerConstIterator
typename LevelSetType::Pointer LevelSetPointer
SizeValueType IdentifierType
Definition: itkIntTypes.h:87
typename Superclass::LabelMapPointer LabelMapPointer
EquationContainerPointer m_EquationContainer
typename LevelSetType::LayerMapConstIterator LevelSetLayerMapConstIterator
Base class for updating the Shi representation of level-set function.
typename Superclass::LayerConstIterator LayerConstIterator
typename Superclass::LabelMapType LabelMapType
typename Superclass::OutputType OutputType
typename LabelImageType::Pointer LabelImagePointer
typename LevelSetType::InputType LevelSetInputType
typename LevelSetType::OffsetType LevelSetOffsetType
typename Superclass::OutputRealType OutputRealType
Base class for most ITK classes.
Definition: itkObject.h:60
typename LevelSetType::LayerIterator LevelSetLayerIterator
Templated n-dimensional image class.
Definition: itkImage.h:75