ITK  5.4.0
Insight Toolkit
itkMalcolmSparseLevelSetImage.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  * https://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 itkMalcolmSparseLevelSetImage_h
20 #define itkMalcolmSparseLevelSetImage_h
21 
22 #include "itkImage.h"
23 #include "itkLevelSetSparseImage.h"
24 
25 #include "itkLabelObject.h"
26 #include "itkLabelMap.h"
27 
28 namespace itk
29 {
40 template <unsigned int VDimension>
41 class ITK_TEMPLATE_EXPORT MalcolmSparseLevelSetImage : public LevelSetSparseImage<int8_t, VDimension>
42 {
43 public:
44  ITK_DISALLOW_COPY_AND_MOVE(MalcolmSparseLevelSetImage);
45 
50 
52  itkNewMacro(Self);
53 
55  itkOverrideGetNameOfClassMacro(MalcolmSparseLevelSetImage);
56 
57  static constexpr unsigned int Dimension = VDimension;
58 
59  using typename Superclass::InputType;
60  using typename Superclass::OutputType;
61  using typename Superclass::OutputRealType;
62  using typename Superclass::GradientType;
63  using typename Superclass::HessianType;
64  using typename Superclass::LevelSetDataType;
65 
66  using typename Superclass::LayerIdType;
67  using typename Superclass::LabelObjectType;
68  using typename Superclass::LabelObjectPointer;
69  using typename Superclass::LabelObjectLengthType;
70  using typename Superclass::LabelObjectLineType;
71 
72  using typename Superclass::LabelMapType;
73  using typename Superclass::LabelMapPointer;
74  using typename Superclass::RegionType;
75 
76  using typename Superclass::LayerType;
77  using typename Superclass::LayerIterator;
78  using typename Superclass::LayerConstIterator;
79 
80  using typename Superclass::LayerMapType;
81  using typename Superclass::LayerMapIterator;
82  using typename Superclass::LayerMapConstIterator;
83 
85  using Superclass::Evaluate;
87  Evaluate(const InputType & inputPixel) const override;
88 
91  EvaluateHessian(const InputType & inputPixel) const override;
92 
95  EvaluateLaplacian(const InputType & inputPixel) const override;
96 
99  EvaluateMeanCurvature(const InputType & inputPixel) const override;
100 
101  void
102  EvaluateHessian(const InputType & inputPixel, LevelSetDataType & data) const override;
103  void
104  EvaluateLaplacian(const InputType & inputPixel, LevelSetDataType & data) const override;
105  void
106  EvaluateMeanCurvature(const InputType & inputPixel, LevelSetDataType & data) const override;
107 
108  static inline LayerIdType
110  {
111  return -1;
112  }
113  static inline LayerIdType
115  {
116  return 0;
117  }
118  static inline LayerIdType
120  {
121  return 1;
122  }
123 
124 protected:
126 
127  ~MalcolmSparseLevelSetImage() override = default;
128 
130  void
131  InitializeLayers() override;
132 
133  void
134  InitializeInternalLabelList() override;
135 };
136 } // namespace itk
137 #ifndef ITK_MANUAL_INSTANTIATION
138 # include "itkMalcolmSparseLevelSetImage.hxx"
139 #endif
140 
141 #endif // itkMalcolmSparseLevelSetImage_h
itk::Index
Represent a n-dimensional index in a n-dimensional image.
Definition: itkIndex.h:70
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
itkImage.h
itk::LevelSetSparseImage< int8_t, VDimension >::LayerIdType
int8_t LayerIdType
Definition: itkLevelSetSparseImage.h:64
itk::SmartPointer< Self >
itk::MalcolmSparseLevelSetImage::ZeroLayer
static LayerIdType ZeroLayer()
Definition: itkMalcolmSparseLevelSetImage.h:114
itkLabelMap.h
itk::MalcolmSparseLevelSetImage::PlusOneLayer
static LayerIdType PlusOneLayer()
Definition: itkMalcolmSparseLevelSetImage.h:119
itkLevelSetSparseImage.h
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itkLabelObject.h
itk::Matrix
A templated class holding a M x N size Matrix.
Definition: itkMatrix.h:52
itk::MalcolmSparseLevelSetImage::MinusOneLayer
static LayerIdType MinusOneLayer()
Definition: itkMalcolmSparseLevelSetImage.h:109
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:61
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::MalcolmSparseLevelSetImage
Derived class for the Malcolm representation of level-set function.
Definition: itkMalcolmSparseLevelSetImage.h:41
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293