NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType > Class Template Reference

This class takes scalar image as input, and outputs a vector field of image gradient. More...

Inheritance diagram for itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >:
Inheritance graph
[legend]
Collaboration diagram for itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >:
Collaboration graph
[legend]

Public Types

enum  DerivativeType { CENTRAL_DIFFERENCES, DERIVATIVE_OPERATOR, DERIVATIVE_OF_GAUSSIAN }
 
typedef TScalarType VectorDataType
 
typedef
ScalarImageToNormalizedGradientVectorImageFilter 
Self
 
typedef ImageToImageFilter
< TInputImage, Image< Vector
< VectorDataType,
TInputImage::ImageDimension >
, TInputImage::ImageDimension > > 
Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef Vector< VectorDataType,
itkGetStaticConstMacro(Dimension) > 
OutputPixelType
 
typedef CovariantVector
< VectorDataType,
itkGetStaticConstMacro(Dimension) > 
CovariantVectorType
 
typedef Image< OutputPixelType,
itkGetStaticConstMacro(Dimension) > 
OutputImageType
 
typedef Image
< CovariantVectorType,
itkGetStaticConstMacro(Dimension) > 
CovariantVectorImageType
 
typedef
CovariantVectorImageType::Pointer 
CovariantVectorImagePointer
 
typedef Superclass::InputImageType InputImageType
 
typedef InputImageType::PixelType InputPixelType
 
typedef InputImageType::RegionType InputRegionType
 
typedef GradientImageFilter
< TInputImage, VectorDataType,
VectorDataType
GradientImageFilterType
 
typedef
GradientImageFilterType::Pointer 
GradientImageFilterPointer
 
typedef
GradientRecursiveGaussianImageFilter
< TInputImage,
CovariantVectorImageType
GradientRecursiveGaussianImageFilterType
 
typedef
GradientRecursiveGaussianImageFilterType::Pointer 
GradientRecursiveGaussianImageFilterPointer
 
typedef
GaussianSmoothVectorFieldFilter
< VectorDataType,
itkGetStaticConstMacro(Dimension),
itkGetStaticConstMacro(Dimension)> 
GaussianSmoothFilterType
 
typedef
GaussianSmoothFilterType::Pointer 
GaussianSmoothFilterPointer
 
typedef NormaliseVectorFilter
< VectorDataType,
itkGetStaticConstMacro(Dimension) > 
NormaliseFilterType
 
typedef
NormaliseFilterType::Pointer 
NormaliseFilterPointer
 

Public Member Functions

virtual const char * GetClassName () const
 
 itkStaticConstMacro (Dimension, unsigned int, TInputImage::ImageDimension)
 
void SetScalarImage (const InputImageType *image)
 
virtual void SetUseMillimetreScaling (bool _arg)
 
virtual bool GetUseMillimetreScaling ()
 
virtual void SetDivideByTwo (bool _arg)
 
virtual bool GetDivideByTwo ()
 
virtual void SetNormalize (bool _arg)
 
virtual bool GetNormalize ()
 
virtual void SetPadValue (InputPixelType _arg)
 
virtual InputPixelType GetPadValue ()
 
virtual void SetDerivativeType (DerivativeType _arg)
 
virtual DerivativeType GetDerivativeType ()
 
virtual void SetSigma (double _arg)
 
virtual double GetSigma ()
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 ScalarImageToNormalizedGradientVectorImageFilter ()
 
 ~ScalarImageToNormalizedGradientVectorImageFilter ()
 
void PrintSelf (std::ostream &os, Indent indent) const
 
virtual void GenerateData ()
 

Detailed Description

template<class TInputImage, typename TScalarType>
class itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >

This class takes scalar image as input, and outputs a vector field of image gradient.

This class implements step (8) in in Jones et al. Human Brain Mapping 11:12-32 (2000). The input should be the output of itkLaplacianSolverImageFilter, but the filter will work for any scalar image. We simply compute the derivative using 2 point central differences, and normalize it to unit length. The output vector length takes into account anisotropic voxels, so the output vectors are in mm space, and hence are 1mm long.

Additionally, we added a member variable UseMillimetreScaling, so that if true, the size in millimetre of the voxel is taken into account. Defaults to on.

Additionally, we added a member variable, DivideByTwo, so that if true, the difference of the pixel + and pixel - is divided by two. Defaults to on.

Additionally, we added member variable Normalize, which is a boolean to turn normalization to unit length on/off. Defaults to on.

Additionally, we added a pad value. If the current pixel, or +/- 1 pixel in any dimension is == pad value, then the gradient is ignored.

As of 25th Nov 2009, we have wrapped the classes GradientImageFilter and GradientRecursiveGaussianImageFilter.

As of 1st Dec 2009, I have also wrapped smoothing of the vector field. You can supply a sigma (default 0 - i.e. no smoothing) and the resultant vectors will be smoothed. Also, if normalisation is on, the the smoothed vectors come out, normalised to unit length.

See also
LaplacianSolverImageFilter
RelaxStreamlinesFilter
IntegrateStreamlinesFilter
LagrangianInitializedRelaxStreamlinesFilter

Member Typedef Documentation

template<class TInputImage , typename TScalarType >
typedef SmartPointer<const Self> itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::ConstPointer
template<class TInputImage , typename TScalarType >
typedef CovariantVectorImageType::Pointer itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::CovariantVectorImagePointer
template<class TInputImage , typename TScalarType >
typedef Image< CovariantVectorType, itkGetStaticConstMacro(Dimension) > itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::CovariantVectorImageType
template<class TInputImage , typename TScalarType >
typedef CovariantVector< VectorDataType, itkGetStaticConstMacro(Dimension) > itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::CovariantVectorType
template<class TInputImage , typename TScalarType >
typedef GaussianSmoothFilterType::Pointer itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::GaussianSmoothFilterPointer
template<class TInputImage , typename TScalarType >
typedef GaussianSmoothVectorFieldFilter<VectorDataType, itkGetStaticConstMacro(Dimension), itkGetStaticConstMacro(Dimension)> itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::GaussianSmoothFilterType
template<class TInputImage , typename TScalarType >
typedef GradientImageFilterType::Pointer itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::GradientImageFilterPointer
template<class TInputImage , typename TScalarType >
typedef GradientImageFilter<TInputImage, VectorDataType, VectorDataType> itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::GradientImageFilterType
template<class TInputImage , typename TScalarType >
typedef GradientRecursiveGaussianImageFilterType::Pointer itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::GradientRecursiveGaussianImageFilterPointer
template<class TInputImage , typename TScalarType >
typedef GradientRecursiveGaussianImageFilter<TInputImage, CovariantVectorImageType> itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::GradientRecursiveGaussianImageFilterType
template<class TInputImage , typename TScalarType >
typedef Superclass::InputImageType itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::InputImageType
template<class TInputImage , typename TScalarType >
typedef InputImageType::PixelType itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::InputPixelType
template<class TInputImage , typename TScalarType >
typedef InputImageType::RegionType itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::InputRegionType
template<class TInputImage , typename TScalarType >
typedef NormaliseFilterType::Pointer itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::NormaliseFilterPointer
template<class TInputImage , typename TScalarType >
typedef NormaliseVectorFilter<VectorDataType, itkGetStaticConstMacro(Dimension) > itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::NormaliseFilterType
template<class TInputImage , typename TScalarType >
typedef Image< OutputPixelType, itkGetStaticConstMacro(Dimension) > itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::OutputImageType
template<class TInputImage , typename TScalarType >
typedef Vector< VectorDataType, itkGetStaticConstMacro(Dimension) > itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::OutputPixelType

Standard typedefs.

template<class TInputImage , typename TScalarType >
typedef SmartPointer<Self> itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::Pointer
template<class TInputImage , typename TScalarType >
typedef ScalarImageToNormalizedGradientVectorImageFilter itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::Self

Standard "Self" typedef.

template<class TInputImage , typename TScalarType >
typedef ImageToImageFilter<TInputImage, Image< Vector< VectorDataType, TInputImage::ImageDimension >, TInputImage::ImageDimension > > itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::Superclass
template<class TInputImage , typename TScalarType >
typedef TScalarType itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::VectorDataType

Member Enumeration Documentation

template<class TInputImage , typename TScalarType >
enum itk::ScalarImageToNormalizedGradientVectorImageFilter::DerivativeType

To define what derivative type we will try.

Enumerator
CENTRAL_DIFFERENCES 
DERIVATIVE_OPERATOR 
DERIVATIVE_OF_GAUSSIAN 

Constructor & Destructor Documentation

template<class TInputImage , typename TScalarType >
itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::ScalarImageToNormalizedGradientVectorImageFilter ( )
protected
template<class TInputImage , typename TScalarType >
itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::~ScalarImageToNormalizedGradientVectorImageFilter ( )
inlineprotected

Member Function Documentation

template<class TInputImage , typename TScalarType >
virtual void itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::GenerateData ( )
protectedvirtual
template<class TInputImage , typename TScalarType >
virtual const char* itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::GetClassName ( ) const
virtual

Run-time type information (and related methods).

template<class TInputImage , typename TScalarType >
virtual DerivativeType itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::GetDerivativeType ( )
virtual
template<class TInputImage , typename TScalarType >
virtual bool itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::GetDivideByTwo ( )
virtual
template<class TInputImage , typename TScalarType >
virtual bool itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::GetNormalize ( )
virtual
template<class TInputImage , typename TScalarType >
virtual InputPixelType itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::GetPadValue ( )
virtual
template<class TInputImage , typename TScalarType >
virtual double itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::GetSigma ( )
virtual
template<class TInputImage , typename TScalarType >
virtual bool itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::GetUseMillimetreScaling ( )
virtual
template<class TInputImage , typename TScalarType >
itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::itkStaticConstMacro ( Dimension  ,
unsigned  int,
TInputImage::ImageDimension   
)

Get the number of dimensions we are working in.

template<class TInputImage , typename TScalarType >
static Pointer itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::New ( )
static

Method for creation through the object factory.

template<class TInputImage , typename TScalarType >
void itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
protected
template<class TInputImage , typename TScalarType >
virtual void itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::SetDerivativeType ( DerivativeType  _arg)
virtual

Set/Get the derivative type, as this class wraps itkGradientImageFilter and itkGradientRecursiveGaussianImageFilter.

template<class TInputImage , typename TScalarType >
virtual void itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::SetDivideByTwo ( bool  _arg)
virtual

Scale vector by dividing by two. Default on.

template<class TInputImage , typename TScalarType >
virtual void itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::SetNormalize ( bool  _arg)
virtual

Turn normalization to unit length on/off. Default on.

template<class TInputImage , typename TScalarType >
virtual void itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::SetPadValue ( InputPixelType  _arg)
virtual

Set a pad value, whereby we skip gradient evaluation. Default -1, which you should probably set to at least zero. I left it at -1 because various cortical thickness test images had lots of zeros in which are important.

template<class TInputImage , typename TScalarType >
void itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::SetScalarImage ( const InputImageType image)
inline

Sets the scalar image, at input 0.

template<class TInputImage , typename TScalarType >
virtual void itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::SetSigma ( double  _arg)
virtual

Set/Get the sigma for Gaussian smoothing. Default 0, i.e. off.

template<class TInputImage , typename TScalarType >
virtual void itk::ScalarImageToNormalizedGradientVectorImageFilter< TInputImage, TScalarType >::SetUseMillimetreScaling ( bool  _arg)
virtual

Scale vector by voxel size. Default on.


The documentation for this class was generated from the following file: