ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkMalcolmSparseLevelSetImage.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 :
42  public LevelSetSparseImage< int8_t, VDimension >
43 {
44 public:
45  ITK_DISALLOW_COPY_AND_ASSIGN(MalcolmSparseLevelSetImage);
46 
51 
53  itkNewMacro(Self);
54 
57 
58  static constexpr unsigned int Dimension = VDimension;
59 
60  using InputType = typename Superclass::InputType;
61  using OutputType = typename Superclass::OutputType;
62  using OutputRealType = typename Superclass::OutputRealType;
63  using GradientType = typename Superclass::GradientType;
64  using HessianType = typename Superclass::HessianType;
65  using LevelSetDataType = typename Superclass::LevelSetDataType;
66 
67  using LayerIdType = typename Superclass::LayerIdType;
68  using LabelObjectType = typename Superclass::LabelObjectType;
69  using LabelObjectPointer = typename Superclass::LabelObjectPointer;
70  using LabelObjectLengthType = typename Superclass::LabelObjectLengthType;
71  using LabelObjectLineType = typename Superclass::LabelObjectLineType;
72 
73  using LabelMapType = typename Superclass::LabelMapType;
74  using LabelMapPointer = typename Superclass::LabelMapPointer;
76 
77  using LayerType = typename Superclass::LayerType;
78  using LayerIterator = typename Superclass::LayerIterator;
79  using LayerConstIterator = typename Superclass::LayerConstIterator;
80 
81  using LayerMapType = typename Superclass::LayerMapType;
82  using LayerMapIterator = typename Superclass::LayerMapIterator;
83  using LayerMapConstIterator = typename Superclass::LayerMapConstIterator;
84 
86  using Superclass::Evaluate;
87  OutputType Evaluate( const InputType& inputPixel ) const override;
88 
90  HessianType EvaluateHessian( const InputType& inputPixel ) const override;
91 
93  OutputRealType EvaluateLaplacian( const InputType& inputPixel ) const override;
94 
96  OutputRealType EvaluateMeanCurvature( const InputType& inputPixel ) const override;
97 
98  void EvaluateHessian( const InputType& inputPixel, LevelSetDataType& data ) const override;
99  void EvaluateLaplacian( const InputType& inputPixel, LevelSetDataType& data ) const override;
100  void EvaluateMeanCurvature( const InputType& inputPixel, LevelSetDataType& data ) const override;
101 
102  static inline LayerIdType MinusOneLayer() { return -1; }
103  static inline LayerIdType ZeroLayer() { return 0; }
104  static inline LayerIdType PlusOneLayer() { return 1; }
105 
106 protected:
107 
109 
110  ~MalcolmSparseLevelSetImage() override = default;
111 
113  void InitializeLayers() override;
114 
115  void InitializeInternalLabelList() override;
116 };
117 }
118 #ifndef ITK_MANUAL_INSTANTIATION
119 #include "itkMalcolmSparseLevelSetImage.hxx"
120 #endif
121 
122 #endif // itkMalcolmSparseLevelSetImage_h
typename Superclass::LayerConstIterator LayerConstIterator
typename Superclass::HessianType HessianType
typename Superclass::LayerIterator LayerIterator
typename Superclass::LabelObjectLengthType LabelObjectLengthType
typename Superclass::LabelObjectType LabelObjectType
typename Superclass::LayerMapConstIterator LayerMapConstIterator
typename Superclass::LayerIdType LayerIdType
Base class for the sparse representation of a level-set function on one Image.
Derived class for the Malcolm representation of level-set function.
typename Superclass::LabelObjectPointer LabelObjectPointer
typename Superclass::OutputType OutputType
typename Superclass::LevelSetDataType LevelSetDataType
typename Superclass::LayerMapIterator LayerMapIterator
typename Superclass::LabelMapPointer LabelMapPointer
typename Superclass::InputType InputType
typename Superclass::OutputRealType OutputRealType
typename Superclass::LayerMapType LayerMapType
typename Superclass::GradientType GradientType
typename Superclass::LabelObjectLineType LabelObjectLineType
typename Superclass::LayerType LayerType
typename Superclass::RegionType RegionType
Base class for all data objects in ITK.
typename Superclass::LabelMapType LabelMapType