ITK
5.2.0
Insight Toolkit
|
#include <itkVectorGradientMagnitudeImageFilter.h>
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
static void | SetGlobalDefaultDirectionTolerance (double) |
static double | GetGlobalDefaultDirectionTolerance () |
static void | SetGlobalDefaultCoordinateTolerance (double) |
static double | GetGlobalDefaultCoordinateTolerance () |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Computes a scalar, gradient magnitude image from a multiple channel (pixels are vectors) input.
The template parameter TRealType must be floating point (float or double) or a user-defined "real" numerical type with arithmetic operations defined sufficient to compute derivatives.
[1] G. Sapiro and D. Ringach, "Anisotropic Diffusion of Multivalued Images with Application to Color Filtering," IEEE Transactions on Image Processing, Vol 5, No. 11 pp. 1582-1586, 1996
The second, more heuristic, calculation mode finds gradient magnitude as the square-root of the sum of the * individual weighted vector component derivative sums squared. That is, * , where * is the channel of vector image of dimension . * Weighting terms are applied to each vector component.
The second mode is computationally much faster than the first and has the advantage that it is automatically multi-threaded (some vnl functions used in the first mode are not thread-safe). The first mode, however, tends to give intuitively better results with less (or no) parameter tuning.
The second template parameter, TRealType, can be optionally specified to define the scalar numerical type used in calculations. This is the component type of the output image. The default type of TRealType is float. For extra precision, you may safely change this parameter to double.
The third template parameter is the output image type. The third parameter will be automatically constructed from the first and second parameters, so it is not necessary (or advisable) to set this parameter explicitly. Given an M-channel input image with dimensionality N, and a numerical type specified as TRealType, the output image will be of type itk::Image<TRealType, N>.
The method UseImageSpacingOn will cause derivatives in the image to be scaled (inversely) with the pixel size of the input image, effectively taking derivatives in world coordinates (versus isotropic image space). UseImageSpacingOff turns this functionality off. Default is UseImageSpacingOn. The parameter UseImageSpacing can be set directly with the method SetUseImageSpacing(bool).
Weights can be applied to the derivatives directly using the SetDerivativeWeights method. Note that if UseImageSpacing is set to TRUE (ON), then these weights will be overridden by weights derived from the image spacing when the filter is updated. The argument to this method is a C array of TRealValue type.
Weights can be applied to each vector component of the image when the component derivative values are summed during computation. Specify these weights using the SetComponentWeights method. The argument to this method is a C array of TRealValue type.
Definition at line 138 of file itkVectorGradientMagnitudeImageFilter.h.
using itk::VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >::ComponentWeightsType = FixedArray<TRealType, VectorDimension> |
The weights used to scale derivatives during processing
Definition at line 232 of file itkVectorGradientMagnitudeImageFilter.h.
using itk::VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >::ConstNeighborhoodIteratorType = ConstNeighborhoodIterator<RealVectorImageType> |
Type of the iterator that will be used to move through the image. Also the type which will be passed to the evaluate function
Definition at line 181 of file itkVectorGradientMagnitudeImageFilter.h.
using itk::VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >::ConstPointer = SmartPointer<const Self> |
Definition at line 147 of file itkVectorGradientMagnitudeImageFilter.h.
using itk::VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >::DerivativeWeightsType = FixedArray<TRealType, ImageDimension> |
The weights used to scale derivatives during processing
Definition at line 233 of file itkVectorGradientMagnitudeImageFilter.h.
|
protected |
The weights used to scale derivatives during processing
Definition at line 318 of file itkVectorGradientMagnitudeImageFilter.h.
using itk::VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >::InputImagePointer = typename InputImageType::Pointer |
Definition at line 163 of file itkVectorGradientMagnitudeImageFilter.h.
using itk::VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >::InputImageType = TInputImage |
Image type alias support
Definition at line 161 of file itkVectorGradientMagnitudeImageFilter.h.
using itk::VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >::InputPixelType = typename TInputImage::PixelType |
Definition at line 158 of file itkVectorGradientMagnitudeImageFilter.h.
using itk::VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >::OutputImagePointer = typename OutputImageType::Pointer |
Definition at line 164 of file itkVectorGradientMagnitudeImageFilter.h.
using itk::VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >::OutputImageRegionType = typename Superclass::OutputImageRegionType |
Superclass type alias.
Definition at line 185 of file itkVectorGradientMagnitudeImageFilter.h.
using itk::VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >::OutputImageType = TOutputImage |
Definition at line 162 of file itkVectorGradientMagnitudeImageFilter.h.
using itk::VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >::OutputPixelType = typename TOutputImage::PixelType |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 157 of file itkVectorGradientMagnitudeImageFilter.h.
using itk::VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >::Pointer = SmartPointer<Self> |
Definition at line 146 of file itkVectorGradientMagnitudeImageFilter.h.
using itk::VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >::RadiusType = typename ConstNeighborhoodIteratorType::RadiusType |
Definition at line 182 of file itkVectorGradientMagnitudeImageFilter.h.
using itk::VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >::RealType = TRealType |
Define the data type and the vector of data type used in calculations.
Definition at line 175 of file itkVectorGradientMagnitudeImageFilter.h.
using itk::VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >::RealVectorImageType = Image<RealVectorType, TInputImage::ImageDimension> |
Definition at line 177 of file itkVectorGradientMagnitudeImageFilter.h.
using itk::VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >::RealVectorType = Vector<TRealType, InputPixelType::Dimension> |
Definition at line 176 of file itkVectorGradientMagnitudeImageFilter.h.
using itk::VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >::Self = VectorGradientMagnitudeImageFilter |
Standard class type aliases.
Definition at line 144 of file itkVectorGradientMagnitudeImageFilter.h.
using itk::VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >::Superclass = ImageToImageFilter<TInputImage, TOutputImage> |
Definition at line 145 of file itkVectorGradientMagnitudeImageFilter.h.
|
protected |
The weights used to scale derivatives during processing
|
overrideprotecteddefault |
The weights used to scale derivatives during processing
|
overrideprotectedvirtual |
Do any necessary casting/copying of the input data. Input pixel types whose value types are not real number types must be cast to real number types.
Reimplemented from itk::ImageSource< TOutputImage >.
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::Object.
|
static |
A specialized solver for finding the roots of a cubic polynomial. Necessary to multi-thread the 3D case
|
overrideprotectedvirtual |
VectorGradientMagnitudeImageFilter can be implemented as a multithreaded filter. Therefore, this implementation provides a DynamicThreadedGenerateData() routine which is called for each processing thread. The output image data is allocated automatically by the superclass prior to calling DynamicThreadedGenerateData(). DynamicThreadedGenerateData can only write to the portion of the output image specified by the parameter "outputRegionForThread"
Reimplemented from itk::ImageSource< TOutputImage >.
|
inlineprotected |
The weights used to scale derivatives during processing
Definition at line 458 of file itkVectorGradientMagnitudeImageFilter.h.
References itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetNext(), and itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetPrevious().
|
inlineprotected |
The weights used to scale derivatives during processing
Definition at line 344 of file itkVectorGradientMagnitudeImageFilter.h.
References itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetNext(), and itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetPrevious().
|
overridevirtual |
VectorGradientMagnitudeImageFilter needs a larger input requested region than the output requested region (larger by the kernel size to calculate derivatives). As such, VectorGradientMagnitudeImageFilter needs to provide an implementation for GenerateInputRequestedRegion() in order to inform the pipeline execution model.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
|
virtual |
The weights used to scale derivatives during processing
|
virtual |
The weights used to scale derivatives during processing
|
virtual |
Run-time type information (and related methods)
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
|
protectedvirtual |
Get access to the input image casted as real pixel values
|
virtual |
The weights used to scale derivatives during processing
|
virtual |
The weights used to scale derivatives during processing
|
static |
Method for creation through the object factory.
|
inlineprotected |
The weights used to scale derivatives during processing
Definition at line 324 of file itkVectorGradientMagnitudeImageFilter.h.
References itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetNext(), itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetPrevious(), and itk::NumericTraits< T >::ZeroValue().
|
overrideprotectedvirtual |
The weights used to scale derivatives during processing
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
|
virtual |
Set/Get the array of weightings for the different components of the vector. Default values are 1.0.
|
virtual |
Directly Set/Get the array of weights used in the gradient calculations. Note that calling UseImageSpacingOn will clobber these values.
void itk::VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >::SetUseImageSpacing | ( | bool | ) |
Set/Get whether or not the filter will use the spacing of the input image (1/spacing) in the calculation of the derivative weights. Use On if you want to calculate the gradient in the space in which the data was acquired; use Off to ignore image spacing and to calculate the gradient in the image space. Default is On.
|
virtual |
Set/Get principle components calculation mode. When this is set to TRUE/ON, the gradient calculation will involve a principle component analysis of the partial derivatives of the color components. When this value is set to FALSE/OFF, the calculation is done as a square root of weighted sum of the derivatives squared. Default is UsePrincipleComponents = true.
|
virtual |
The weights used to scale derivatives during processing
|
virtual |
The weights used to scale derivatives during processing
|
virtual |
The weights used to scale derivatives during processing
|
virtual |
The weights used to scale derivatives during processing
|
staticconstexpr |
Definition at line 169 of file itkVectorGradientMagnitudeImageFilter.h.
|
staticconstexpr |
The dimensionality of the input and output images. Dimensionality of the two images is assumed to be the same.
Definition at line 168 of file itkVectorGradientMagnitudeImageFilter.h.
|
protected |
These weights are used to scale vector component values when they are combined to produce a scalar. The square root
Definition at line 499 of file itkVectorGradientMagnitudeImageFilter.h.
|
protected |
The weights used to scale derivatives during processing
Definition at line 494 of file itkVectorGradientMagnitudeImageFilter.h.
|
private |
The weights used to scale derivatives during processing
Definition at line 509 of file itkVectorGradientMagnitudeImageFilter.h.
|
private |
The weights used to scale derivatives during processing
Definition at line 507 of file itkVectorGradientMagnitudeImageFilter.h.
|
protected |
The weights used to scale derivatives during processing
Definition at line 500 of file itkVectorGradientMagnitudeImageFilter.h.
|
private |
The weights used to scale derivatives during processing
Definition at line 504 of file itkVectorGradientMagnitudeImageFilter.h.
|
private |
The weights used to scale derivatives during processing
Definition at line 505 of file itkVectorGradientMagnitudeImageFilter.h.
|
staticconstexpr |
Length of the vector pixel type of the input image.
Definition at line 172 of file itkVectorGradientMagnitudeImageFilter.h.