ITK  5.3.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 typename Superclass::InputType;
56  using typename Superclass::OutputType;
57  using typename Superclass::OutputRealType;
58  using typename Superclass::GradientType;
59  using typename Superclass::HessianType;
60  using typename Superclass::LevelSetDataType;
61 
62  using typename Superclass::LayerIdType;
63  using typename Superclass::LabelObjectType;
64  using typename Superclass::LabelObjectPointer;
65  using typename Superclass::LabelObjectLengthType;
66  using typename Superclass::LabelObjectLineType;
67 
68  using typename Superclass::LabelMapType;
69  using typename Superclass::LabelMapPointer;
70  using typename Superclass::RegionType;
71 
72  using typename Superclass::LayerType;
73  using typename Superclass::LayerIterator;
74  using typename Superclass::LayerConstIterator;
75 
76  using typename Superclass::LayerMapType;
77  using typename Superclass::LayerMapIterator;
78  using 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::Index
Represent a n-dimensional index in a n-dimensional image.
Definition: itkIndex.h:67
itk::ShiSparseLevelSetImage::PlusThreeLayer
static LayerIdType PlusThreeLayer()
Definition: itkShiSparseLevelSetImage.h:120
itk::LevelSetBase< Index< VDimension >, VDimension, int8_t, ImageBase< VDimension > >::OutputRealType
typename NumericTraits< OutputType >::RealType OutputRealType
Definition: itkLevelSetBase.h:61
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::SmartPointer< Self >
itkLevelSetSparseImage.h
itk::ShiSparseLevelSetImage::PlusOneLayer
static LayerIdType PlusOneLayer()
Definition: itkShiSparseLevelSetImage.h:115
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::Matrix
A templated class holding a M x N size Matrix.
Definition: itkMatrix.h:51
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::MinusOneLayer
static LayerIdType MinusOneLayer()
Definition: itkShiSparseLevelSetImage.h:110
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
itk::LevelSetBase< Index< VDimension >, VDimension, int8_t, ImageBase< VDimension > >::OutputType
int8_t OutputType
Definition: itkLevelSetBase.h:59
itk::GTest::TypedefsAndConstructors::Dimension2::Dimension
constexpr unsigned int Dimension
Definition: itkGTestTypedefsAndConstructors.h:44
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293