ITK  5.3.0
Insight Toolkit
itkLevelSetEquationPropagationTerm.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 itkLevelSetEquationPropagationTerm_h
20 #define itkLevelSetEquationPropagationTerm_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 TPropagationImage = TInput>
49 class ITK_TEMPLATE_EXPORT LevelSetEquationPropagationTerm : public LevelSetEquationTermBase<TInput, TLevelSetContainer>
50 {
51 public:
52  ITK_DISALLOW_COPY_AND_MOVE(LevelSetEquationPropagationTerm);
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  using LevelSetDataType = typename Superclass::LevelSetDataType;
81 
82  using HeavisideType = typename Superclass::HeavisideType;
83  using HeavisideConstPointer = typename Superclass::HeavisideConstPointer;
84 
85  static constexpr unsigned int ImageDimension = InputImageType::ImageDimension;
86 
87  using PropagationImageType = TPropagationImage;
88  using PropagationImagePointer = typename PropagationImageType::Pointer;
89 
94 
96 
100  itkSetObjectMacro(PropagationImage, PropagationImageType);
101  itkGetModifiableObjectMacro(PropagationImage, PropagationImageType);
103 
105  void
106  Update() override;
107 
109  void
110  InitializeParameters() override;
111 
113  void
114  Initialize(const LevelSetInputIndexType &) override;
115 
117  void
118  UpdatePixel(const LevelSetInputIndexType & iP,
119  const LevelSetOutputRealType & oldValue,
120  const LevelSetOutputRealType & newValue) override;
121 
122 protected:
124 
125  ~LevelSetEquationPropagationTerm() override = default;
126 
128 
132  PropagationSpeed(const LevelSetInputIndexType & iP) const;
133 
137  Value(const LevelSetInputIndexType & iP) override;
139  Value(const LevelSetInputIndexType & iP, const LevelSetDataType & iData) override;
140 };
142 
143 } // namespace itk
144 
145 #ifndef ITK_MANUAL_INSTANTIATION
146 # include "itkLevelSetEquationPropagationTerm.hxx"
147 #endif
148 
149 #endif
itk::ConstNeighborhoodIterator::RadiusType
typename Superclass::RadiusType RadiusType
Definition: itkConstNeighborhoodIterator.h:71
itkConstNeighborhoodIterator.h
itk::LevelSetEquationPropagationTerm::PropagationImagePointer
typename PropagationImageType::Pointer PropagationImagePointer
Definition: itkLevelSetEquationPropagationTerm.h:88
itk::LevelSetEquationPropagationTerm::LevelSetGradientType
typename Superclass::LevelSetGradientType LevelSetGradientType
Definition: itkLevelSetEquationPropagationTerm.h:77
itk::Vector
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
itk::LevelSetEquationPropagationTerm::LevelSetContainerType
typename Superclass::LevelSetContainerType LevelSetContainerType
Definition: itkLevelSetEquationPropagationTerm.h:70
itk::LevelSetEquationPropagationTerm::InputPixelRealType
typename Superclass::InputPixelRealType InputPixelRealType
Definition: itkLevelSetEquationPropagationTerm.h:68
itk::SmartPointer< Self >
itk::LevelSetEquationPropagationTerm::InputImagePointer
typename Superclass::InputImagePointer InputImagePointer
Definition: itkLevelSetEquationPropagationTerm.h:66
itk::LevelSetEquationPropagationTerm::RadiusType
typename ConstNeighborhoodIterator< InputImageType >::RadiusType RadiusType
Definition: itkLevelSetEquationPropagationTerm.h:92
itk::LevelSetEquationPropagationTerm::LevelSetOutputPixelType
typename Superclass::LevelSetOutputPixelType LevelSetOutputPixelType
Definition: itkLevelSetEquationPropagationTerm.h:74
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::LevelSetEquationPropagationTerm::LevelSetType
typename Superclass::LevelSetType LevelSetType
Definition: itkLevelSetEquationPropagationTerm.h:72
itk::LevelSetEquationPropagationTerm::LevelSetHessianType
typename Superclass::LevelSetHessianType LevelSetHessianType
Definition: itkLevelSetEquationPropagationTerm.h:78
itk::LevelSetEquationPropagationTerm::HeavisideType
typename Superclass::HeavisideType HeavisideType
Definition: itkLevelSetEquationPropagationTerm.h:82
itk::LevelSetEquationPropagationTerm::InputImageType
typename Superclass::InputImageType InputImageType
Definition: itkLevelSetEquationPropagationTerm.h:65
itk::LevelSetEquationPropagationTerm::LevelSetInputIndexType
typename Superclass::LevelSetInputIndexType LevelSetInputIndexType
Definition: itkLevelSetEquationPropagationTerm.h:76
itk::LevelSetEquationPropagationTerm::LevelSetPointer
typename Superclass::LevelSetPointer LevelSetPointer
Definition: itkLevelSetEquationPropagationTerm.h:73
itk::LevelSetEquationPropagationTerm::LevelSetContainerPointer
typename Superclass::LevelSetContainerPointer LevelSetContainerPointer
Definition: itkLevelSetEquationPropagationTerm.h:71
itk::LevelSetEquationPropagationTerm::m_PropagationImage
PropagationImagePointer m_PropagationImage
Definition: itkLevelSetEquationPropagationTerm.h:127
itk::LevelSetEquationPropagationTerm::LevelSetDataType
typename Superclass::LevelSetDataType LevelSetDataType
Definition: itkLevelSetEquationPropagationTerm.h:80
itk::LevelSetEquationTermBase
Abstract class to represents a term in the level-set evolution PDE.
Definition: itkLevelSetEquationTermBase.h:49
itk::LevelSetEquationPropagationTerm::LevelSetOutputRealType
typename Superclass::LevelSetOutputRealType LevelSetOutputRealType
Definition: itkLevelSetEquationPropagationTerm.h:75
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
itk::LevelSetEquationPropagationTerm::LevelSetIdentifierType
typename Superclass::LevelSetIdentifierType LevelSetIdentifierType
Definition: itkLevelSetEquationPropagationTerm.h:79
itkVector.h
itk::LevelSetEquationPropagationTerm
Derived class to represents a propagation term in the level-set evolution PDE.
Definition: itkLevelSetEquationPropagationTerm.h:49
itk::LevelSetEquationPropagationTerm::InputPixelType
typename Superclass::InputPixelType InputPixelType
Definition: itkLevelSetEquationPropagationTerm.h:67
itkLevelSetEquationTermBase.h
itk::ZeroFluxNeumannBoundaryCondition< InputImageType >
itk::LevelSetEquationPropagationTerm::HeavisideConstPointer
typename Superclass::HeavisideConstPointer HeavisideConstPointer
Definition: itkLevelSetEquationPropagationTerm.h:83
itkZeroFluxNeumannBoundaryCondition.h
itk::LevelSetEquationPropagationTerm::PropagationImageType
TPropagationImage PropagationImageType
Definition: itkLevelSetEquationPropagationTerm.h:87