18 #ifndef itkGradientRecursiveGaussianImageFilter_h
19 #define itkGradientRecursiveGaussianImageFilter_h
51 template<
typename TInputImage,
52 typename TOutputImage = Image< CovariantVector<
53 typename NumericTraits< typename TInputImage::PixelType >::RealType,
54 TInputImage::ImageDimension >,
55 TInputImage::ImageDimension > >
79 itkStaticConstMacro(ImageDimension,
unsigned int,
80 TInputImage::ImageDimension);
151 void SetNormalizeAcrossScale(
bool normalizeInScaleSpace);
152 itkGetConstMacro(NormalizeAcrossScale,
bool);
160 virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
172 itkSetMacro(UseImageDirection,
bool);
173 itkGetConstMacro(UseImageDirection,
bool);
174 itkBooleanMacro(UseImageDirection);
177 #ifdef ITK_USE_CONCEPT_CHECKING
188 void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
191 void GenerateData(
void) ITK_OVERRIDE;
194 void EnlargeOutputRequestedRegion(
DataObject *output) ITK_OVERRIDE;
196 void GenerateOutputInformation() ITK_OVERRIDE;
200 template <typename TValue>
207 it.GetImage()->TransformLocalVectorToPhysicalVector(gradient, physicalGradient );
208 it.Set(
OutputPixelType( physicalGradient.GetDataPointer(), ImageDimension, false ) );
211 template <
typename T >
219 for (
unsigned int nc = 0; nc < nComponents; nc++ )
223 for (
unsigned int dim = 0; dim < ImageDimension; dim++ )
227 it.
GetImage()->TransformLocalVectorToPhysicalVector(componentGradient, correctedComponentGradient );
228 for (
unsigned int dim = 0; dim < ImageDimension; dim++ )
231 correctedComponentGradient[dim] );
234 it.
Set(correctedGradient);
237 template <
template<
typename,
unsigned int>
class P,
class T,
unsigned int N>
242 it.GetImage()->TransformLocalVectorToPhysicalVector(gradient, it.Value() );
263 #ifndef ITK_MANUAL_INSTANTIATION
264 #include "itkGradientRecursiveGaussianImageFilter.hxx"
CovariantVector< OutputComponentType, ImageDimension > CovariantVectorType
OutputImageAdaptorType::Pointer OutputImageAdaptorPointer
RecursiveGaussianImageFilter< RealImageType, RealImageType > GaussianFilterType
GaussianFilterType::Pointer GaussianFilterPointer
static void SetNthComponent(int c, PixelType &pixel, const ComponentType &v)
RecursiveGaussianImageFilter< InputImageType, RealImageType > DerivativeFilterType
TInputImage::PixelType PixelType
void Set(const PixelType &value) const
FixedArray< ScalarRealType, itkGetStaticConstMacro(ImageDimension) > SigmaArrayType
Base class for computing IIR convolution with an approximation of a Gaussian kernel.
void TransformOutputPixel(ImageRegionIterator< T > &it)
Templated n-dimensional vector image class.
Computes the gradient of an image by convolution with the first derivative of a Gaussian.
Image< InternalRealType, itkGetStaticConstMacro(ImageDimension) > RealImageType
TInputImage InputImageType
virtual ~GradientRecursiveGaussianImageFilter() override
Base class for all process objects that output image data.
CovariantVector< ScalarRealType, ImageDimension > GradientVectorType
Simulate a standard C array with copy semnatics.
static ComponentType GetNthComponent(int c, const PixelType &pixel)
NumericTraits< PixelType >::RealType RealType
NumericTraits< PixelType >::ScalarRealType ScalarRealType
SmartPointer< Self > Pointer
NumericTraits< OutputPixelType >::ValueType OutputComponentType
OutputImageType::PixelType OutputPixelType
OutputImageAdaptorPointer m_ImageAdaptor
DerivativeFilterPointer m_DerivativeFilter
std::vector< GaussianFilterPointer > m_SmoothingFilters
static unsigned int GetLength()
SmartPointer< const Self > ConstPointer
TOutputImage OutputImageType
NumericTraits< InternalRealType >::ValueType InternalScalarRealType
bool m_NormalizeAcrossScale
TInputImage InputImageType
Presents an image as being composed of the N-th element of its pixels.
void TransformOutputPixel(ImageRegionIterator< Image< P< T, N >, N > > &it)
GradientRecursiveGaussianImageFilter Self
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
ImageToImageFilter< TInputImage, TOutputImage > Superclass
NumericTraits< RealType >::FloatType InternalRealType
Define additional traits for native types such as int or float.
DerivativeFilterType::Pointer DerivativeFilterPointer
PixelType Get(void) const
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.
NthElementImageAdaptor< TOutputImage, InternalScalarRealType > OutputImageAdaptorType
TOutputImage::Pointer OutputImagePointer
const ImageType * GetImage() const