18#ifndef itkGradientRecursiveGaussianImageFilter_h
19#define itkGradientRecursiveGaussianImageFilter_h
56 typename TOutputImage = Image<
57 CovariantVector<typename NumericTraits<typename TInputImage::PixelType>::RealType, TInputImage::ImageDimension>,
58 TInputImage::ImageDimension>>
83 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
140 GetSigmaArray()
const;
150 SetNormalizeAcrossScale(
bool normalize);
151 itkGetConstMacro(NormalizeAcrossScale,
bool);
160 GenerateInputRequestedRegion()
override;
172 itkSetMacro(UseImageDirection,
bool);
173 itkGetConstMacro(UseImageDirection,
bool);
174 itkBooleanMacro(UseImageDirection);
177#ifdef ITK_USE_CONCEPT_CHECKING
189 PrintSelf(std::ostream & os,
Indent indent)
const override;
193 GenerateData()
override;
197 EnlargeOutputRequestedRegion(
DataObject * output)
override;
200 GenerateOutputInformation()
override;
203 template <
typename TValue>
211 it.GetImage()->TransformLocalVectorToPhysicalVector(gradient, physicalGradient);
215 template <
typename T>
224 for (
unsigned int nc = 0; nc < nComponents; ++nc)
228 for (
unsigned int dim = 0; dim < ImageDimension; ++dim)
230 componentGradient[dim] =
233 it.
GetImage()->TransformLocalVectorToPhysicalVector(componentGradient, correctedComponentGradient);
234 for (
unsigned int dim = 0; dim < ImageDimension; ++dim)
237 nc * ImageDimension + dim, correctedGradient, correctedComponentGradient[dim]);
240 it.
Set(correctedGradient);
243 template <
template <
typename,
unsigned int>
class P,
class T,
unsigned int VDimension>
249 it.GetImage()->TransformLocalVectorToPhysicalVector(gradient, it.Value());
253 std::vector<GaussianFilterPointer> m_SmoothingFilters{};
255 OutputImageAdaptorPointer m_ImageAdaptor{};
258 bool m_NormalizeAcrossScale{};
261 bool m_UseImageDirection{
true };
264 SigmaArrayType m_Sigma{};
268#ifndef ITK_MANUAL_INSTANTIATION
269# include "itkGradientRecursiveGaussianImageFilter.hxx"
A templated class holding a n-Dimensional covariant vector.
Base class for all data objects in ITK.
static ComponentType GetNthComponent(int c, const PixelType &pixel)
static void SetNthComponent(int c, PixelType &pixel, const ComponentType &v)
ValueType * GetDataPointer()
Computes the gradient of an image by convolution with the first derivative of a Gaussian.
typename NumericTraits< PixelType >::RealType RealType
typename NumericTraits< OutputPixelType >::ValueType OutputComponentType
typename NumericTraits< InternalRealType >::ValueType InternalScalarRealType
typename NumericTraits< RealType >::FloatType InternalRealType
typename TOutputImage::Pointer OutputImagePointer
typename OutputImageAdaptorType::Pointer OutputImageAdaptorPointer
TInputImage InputImageType
typename TInputImage::PixelType PixelType
TOutputImage OutputImageType
typename NumericTraits< PixelType >::ScalarRealType ScalarRealType
typename OutputImageType::PixelType OutputPixelType
typename DerivativeFilterType::Pointer DerivativeFilterPointer
typename GaussianFilterType::Pointer GaussianFilterPointer
const ImageType * GetImage() const
A multi-dimensional iterator templated over image type that walks a region of pixels.
void Set(const PixelType &value) const
Base class for filters that take an image as input and produce an image as output.
Templated n-dimensional image class.
Control indentation during Print() invocation.
Light weight base class for most itk classes.
Presents an image as being composed of the N-th element of its pixels.
Define additional traits for native types such as int or float.
static unsigned int GetLength()
Base class for computing IIR convolution with an approximation of a Gaussian kernel.
Templated n-dimensional vector image class.
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....