ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkLevelSetEquationCurvatureTerm.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 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 :
50  public LevelSetEquationTermBase< TInput, TLevelSetContainer >
51 {
52 public:
53  ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetEquationCurvatureTerm);
54 
58  using Superclass =
60 
62  itkNewMacro( Self );
63 
65  itkTypeMacro( LevelSetEquationCurvatureTerm,
67 
68  using InputImageType = typename Superclass::InputImageType;
69  using InputImagePointer = typename Superclass::InputImagePointer;
70  using InputPixelType = typename Superclass::InputPixelType;
71  using InputPixelRealType = typename Superclass::InputPixelRealType;
72 
73  using LevelSetContainerType = typename Superclass::LevelSetContainerType;
74  using LevelSetContainerPointer = typename Superclass::LevelSetContainerPointer;
75  using LevelSetType = typename Superclass::LevelSetType;
76  using LevelSetPointer = typename Superclass::LevelSetPointer;
77  using LevelSetOutputPixelType = typename Superclass::LevelSetOutputPixelType;
78  using LevelSetOutputRealType = typename Superclass::LevelSetOutputRealType;
79  using LevelSetInputIndexType = typename Superclass::LevelSetInputIndexType;
80  using LevelSetGradientType = typename Superclass::LevelSetGradientType;
81  using LevelSetHessianType = typename Superclass::LevelSetHessianType;
82  using LevelSetIdentifierType = typename Superclass::LevelSetIdentifierType;
83 
84  using HeavisideType = typename Superclass::HeavisideType;
85  using HeavisideConstPointer = typename Superclass::HeavisideConstPointer;
86 
87  using LevelSetDataType = typename Superclass::LevelSetDataType;
88 
89  static constexpr unsigned int ImageDimension = InputImageType::ImageDimension;
90 
91  using CurvatureImageType = TCurvatureImage;
92  using CurvatureImagePointer = typename CurvatureImageType::Pointer;
93 
97  void SetCurvatureImage( CurvatureImageType* CurvatureImage );
98  itkGetModifiableObjectMacro(CurvatureImage, CurvatureImageType );
100 
101  itkSetMacro( UseCurvatureImage, bool );
102  itkGetMacro( UseCurvatureImage, bool );
103  itkBooleanMacro( UseCurvatureImage );
104 
109 
111 
113  void Update() override;
114 
116  void InitializeParameters() override;
117 
119  void Initialize( const LevelSetInputIndexType& ) override;
120 
122  void UpdatePixel( const LevelSetInputIndexType& iP,
123  const LevelSetOutputRealType& oldValue,
124  const LevelSetOutputRealType& newValue ) override;
125 
126 protected:
128 
129  ~LevelSetEquationCurvatureTerm() override = default;
130 
133  LevelSetOutputRealType Value( const LevelSetInputIndexType& iP ) override;
134 
137  LevelSetOutputRealType Value( const LevelSetInputIndexType& iP, const LevelSetDataType& iData ) override;
138 
139  LevelSetOutputRealType m_NeighborhoodScales[ImageDimension];
140 
142 
144 };
145 
146 }
147 
148 #ifndef ITK_MANUAL_INSTANTIATION
149 #include "itkLevelSetEquationCurvatureTerm.hxx"
150 #endif
151 
152 #endif
typename Superclass::LevelSetDataType LevelSetDataType
Light weight base class for most itk classes.
typename Superclass::LevelSetType LevelSetType
typename Superclass::LevelSetPointer LevelSetPointer
typename Superclass::InputImageType InputImageType
typename Superclass::InputPixelType InputPixelType
typename Superclass::HeavisideType HeavisideType
typename Superclass::LevelSetOutputPixelType LevelSetOutputPixelType
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
typename Superclass::InputImagePointer InputImagePointer
typename ConstNeighborhoodIterator< InputImageType >::RadiusType RadiusType
typename Superclass::LevelSetContainerType LevelSetContainerType
Abstract class to represents a term in the level-set evolution PDE.
typename CurvatureImageType::Pointer CurvatureImagePointer
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
typename Superclass::LevelSetContainerPointer LevelSetContainerPointer
typename Superclass::LevelSetOutputRealType LevelSetOutputRealType
typename Superclass::LevelSetHessianType LevelSetHessianType
typename Superclass::LevelSetIdentifierType LevelSetIdentifierType
Derived class to represents a curvature term in the level-set evolution PDE.
typename Superclass::LevelSetInputIndexType LevelSetInputIndexType
typename Superclass::HeavisideConstPointer HeavisideConstPointer
typename Superclass::RadiusType RadiusType
typename Superclass::InputPixelRealType InputPixelRealType
typename Superclass::LevelSetGradientType LevelSetGradientType