ITK  5.2.0
Insight Toolkit
itkUpdateShiSparseLevelSet.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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, typename TEquationContainer>
42 class ITK_TEMPLATE_EXPORT UpdateShiSparseLevelSet : public Object
43 {
44 public:
45  ITK_DISALLOW_COPY_AND_MOVE(UpdateShiSparseLevelSet);
46 
50  using Superclass = Object;
51 
53  itkNewMacro(Self);
54 
56  itkTypeMacro(UpdateShiSparseLevelSet, Object);
57 
58  static constexpr unsigned int ImageDimension = VDimension;
59 
65 
68 
73 
78 
82 
83  using EquationContainerType = TEquationContainer;
84  using EquationContainerPointer = typename EquationContainerType::Pointer;
85  using TermContainerPointer = typename EquationContainerType::TermContainerPointer;
86 
87  itkGetModifiableObjectMacro(OutputLevelSet, LevelSetType);
88 
90  void
91  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
134  UpdateLayerPlusOne();
135 
137  void
138  UpdateLayerMinusOne();
139 
141  bool
142  Con(const LevelSetInputType & idx,
143  const LevelSetOutputType & currentStatus,
144  const LevelSetOutputRealType & currentUpdate) const;
145 
146 private:
147  // input
150 
151  using NodePairType = std::pair<LevelSetInputType, LevelSetOutputType>;
152 };
153 } // namespace itk
154 
155 #ifndef ITK_MANUAL_INSTANTIATION
156 # include "itkUpdateShiSparseLevelSet.hxx"
157 #endif
158 
159 #endif // itkUpdateShiSparseLevelSet_h
itkLabelImageToLabelMapFilter.h
itk::ShiSparseLevelSetImage::LabelObjectLineType
typename Superclass::LabelObjectLineType LabelObjectLineType
Definition: itkShiSparseLevelSetImage.h:66
itk::ShiSparseLevelSetImage::LayerMapConstIterator
typename Superclass::LayerMapConstIterator LayerMapConstIterator
Definition: itkShiSparseLevelSetImage.h:78
itk::UpdateShiSparseLevelSet::LevelSetInputType
typename LevelSetType::InputType LevelSetInputType
Definition: itkUpdateShiSparseLevelSet.h:62
itk::UpdateShiSparseLevelSet::LevelSetLabelObjectPointer
typename LevelSetType::LabelObjectPointer LevelSetLabelObjectPointer
Definition: itkUpdateShiSparseLevelSet.h:70
itk::UpdateShiSparseLevelSet::LevelSetLabelMapType
typename LevelSetType::LabelMapType LevelSetLabelMapType
Definition: itkUpdateShiSparseLevelSet.h:66
itk::UpdateShiSparseLevelSet::m_OutputLevelSet
LevelSetPointer m_OutputLevelSet
Definition: itkUpdateShiSparseLevelSet.h:116
itk::ShiSparseLevelSetImage::LabelObjectType
typename Superclass::LabelObjectType LabelObjectType
Definition: itkShiSparseLevelSetImage.h:63
itkNeighborhoodAlgorithm.h
itk::UpdateShiSparseLevelSet::m_Offset
LevelSetOffsetType m_Offset
Definition: itkUpdateShiSparseLevelSet.h:149
itk::ShiSparseLevelSetImage::LabelObjectPointer
typename Superclass::LabelObjectPointer LabelObjectPointer
Definition: itkShiSparseLevelSetImage.h:64
itk::ShiSparseLevelSetImage::InputType
typename Superclass::InputType InputType
Definition: itkShiSparseLevelSetImage.h:55
itk::UpdateShiSparseLevelSet::LevelSetOutputType
typename LevelSetType::OutputType LevelSetOutputType
Definition: itkUpdateShiSparseLevelSet.h:63
itk::ShiSparseLevelSetImage::LayerIterator
typename Superclass::LayerIterator LayerIterator
Definition: itkShiSparseLevelSetImage.h:73
itk::ShiSparseLevelSetImage::LayerMapIterator
typename Superclass::LayerMapIterator LayerMapIterator
Definition: itkShiSparseLevelSetImage.h:77
itk::ShiSparseLevelSetImage::LabelMapType
typename Superclass::LabelMapType LabelMapType
Definition: itkShiSparseLevelSetImage.h:68
itk::UpdateShiSparseLevelSet::LevelSetLabelMapPointer
typename LevelSetType::LabelMapPointer LevelSetLabelMapPointer
Definition: itkUpdateShiSparseLevelSet.h:67
itkDiscreteLevelSetImage.h
itkImage.h
itk::UpdateShiSparseLevelSet::LevelSetLayerConstIterator
typename LevelSetType::LayerConstIterator LevelSetLayerConstIterator
Definition: itkUpdateShiSparseLevelSet.h:76
itk::SmartPointer< Self >
itk::UpdateShiSparseLevelSet::LevelSetLabelObjectType
typename LevelSetType::LabelObjectType LevelSetLabelObjectType
Definition: itkUpdateShiSparseLevelSet.h:69
itk::UpdateShiSparseLevelSet::LevelSetLabelObjectLengthType
typename LevelSetType::LabelObjectLengthType LevelSetLabelObjectLengthType
Definition: itkUpdateShiSparseLevelSet.h:71
itk::UpdateShiSparseLevelSet::m_RMSChangeAccumulator
LevelSetOutputRealType m_RMSChangeAccumulator
Definition: itkUpdateShiSparseLevelSet.h:119
itkImageRegionIteratorWithIndex.h
itk::ShapedNeighborhoodIterator
A neighborhood iterator which can take on an arbitrary shape.
Definition: itkShapedNeighborhoodIterator.h:150
itk::UpdateShiSparseLevelSet::m_InputLevelSet
LevelSetPointer m_InputLevelSet
Definition: itkUpdateShiSparseLevelSet.h:148
itk::UpdateShiSparseLevelSet::LevelSetLayerMapType
typename LevelSetType::LayerMapType LevelSetLayerMapType
Definition: itkUpdateShiSparseLevelSet.h:79
itk::UpdateShiSparseLevelSet::m_CurrentLevelSetId
IdentifierType m_CurrentLevelSetId
Definition: itkUpdateShiSparseLevelSet.h:118
itk::UpdateShiSparseLevelSet::LevelSetLayerMapConstIterator
typename LevelSetType::LayerMapConstIterator LevelSetLayerMapConstIterator
Definition: itkUpdateShiSparseLevelSet.h:81
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::UpdateShiSparseLevelSet::LevelSetOffsetType
typename LevelSetType::OffsetType LevelSetOffsetType
Definition: itkUpdateShiSparseLevelSet.h:64
itk::UpdateShiSparseLevelSet::EquationContainerType
TEquationContainer EquationContainerType
Definition: itkUpdateShiSparseLevelSet.h:83
itk::ShiSparseLevelSetImage::LayerConstIterator
typename Superclass::LayerConstIterator LayerConstIterator
Definition: itkShiSparseLevelSetImage.h:74
itk::UpdateShiSparseLevelSet::LevelSetOutputRealType
typename LevelSetType::OutputRealType LevelSetOutputRealType
Definition: itkUpdateShiSparseLevelSet.h:77
itk::UpdateShiSparseLevelSet
Base class for updating the Shi representation of level-set function.
Definition: itkUpdateShiSparseLevelSet.h:42
itk::ShiSparseLevelSetImage::OutputRealType
typename Superclass::OutputRealType OutputRealType
Definition: itkShiSparseLevelSetImage.h:57
itk::ShiSparseLevelSetImage::LayerType
typename Superclass::LayerType LayerType
Definition: itkShiSparseLevelSetImage.h:72
itk::UpdateShiSparseLevelSet::LabelImagePointer
typename LabelImageType::Pointer LabelImagePointer
Definition: itkUpdateShiSparseLevelSet.h:123
itk::UpdateShiSparseLevelSet::LevelSetLayerType
typename LevelSetType::LayerType LevelSetLayerType
Definition: itkUpdateShiSparseLevelSet.h:74
itkShiSparseLevelSetImage.h
itk::ShiSparseLevelSetImage::LayerMapType
typename Superclass::LayerMapType LayerMapType
Definition: itkShiSparseLevelSetImage.h:76
itk::UpdateShiSparseLevelSet::m_EquationContainer
EquationContainerPointer m_EquationContainer
Definition: itkUpdateShiSparseLevelSet.h:120
itk::UpdateShiSparseLevelSet::LevelSetLayerMapIterator
typename LevelSetType::LayerMapIterator LevelSetLayerMapIterator
Definition: itkUpdateShiSparseLevelSet.h:80
itk::UpdateShiSparseLevelSet::EquationContainerPointer
typename EquationContainerType::Pointer EquationContainerPointer
Definition: itkUpdateShiSparseLevelSet.h:84
itk::ShiSparseLevelSetImage
Derived class for the shi representation of level-set function.
Definition: itkShiSparseLevelSetImage.h:37
itkShapedNeighborhoodIterator.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ShiSparseLevelSetImage::OutputType
typename Superclass::OutputType OutputType
Definition: itkShiSparseLevelSetImage.h:56
itk::UpdateShiSparseLevelSet::NodePairType
std::pair< LevelSetInputType, LevelSetOutputType > NodePairType
Definition: itkUpdateShiSparseLevelSet.h:151
itk::ShiSparseLevelSetImage::LabelObjectLengthType
typename Superclass::LabelObjectLengthType LabelObjectLengthType
Definition: itkShiSparseLevelSetImage.h:65
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
itk::UpdateShiSparseLevelSet::m_InternalImage
LabelImagePointer m_InternalImage
Definition: itkUpdateShiSparseLevelSet.h:125
itk::UpdateShiSparseLevelSet::LevelSetPointer
typename LevelSetType::Pointer LevelSetPointer
Definition: itkUpdateShiSparseLevelSet.h:61
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:86
itkLabelMapToLabelImageFilter.h
itk::LevelSetImage< Index< VDimension >, VDimension, int8_t >::OffsetType
typename ImageBaseType::OffsetType OffsetType
Definition: itkLevelSetImage.h:62
itk::IdentifierType
SizeValueType IdentifierType
Definition: itkIntTypes.h:87
itk::UpdateShiSparseLevelSet::TermContainerPointer
typename EquationContainerType::TermContainerPointer TermContainerPointer
Definition: itkUpdateShiSparseLevelSet.h:85
itk::UpdateShiSparseLevelSet::LevelSetLayerIterator
typename LevelSetType::LayerIterator LevelSetLayerIterator
Definition: itkUpdateShiSparseLevelSet.h:75
itk::UpdateShiSparseLevelSet::LevelSetLabelObjectLineType
typename LevelSetType::LabelObjectLineType LevelSetLabelObjectLineType
Definition: itkUpdateShiSparseLevelSet.h:72
itk::ShiSparseLevelSetImage::LabelMapPointer
typename Superclass::LabelMapPointer LabelMapPointer
Definition: itkShiSparseLevelSetImage.h:69