ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkDiscreteLevelSetImage.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 itkDiscreteLevelSetImage_h
20 #define itkDiscreteLevelSetImage_h
21 
22 #include "itkLevelSetImage.h"
23 
24 namespace itk
25 {
35 template< typename TOutput, unsigned int VDimension >
36 class ITK_TEMPLATE_EXPORT DiscreteLevelSetImage :
37  public LevelSetImage< Index< VDimension >, VDimension, TOutput >
38 {
39 public:
40  ITK_DISALLOW_COPY_AND_ASSIGN(DiscreteLevelSetImage);
41 
43 
48 
50  itkTypeMacro ( DiscreteLevelSetImage, LevelSetImage );
51 
52  static constexpr unsigned int Dimension = Superclass::Dimension;
53 
54  using InputType = typename Superclass::InputType;
55  using OutputType = typename Superclass::OutputType;
56  using OutputRealType = typename Superclass::OutputRealType;
57  using GradientType = typename Superclass::GradientType;
58  using HessianType = typename Superclass::HessianType;
59  using LevelSetDataType = typename Superclass::LevelSetDataType;
60 
62  OutputType Evaluate( const InputType& inputIndex ) const override = 0;
63 
65  GradientType EvaluateGradient( const InputType& inputIndex ) const override;
66 
68  HessianType EvaluateHessian( const InputType& inputIndex ) const override;
69 
71  OutputRealType EvaluateLaplacian( const InputType& inputIndex ) const override;
72 
74  OutputRealType EvaluateMeanCurvature( const InputType& inputIndex ) const override;
75 
76  virtual GradientType EvaluateForwardGradient( const InputType& inputIndex ) const;
77 
78  virtual GradientType EvaluateBackwardGradient( const InputType& inputIndex ) const;
79 
81  void Evaluate( const InputType& inputIndex, LevelSetDataType& data ) const override;
82 
85  void EvaluateGradient( const InputType& inputIndex, LevelSetDataType& data ) const override;
86 
89  void EvaluateHessian( const InputType& inputIndex, LevelSetDataType& data ) const override;
90 
93  void EvaluateMeanCurvature( const InputType& inputIndex, LevelSetDataType& data ) const override;
94 
97  void EvaluateLaplacian( const InputType& inputIndex, LevelSetDataType& data ) const override;
98 
101  void EvaluateForwardGradient( const InputType& inputIndex, LevelSetDataType& data ) const override;
102 
105  void EvaluateBackwardGradient( const InputType& inputIndex, LevelSetDataType& data ) const override;
106 
107 protected:
108  DiscreteLevelSetImage() = default;
109 
110  ~DiscreteLevelSetImage() override = default;
111 
113  void Initialize() override;
114 
116  void CopyInformation(const DataObject *data) override;
117 
119  void Graft( const DataObject* data ) override;
120 
121 private:
122 
123  };
124 }
125 
126 #ifndef ITK_MANUAL_INSTANTIATION
127 #include "itkDiscreteLevelSetImage.hxx"
128 #endif
129 
130 #endif // itkDiscreteLevelSetImage_h
Represent a n-dimensional index in a n-dimensional image.
Definition: itkIndex.h:66
Abstract class for a level-set function on one Image.
Abstract class for a level-set function on one Image.
Base class for most ITK classes.
Definition: itkObject.h:60
Base class for all data objects in ITK.