ITK  5.2.0
Insight Toolkit
itkLevelSetEquationCurvatureTerm.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 itkLevelSetEquationCurvatureTerm_h
20 #define itkLevelSetEquationCurvatureTerm_h
21 
25 #include "itkVector.h"
26 #include "vnl/vnl_matrix_fixed.h"
27 
28 namespace itk
29 {
46 template <typename TInput, // Input image or mesh
47  typename TLevelSetContainer,
48  typename TCurvatureImage = TInput>
49 class ITK_TEMPLATE_EXPORT LevelSetEquationCurvatureTerm : public LevelSetEquationTermBase<TInput, TLevelSetContainer>
50 {
51 public:
52  ITK_DISALLOW_COPY_AND_MOVE(LevelSetEquationCurvatureTerm);
53 
58 
60  itkNewMacro(Self);
61 
64 
65  using InputImageType = typename Superclass::InputImageType;
66  using InputImagePointer = typename Superclass::InputImagePointer;
67  using InputPixelType = typename Superclass::InputPixelType;
68  using InputPixelRealType = typename Superclass::InputPixelRealType;
69 
70  using LevelSetContainerType = typename Superclass::LevelSetContainerType;
71  using LevelSetContainerPointer = typename Superclass::LevelSetContainerPointer;
72  using LevelSetType = typename Superclass::LevelSetType;
73  using LevelSetPointer = typename Superclass::LevelSetPointer;
74  using LevelSetOutputPixelType = typename Superclass::LevelSetOutputPixelType;
75  using LevelSetOutputRealType = typename Superclass::LevelSetOutputRealType;
76  using LevelSetInputIndexType = typename Superclass::LevelSetInputIndexType;
77  using LevelSetGradientType = typename Superclass::LevelSetGradientType;
78  using LevelSetHessianType = typename Superclass::LevelSetHessianType;
79  using LevelSetIdentifierType = typename Superclass::LevelSetIdentifierType;
80 
81  using HeavisideType = typename Superclass::HeavisideType;
82  using HeavisideConstPointer = typename Superclass::HeavisideConstPointer;
83 
84  using LevelSetDataType = typename Superclass::LevelSetDataType;
85 
86  static constexpr unsigned int ImageDimension = InputImageType::ImageDimension;
87 
88  using CurvatureImageType = TCurvatureImage;
89  using CurvatureImagePointer = typename CurvatureImageType::Pointer;
90 
94  void
95  SetCurvatureImage(CurvatureImageType * iImage);
96  itkGetModifiableObjectMacro(CurvatureImage, CurvatureImageType);
98 
99  itkSetMacro(UseCurvatureImage, bool);
100  itkGetMacro(UseCurvatureImage, bool);
101  itkBooleanMacro(UseCurvatureImage);
102 
107 
109 
111  void
112  Update() override;
113 
115  void
116  InitializeParameters() override;
117 
119  void
120  Initialize(const LevelSetInputIndexType &) override;
121 
123  void
124  UpdatePixel(const LevelSetInputIndexType & iP,
125  const LevelSetOutputRealType & oldValue,
126  const LevelSetOutputRealType & newValue) override;
127 
128 protected:
130 
131  ~LevelSetEquationCurvatureTerm() override = default;
132 
136  Value(const LevelSetInputIndexType & iP) override;
137 
141  Value(const LevelSetInputIndexType & iP, const LevelSetDataType & iData) override;
142 
143  LevelSetOutputRealType m_NeighborhoodScales[ImageDimension];
144 
146 
148 };
149 
150 } // namespace itk
151 
152 #ifndef ITK_MANUAL_INSTANTIATION
153 # include "itkLevelSetEquationCurvatureTerm.hxx"
154 #endif
155 
156 #endif
itk::LevelSetEquationCurvatureTerm::LevelSetContainerPointer
typename Superclass::LevelSetContainerPointer LevelSetContainerPointer
Definition: itkLevelSetEquationCurvatureTerm.h:71
itk::ConstNeighborhoodIterator::RadiusType
typename Superclass::RadiusType RadiusType
Definition: itkConstNeighborhoodIterator.h:71
itkConstNeighborhoodIterator.h
itk::LevelSetEquationCurvatureTerm::LevelSetPointer
typename Superclass::LevelSetPointer LevelSetPointer
Definition: itkLevelSetEquationCurvatureTerm.h:73
itk::LevelSetEquationCurvatureTerm::LevelSetOutputPixelType
typename Superclass::LevelSetOutputPixelType LevelSetOutputPixelType
Definition: itkLevelSetEquationCurvatureTerm.h:74
itk::LevelSetEquationCurvatureTerm::LevelSetHessianType
typename Superclass::LevelSetHessianType LevelSetHessianType
Definition: itkLevelSetEquationCurvatureTerm.h:78
itk::LevelSetEquationCurvatureTerm::LevelSetOutputRealType
typename Superclass::LevelSetOutputRealType LevelSetOutputRealType
Definition: itkLevelSetEquationCurvatureTerm.h:75
itk::LevelSetEquationCurvatureTerm::CurvatureImageType
TCurvatureImage CurvatureImageType
Definition: itkLevelSetEquationCurvatureTerm.h:88
itk::Vector
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
itk::SmartPointer< Self >
itk::LevelSetEquationCurvatureTerm::InputPixelRealType
typename Superclass::InputPixelRealType InputPixelRealType
Definition: itkLevelSetEquationCurvatureTerm.h:68
itk::LevelSetEquationCurvatureTerm::InputImageType
typename Superclass::InputImageType InputImageType
Definition: itkLevelSetEquationCurvatureTerm.h:65
itk::LevelSetEquationCurvatureTerm::LevelSetGradientType
typename Superclass::LevelSetGradientType LevelSetGradientType
Definition: itkLevelSetEquationCurvatureTerm.h:77
itk::LevelSetEquationCurvatureTerm::RadiusType
typename ConstNeighborhoodIterator< InputImageType >::RadiusType RadiusType
Definition: itkLevelSetEquationCurvatureTerm.h:105
itk::LevelSetEquationCurvatureTerm::HeavisideType
typename Superclass::HeavisideType HeavisideType
Definition: itkLevelSetEquationCurvatureTerm.h:81
itk::LevelSetEquationCurvatureTerm::CurvatureImagePointer
typename CurvatureImageType::Pointer CurvatureImagePointer
Definition: itkLevelSetEquationCurvatureTerm.h:89
itk::LevelSetEquationCurvatureTerm::LevelSetInputIndexType
typename Superclass::LevelSetInputIndexType LevelSetInputIndexType
Definition: itkLevelSetEquationCurvatureTerm.h:76
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::LevelSetEquationCurvatureTerm::LevelSetContainerType
typename Superclass::LevelSetContainerType LevelSetContainerType
Definition: itkLevelSetEquationCurvatureTerm.h:70
itk::LevelSetEquationCurvatureTerm::m_UseCurvatureImage
bool m_UseCurvatureImage
Definition: itkLevelSetEquationCurvatureTerm.h:147
itk::LevelSetEquationCurvatureTerm::InputImagePointer
typename Superclass::InputImagePointer InputImagePointer
Definition: itkLevelSetEquationCurvatureTerm.h:66
itk::LevelSetEquationCurvatureTerm::HeavisideConstPointer
typename Superclass::HeavisideConstPointer HeavisideConstPointer
Definition: itkLevelSetEquationCurvatureTerm.h:82
itk::LevelSetEquationCurvatureTerm::InputPixelType
typename Superclass::InputPixelType InputPixelType
Definition: itkLevelSetEquationCurvatureTerm.h:67
itk::LevelSetEquationCurvatureTerm::m_CurvatureImage
CurvatureImagePointer m_CurvatureImage
Definition: itkLevelSetEquationCurvatureTerm.h:145
itk::LevelSetEquationCurvatureTerm::LevelSetDataType
typename Superclass::LevelSetDataType LevelSetDataType
Definition: itkLevelSetEquationCurvatureTerm.h:84
itk::LevelSetEquationCurvatureTerm::LevelSetType
typename Superclass::LevelSetType LevelSetType
Definition: itkLevelSetEquationCurvatureTerm.h:72
itk::LevelSetEquationTermBase
Abstract class to represents a term in the level-set evolution PDE.
Definition: itkLevelSetEquationTermBase.h:49
itk::LevelSetEquationCurvatureTerm
Derived class to represents a curvature term in the level-set evolution PDE.
Definition: itkLevelSetEquationCurvatureTerm.h:49
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ConstNeighborhoodIterator
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
Definition: itkConstNeighborhoodIterator.h:51
itkVector.h
itkLevelSetEquationTermBase.h
itk::ZeroFluxNeumannBoundaryCondition< InputImageType >
itk::LevelSetEquationCurvatureTerm::LevelSetIdentifierType
typename Superclass::LevelSetIdentifierType LevelSetIdentifierType
Definition: itkLevelSetEquationCurvatureTerm.h:79
itkZeroFluxNeumannBoundaryCondition.h