ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkLinearAnisotropicDiffusionLBRImageFilter.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 * https://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//
20// Created by Jean-Marie Mirebeau on 28/02/2014.
21//
22//
23
24#ifndef itkLinearAnisotropicDiffusionLBRImageFilter_h
25#define itkLinearAnisotropicDiffusionLBRImageFilter_h
26
27
30
31namespace itk
32{
47template <typename TImage, typename TScalar = typename NumericTraits<typename TImage::PixelType>::RealType>
49{
50public:
51 ITK_DISALLOW_COPY_AND_MOVE(LinearAnisotropicDiffusionLBRImageFilter);
52
58
60 itkNewMacro(Self);
61
63 itkOverrideGetNameOfClassMacro(LinearAnisotropicDiffusionLBRImageFilter);
64
65 using ImageType = TImage;
66 using PixelType = typename ImageType::PixelType;
67
68 using ImageDimensionType = typename ImageType::ImageDimensionType;
69 static constexpr ImageDimensionType ImageDimension = ImageType::ImageDimension;
70
71 using ScalarType = TScalar;
75
76 void
77 SetInputImage(const ImageType * image);
78 void
79 SetInputTensor(const TensorImageType * tensorImage);
80
81 void
83 itkGetConstMacro(DiffusionTime, ScalarType);
84
85 void
87 itkGetConstMacro(MaxNumberOfTimeSteps, int);
88
89 void
91 itkGetConstMacro(RatioToMaxStableTimeStep, ScalarType);
92
93 itkGetConstMacro(EffectiveDiffusionTime, ScalarType);
94 itkGetConstMacro(EffectiveNumberOfTimeSteps, int);
95
96protected:
99
100 typename ImageType::ConstPointer
104
106
107 // ******* Containers for the stencils used in the discretization
108 static const unsigned int HalfStencilSize = (ImageDimension == 2) ? 3 : 6;
109 static const unsigned int StencilSize = 2 * HalfStencilSize;
110
114
115 using InternalSizeT = int;
117
118
119 // *************** Computation *****************
120 void
121 GenerateData() override;
122 virtual void
124 virtual void
126
127 using StencilType = std::pair<StencilBufferIndicesType, StencilCoefficientsType>;
130
133
134 virtual ScalarType
136
140
143
144 virtual void
146 typename ImageType::Pointer m_PreviousImage;
147 typename ImageType::Pointer m_NextImage;
148
149 virtual RegionType
151 {
152 return GetInputImage()->GetRequestedRegion();
153 }
154
157 {
159 }
160
161 struct StencilFunctor;
162 struct FunctorType;
163
165 static ScalarType
166 ScalarProduct(const TensorType &, const VectorType &, const VectorType &);
167};
168} // end namespace itk
169
170
171#ifndef ITK_MANUAL_INSTANTIATION
172# include "itkLinearAnisotropicDiffusionLBRImageFilter.hxx"
173#endif
174
175#endif
An image region represents a structured region of data.
Templated n-dimensional image class.
Definition itkImage.h:89
SmartPointer< const Self > ConstPointer
Definition itkImage.h:97
static ScalarType ScalarProduct(const TensorType &, const VectorType &, const VectorType &)
TensorImageType::ConstPointer GetInputTensor()
void SetInputTensor(const TensorImageType *tensorImage)
void SetRatioToMaxStableTimeStep(ScalarType ratio)
virtual void ImageUpdate(ScalarType delta)
~LinearAnisotropicDiffusionLBRImageFilter() override=default
void SetInputImage(const ImageType *image)
virtual void ImageUpdateLoop()
Automatically called by GenerateData.
static constexpr T max(const T &)
Implements transparent reference counting.
Represent a symmetric tensor of second rank.
A templated class holding a n-Dimensional vector.
Definition itkVector.h:63
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Represent a n-dimensional index in a n-dimensional image.
Definition itkIndex.h:69
Represent a n-dimensional offset between two n-dimensional indexes of n-dimensional image.
Definition itkOffset.h:67