ITK  5.2.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  * 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 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 
56 
57  static constexpr unsigned int Dimension = VDimension;
58 
59  using InputType = typename Superclass::InputType;
60  using OutputType = typename Superclass::OutputType;
61  using OutputRealType = typename Superclass::OutputRealType;
62  using GradientType = typename Superclass::GradientType;
63  using HessianType = typename Superclass::HessianType;
64  using LevelSetDataType = typename Superclass::LevelSetDataType;
65 
66  using LayerIdType = typename Superclass::LayerIdType;
67  using LabelObjectType = typename Superclass::LabelObjectType;
68  using LabelObjectPointer = typename Superclass::LabelObjectPointer;
69  using LabelObjectLengthType = typename Superclass::LabelObjectLengthType;
70  using LabelObjectLineType = typename Superclass::LabelObjectLineType;
71 
72  using LabelMapType = typename Superclass::LabelMapType;
73  using LabelMapPointer = typename Superclass::LabelMapPointer;
75 
76  using LayerType = typename Superclass::LayerType;
77  using LayerIterator = typename Superclass::LayerIterator;
78  using LayerConstIterator = typename Superclass::LayerConstIterator;
79 
80  using LayerMapType = typename Superclass::LayerMapType;
81  using LayerMapIterator = typename Superclass::LayerMapIterator;
82  using LayerMapConstIterator = 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::MalcolmSparseLevelSetImage::LayerIdType
typename Superclass::LayerIdType LayerIdType
Definition: itkMalcolmSparseLevelSetImage.h:66
itk::MalcolmSparseLevelSetImage::LabelObjectLengthType
typename Superclass::LabelObjectLengthType LabelObjectLengthType
Definition: itkMalcolmSparseLevelSetImage.h:69
itk::MalcolmSparseLevelSetImage::LabelMapType
typename Superclass::LabelMapType LabelMapType
Definition: itkMalcolmSparseLevelSetImage.h:72
itk::MalcolmSparseLevelSetImage::LayerConstIterator
typename Superclass::LayerConstIterator LayerConstIterator
Definition: itkMalcolmSparseLevelSetImage.h:78
itk::LevelSetSparseImage
Base class for the sparse representation of a level-set function on one Image.
Definition: itkLevelSetSparseImage.h:42
itk::MalcolmSparseLevelSetImage::LabelObjectType
typename Superclass::LabelObjectType LabelObjectType
Definition: itkMalcolmSparseLevelSetImage.h:67
itk::MalcolmSparseLevelSetImage::LayerIterator
typename Superclass::LayerIterator LayerIterator
Definition: itkMalcolmSparseLevelSetImage.h:77
itk::MalcolmSparseLevelSetImage::LayerMapIterator
typename Superclass::LayerMapIterator LayerMapIterator
Definition: itkMalcolmSparseLevelSetImage.h:81
itk::MalcolmSparseLevelSetImage::GradientType
typename Superclass::GradientType GradientType
Definition: itkMalcolmSparseLevelSetImage.h:62
itkImage.h
itk::SmartPointer< Self >
itk::MalcolmSparseLevelSetImage::LabelObjectPointer
typename Superclass::LabelObjectPointer LabelObjectPointer
Definition: itkMalcolmSparseLevelSetImage.h:68
itk::MalcolmSparseLevelSetImage::LabelObjectLineType
typename Superclass::LabelObjectLineType LabelObjectLineType
Definition: itkMalcolmSparseLevelSetImage.h:70
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::MalcolmSparseLevelSetImage::RegionType
typename Superclass::RegionType RegionType
Definition: itkMalcolmSparseLevelSetImage.h:74
itk::MalcolmSparseLevelSetImage::LabelMapPointer
typename Superclass::LabelMapPointer LabelMapPointer
Definition: itkMalcolmSparseLevelSetImage.h:73
itk::MalcolmSparseLevelSetImage::InputType
typename Superclass::InputType InputType
Definition: itkMalcolmSparseLevelSetImage.h:59
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::MalcolmSparseLevelSetImage::OutputType
typename Superclass::OutputType OutputType
Definition: itkMalcolmSparseLevelSetImage.h:60
itk::MalcolmSparseLevelSetImage::LevelSetDataType
typename Superclass::LevelSetDataType LevelSetDataType
Definition: itkMalcolmSparseLevelSetImage.h:64
itk::MalcolmSparseLevelSetImage::LayerMapType
typename Superclass::LayerMapType LayerMapType
Definition: itkMalcolmSparseLevelSetImage.h:80
itkLabelObject.h
itk::MalcolmSparseLevelSetImage::LayerType
typename Superclass::LayerType LayerType
Definition: itkMalcolmSparseLevelSetImage.h:76
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::MalcolmSparseLevelSetImage::HessianType
typename Superclass::HessianType HessianType
Definition: itkMalcolmSparseLevelSetImage.h:63
itk::MalcolmSparseLevelSetImage::LayerMapConstIterator
typename Superclass::LayerMapConstIterator LayerMapConstIterator
Definition: itkMalcolmSparseLevelSetImage.h:82
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
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::MalcolmSparseLevelSetImage::OutputRealType
typename Superclass::OutputRealType OutputRealType
Definition: itkMalcolmSparseLevelSetImage.h:61
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293