ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkShiSparseLevelSetImage.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 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 :
38  public LevelSetSparseImage< int8_t, VDimension >
39 {
40 public:
41  ITK_DISALLOW_COPY_AND_ASSIGN(ShiSparseLevelSetImage);
42 
46  using Superclass =
48 
50  itkNewMacro(Self);
51 
54 
55  static constexpr unsigned int Dimension = VDimension;
56 
57  using InputType = typename Superclass::InputType;
58  using OutputType = typename Superclass::OutputType;
59  using OutputRealType = typename Superclass::OutputRealType;
60  using GradientType = typename Superclass::GradientType;
61  using HessianType = typename Superclass::HessianType;
62  using LevelSetDataType = typename Superclass::LevelSetDataType;
63 
64  using LayerIdType = typename Superclass::LayerIdType;
65  using LabelObjectType = typename Superclass::LabelObjectType;
66  using LabelObjectPointer = typename Superclass::LabelObjectPointer;
67  using LabelObjectLengthType = typename Superclass::LabelObjectLengthType;
68  using LabelObjectLineType = typename Superclass::LabelObjectLineType;
69 
70  using LabelMapType = typename Superclass::LabelMapType;
71  using LabelMapPointer = typename Superclass::LabelMapPointer;
73 
74  using LayerType = typename Superclass::LayerType;
75  using LayerIterator = typename Superclass::LayerIterator;
76  using LayerConstIterator = typename Superclass::LayerConstIterator;
77 
78  using LayerMapType = typename Superclass::LayerMapType;
79  using LayerMapIterator = typename Superclass::LayerMapIterator;
80  using LayerMapConstIterator = typename Superclass::LayerMapConstIterator;
81 
83  using Superclass::Evaluate;
84  OutputType Evaluate( const InputType& inputIndex ) const override;
85 
87  HessianType EvaluateHessian( const InputType& inputIndex ) const override;
88 
90  OutputRealType EvaluateLaplacian( const InputType& inputIndex ) const override;
91 
93  OutputRealType EvaluateMeanCurvature( const InputType& inputIndex ) const override;
94 
95  void EvaluateHessian( const InputType& inputIndex, LevelSetDataType& data ) const override;
96  void EvaluateLaplacian( const InputType& inputIndex, LevelSetDataType& data ) const override;
97  void EvaluateMeanCurvature( const InputType& inputIndex, LevelSetDataType& data ) const override;
98 
99  static inline LayerIdType MinusThreeLayer() { return -3; }
100  static inline LayerIdType MinusOneLayer() { return -1; }
101  static inline LayerIdType PlusOneLayer() { return 1; }
102  static inline LayerIdType PlusThreeLayer() { return 3; }
103 
104 protected:
105 
107 
108  ~ShiSparseLevelSetImage() override = default;
109 
111  void InitializeLayers() override;
112 
113  void InitializeInternalLabelList() override;
114 
115 private:
116 
117 };
118 }
119 
120 #ifndef ITK_MANUAL_INSTANTIATION
121 #include "itkShiSparseLevelSetImage.hxx"
122 #endif
123 
124 #endif // itkShiSparseLevelSetImage_h
typename Superclass::LayerIterator LayerIterator
typename Superclass::LabelObjectType LabelObjectType
typename Superclass::LabelObjectLineType LabelObjectLineType
typename Superclass::LayerMapConstIterator LayerMapConstIterator
Derived class for the shi representation of level-set function.
typename Superclass::LabelObjectPointer LabelObjectPointer
typename Superclass::LayerType LayerType
typename Superclass::InputType InputType
typename Superclass::LayerMapType LayerMapType
typename Superclass::LayerMapIterator LayerMapIterator
typename Superclass::LabelObjectLengthType LabelObjectLengthType
Base class for the sparse representation of a level-set function on one Image.
typename Superclass::HessianType HessianType
typename Superclass::LayerIdType LayerIdType
typename Superclass::LevelSetDataType LevelSetDataType
typename Superclass::GradientType GradientType
typename Superclass::LabelMapPointer LabelMapPointer
typename Superclass::LayerConstIterator LayerConstIterator
typename Superclass::LabelMapType LabelMapType
typename Superclass::OutputType OutputType
typename Superclass::OutputRealType OutputRealType
typename Superclass::RegionType RegionType
Base class for all data objects in ITK.