18 #ifndef itkGradientRecursiveGaussianImageFilter_h
19 #define itkGradientRecursiveGaussianImageFilter_h
51 template<
typename TInputImage,
52 typename TOutputImage = Image< CovariantVector<
54 TInputImage::ImageDimension >,
55 TInputImage::ImageDimension > >
81 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
90 Self::ImageDimension >;
104 Self::ImageDimension >;
148 void SetNormalizeAcrossScale(
bool normalizeInScaleSpace);
149 itkGetConstMacro(NormalizeAcrossScale,
bool);
157 void GenerateInputRequestedRegion()
override;
169 itkSetMacro(UseImageDirection,
bool);
170 itkGetConstMacro(UseImageDirection,
bool);
171 itkBooleanMacro(UseImageDirection);
174 #ifdef ITK_USE_CONCEPT_CHECKING
185 void PrintSelf(std::ostream & os,
Indent indent)
const override;
188 void GenerateData()
override;
191 void EnlargeOutputRequestedRegion(
DataObject *output)
override;
193 void GenerateOutputInformation()
override;
197 template <
typename TValue>
204 it.GetImage()->TransformLocalVectorToPhysicalVector(gradient, physicalGradient );
205 it.Set(
OutputPixelType( physicalGradient.GetDataPointer(), ImageDimension, false ) );
208 template <
typename T >
216 for (
unsigned int nc = 0; nc < nComponents; nc++ )
220 for (
unsigned int dim = 0; dim < ImageDimension; dim++ )
224 it.
GetImage()->TransformLocalVectorToPhysicalVector(componentGradient, correctedComponentGradient );
225 for (
unsigned int dim = 0; dim < ImageDimension; dim++ )
228 correctedComponentGradient[dim] );
231 it.
Set(correctedGradient);
234 template <
template<
typename,
unsigned int>
class P,
class T,
unsigned int N>
239 it.GetImage()->TransformLocalVectorToPhysicalVector(gradient, it.Value() );
258 #ifndef ITK_MANUAL_INSTANTIATION
259 #include "itkGradientRecursiveGaussianImageFilter.hxx"
typename NumericTraits< PixelType >::ScalarRealType ScalarRealType
typename OutputImageType::Pointer OutputImagePointer
static void SetNthComponent(int c, PixelType &pixel, const ComponentType &v)
Define numeric traits for std::vector.
void Set(const PixelType &value) const
typename TInputImage::PixelType PixelType
typename NumericTraits< RealType >::FloatType InternalRealType
typename NumericTraits< InternalRealType >::ValueType InternalScalarRealType
Base class for computing IIR convolution with an approximation of a Gaussian kernel.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
void TransformOutputPixel(ImageRegionIterator< T > &it)
Templated n-dimensional vector image class.
typename OutputImageAdaptorType::Pointer OutputImageAdaptorPointer
Computes the gradient of an image by convolution with the first derivative of a Gaussian.
Base class for all process objects that output image data.
TInputImage InputImageType
static ComponentType GetNthComponent(int c, const PixelType &pixel)
OutputImageAdaptorPointer m_ImageAdaptor
DerivativeFilterPointer m_DerivativeFilter
std::vector< GaussianFilterPointer > m_SmoothingFilters
typename OutputImageType::PixelType OutputPixelType
void TransformOutputPixel(ImageRegionIterator< VectorImage< TValue, ImageDimension > > &it)
TOutputImage OutputImageType
bool m_NormalizeAcrossScale
typename DerivativeFilterType::Pointer DerivativeFilterPointer
Presents an image as being composed of the N-th element of its pixels.
typename NumericTraits< OutputPixelType >::ValueType OutputComponentType
void TransformOutputPixel(ImageRegionIterator< Image< P< T, N >, N > > &it)
typename GaussianFilterType::Pointer GaussianFilterPointer
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
typename NumericTraits< PixelType >::RealType RealType
A templated class holding a n-Dimensional covariant vector.
Base class for all data objects in ITK.
Templated n-dimensional image class.
A multi-dimensional iterator templated over image type that walks a region of pixels.
const ImageType * GetImage() const