ITK  5.2.0
Insight Toolkit
itkShiSparseLevelSetImage.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 itkShiSparseLevelSetImage_h
20 #define itkShiSparseLevelSetImage_h
21 
22 #include "itkLevelSetSparseImage.h"
23 
24 namespace itk
25 {
36 template <unsigned int VDimension>
37 class ITK_TEMPLATE_EXPORT ShiSparseLevelSetImage : public LevelSetSparseImage<int8_t, VDimension>
38 {
39 public:
40  ITK_DISALLOW_COPY_AND_MOVE(ShiSparseLevelSetImage);
41 
46 
48  itkNewMacro(Self);
49 
52 
53  static constexpr unsigned int Dimension = VDimension;
54 
55  using InputType = typename Superclass::InputType;
56  using OutputType = typename Superclass::OutputType;
57  using OutputRealType = typename Superclass::OutputRealType;
58  using GradientType = typename Superclass::GradientType;
59  using HessianType = typename Superclass::HessianType;
60  using LevelSetDataType = typename Superclass::LevelSetDataType;
61 
62  using LayerIdType = typename Superclass::LayerIdType;
63  using LabelObjectType = typename Superclass::LabelObjectType;
64  using LabelObjectPointer = typename Superclass::LabelObjectPointer;
65  using LabelObjectLengthType = typename Superclass::LabelObjectLengthType;
66  using LabelObjectLineType = typename Superclass::LabelObjectLineType;
67 
68  using LabelMapType = typename Superclass::LabelMapType;
69  using LabelMapPointer = typename Superclass::LabelMapPointer;
71 
72  using LayerType = typename Superclass::LayerType;
73  using LayerIterator = typename Superclass::LayerIterator;
74  using LayerConstIterator = typename Superclass::LayerConstIterator;
75 
76  using LayerMapType = typename Superclass::LayerMapType;
77  using LayerMapIterator = typename Superclass::LayerMapIterator;
78  using LayerMapConstIterator = typename Superclass::LayerMapConstIterator;
79 
81  using Superclass::Evaluate;
83  Evaluate(const InputType & inputIndex) const override;
84 
87  EvaluateHessian(const InputType & inputIndex) const override;
88 
91  EvaluateLaplacian(const InputType & inputIndex) const override;
92 
95  EvaluateMeanCurvature(const InputType & inputIndex) const override;
96 
97  void
98  EvaluateHessian(const InputType & inputIndex, LevelSetDataType & data) const override;
99  void
100  EvaluateLaplacian(const InputType & inputIndex, LevelSetDataType & data) const override;
101  void
102  EvaluateMeanCurvature(const InputType & inputIndex, LevelSetDataType & data) const override;
103 
104  static inline LayerIdType
106  {
107  return -3;
108  }
109  static inline LayerIdType
111  {
112  return -1;
113  }
114  static inline LayerIdType
116  {
117  return 1;
118  }
119  static inline LayerIdType
121  {
122  return 3;
123  }
124 
125 protected:
127 
128  ~ShiSparseLevelSetImage() override = default;
129 
131  void
132  InitializeLayers() override;
133 
134  void
135  InitializeInternalLabelList() override;
136 
137 private:
138 };
139 } // namespace itk
140 
141 #ifndef ITK_MANUAL_INSTANTIATION
142 # include "itkShiSparseLevelSetImage.hxx"
143 #endif
144 
145 #endif // itkShiSparseLevelSetImage_h
itk::ShiSparseLevelSetImage::LabelObjectLineType
typename Superclass::LabelObjectLineType LabelObjectLineType
Definition: itkShiSparseLevelSetImage.h:66
itk::ShiSparseLevelSetImage::LayerMapConstIterator
typename Superclass::LayerMapConstIterator LayerMapConstIterator
Definition: itkShiSparseLevelSetImage.h:78
itk::ShiSparseLevelSetImage::LabelObjectType
typename Superclass::LabelObjectType LabelObjectType
Definition: itkShiSparseLevelSetImage.h:63
itk::ShiSparseLevelSetImage::PlusThreeLayer
static LayerIdType PlusThreeLayer()
Definition: itkShiSparseLevelSetImage.h:120
itk::LevelSetSparseImage
Base class for the sparse representation of a level-set function on one Image.
Definition: itkLevelSetSparseImage.h:42
itk::ShiSparseLevelSetImage::MinusThreeLayer
static LayerIdType MinusThreeLayer()
Definition: itkShiSparseLevelSetImage.h:105
itk::ShiSparseLevelSetImage::LabelObjectPointer
typename Superclass::LabelObjectPointer LabelObjectPointer
Definition: itkShiSparseLevelSetImage.h:64
itk::ShiSparseLevelSetImage::InputType
typename Superclass::InputType InputType
Definition: itkShiSparseLevelSetImage.h:55
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::SmartPointer< Self >
itkLevelSetSparseImage.h
itk::ShiSparseLevelSetImage::PlusOneLayer
static LayerIdType PlusOneLayer()
Definition: itkShiSparseLevelSetImage.h:115
itk::ShiSparseLevelSetImage::LayerConstIterator
typename Superclass::LayerConstIterator LayerConstIterator
Definition: itkShiSparseLevelSetImage.h:74
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::ShiSparseLevelSetImage::OutputRealType
typename Superclass::OutputRealType OutputRealType
Definition: itkShiSparseLevelSetImage.h:57
itk::ShiSparseLevelSetImage::LayerType
typename Superclass::LayerType LayerType
Definition: itkShiSparseLevelSetImage.h:72
itk::ShiSparseLevelSetImage::LayerMapType
typename Superclass::LayerMapType LayerMapType
Definition: itkShiSparseLevelSetImage.h:76
itk::ShiSparseLevelSetImage
Derived class for the shi representation of level-set function.
Definition: itkShiSparseLevelSetImage.h:37
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::ShiSparseLevelSetImage::MinusOneLayer
static LayerIdType MinusOneLayer()
Definition: itkShiSparseLevelSetImage.h:110
itk::ShiSparseLevelSetImage::HessianType
typename Superclass::HessianType HessianType
Definition: itkShiSparseLevelSetImage.h:59
itk::ShiSparseLevelSetImage::LayerIdType
typename Superclass::LayerIdType LayerIdType
Definition: itkShiSparseLevelSetImage.h:62
itk::ShiSparseLevelSetImage::LabelObjectLengthType
typename Superclass::LabelObjectLengthType LabelObjectLengthType
Definition: itkShiSparseLevelSetImage.h:65
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
itk::ShiSparseLevelSetImage::RegionType
typename Superclass::RegionType RegionType
Definition: itkShiSparseLevelSetImage.h:70
itk::ShiSparseLevelSetImage::GradientType
typename Superclass::GradientType GradientType
Definition: itkShiSparseLevelSetImage.h:58
itk::GTest::TypedefsAndConstructors::Dimension2::Dimension
constexpr unsigned int Dimension
Definition: itkGTestTypedefsAndConstructors.h:44
itk::ShiSparseLevelSetImage::LevelSetDataType
typename Superclass::LevelSetDataType LevelSetDataType
Definition: itkShiSparseLevelSetImage.h:60
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293
itk::ShiSparseLevelSetImage::LabelMapPointer
typename Superclass::LabelMapPointer LabelMapPointer
Definition: itkShiSparseLevelSetImage.h:69