ITK
6.0.0
Insight Toolkit
|
#include <itkDiscreteGaussianImageFilter.h>
Blurs an image by separable convolution with discrete gaussian kernels. This filter performs Gaussian blurring by separable convolution of an image and a discrete Gaussian operator (kernel).
The Gaussian operator used here was described by Tony Lindeberg (Discrete Scale-Space Theory and the Scale-Space Primal Sketch. Dissertation. Royal Institute of Technology, Stockholm, Sweden. May 1991.) The Gaussian kernel used here was designed so that smoothing and derivative operations commute after discretization.
The variance or standard deviation (sigma) will be evaluated as pixel units if SetUseImageSpacing is off (false) or as physical units if SetUseImageSpacing is on (true, default). The variance can be set independently in each dimension.
When the Gaussian kernel is small, this filter tends to run faster than itk::RecursiveGaussianImageFilter.
Definition at line 64 of file itkDiscreteGaussianImageFilter.h.
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::ImageToImageFilter< TInputImage, TInputImage > | |
static double | GetGlobalDefaultCoordinateTolerance () |
static double | GetGlobalDefaultDirectionTolerance () |
static void | SetGlobalDefaultCoordinateTolerance (double) |
static void | SetGlobalDefaultDirectionTolerance (double) |
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 () |
Static Public Attributes | |
static constexpr unsigned int | ImageDimension = TOutputImage::ImageDimension |
Static Public Attributes inherited from itk::ImageToImageFilter< TInputImage, TInputImage > | |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | OutputImageDimension |
Static Public Attributes inherited from itk::ImageSource< TInputImage > | |
static constexpr unsigned int | OutputImageDimension |
Private Attributes | |
unsigned int | m_FilterDimensionality {} |
BoundaryConditionType * | m_InputBoundaryCondition {} |
InputDefaultBoundaryConditionType | m_InputDefaultBoundaryCondition {} |
ArrayType | m_MaximumError {} |
unsigned int | m_MaximumKernelWidth {} |
RealBoundaryConditionPointerType | m_RealBoundaryCondition {} |
RealDefaultBoundaryConditionType | m_RealDefaultBoundaryCondition {} |
bool | m_UseImageSpacing {} |
ArrayType | m_Variance {} |
Additional Inherited Members | |
Protected Types inherited from itk::ImageToImageFilter< TInputImage, TInputImage > | |
using | InputToOutputRegionCopierType = ImageToImageFilterDetail::ImageRegionCopier< Self::OutputImageDimension, Self::InputImageDimension > |
using | OutputToInputRegionCopierType = ImageToImageFilterDetail::ImageRegionCopier< Self::InputImageDimension, Self::OutputImageDimension > |
Static Protected Member Functions inherited from itk::ImageSource< TInputImage > | |
static const ImageRegionSplitterBase * | GetGlobalDefaultSplitter () |
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION | ThreaderCallback (void *arg) |
Static Protected Member Functions inherited from itk::ProcessObject | |
template<typename TSourceObject > | |
static void | MakeRequiredOutputs (TSourceObject &sourceObject, const DataObjectPointerArraySizeType numberOfRequiredOutputs) |
static constexpr float | progressFixedToFloat (uint32_t fixed) |
static uint32_t | progressFloatToFixed (float f) |
Protected Attributes inherited from itk::ImageSource< TInputImage > | |
bool | m_DynamicMultiThreading |
Protected Attributes inherited from itk::ProcessObject | |
TimeStamp | m_OutputInformationMTime {} |
bool | m_Updating {} |
Protected Attributes inherited from itk::LightObject | |
std::atomic< int > | m_ReferenceCount {} |
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::ArrayType = FixedArray<double, Self::ImageDimension> |
Typedef of double containers
Definition at line 116 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::BoundaryConditionType = ImageBoundaryCondition<TInputImage> |
Typedef to describe the boundary condition.
Definition at line 106 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::ConstPointer = SmartPointer<const Self> |
Definition at line 73 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::InputDefaultBoundaryConditionType = ZeroFluxNeumannBoundaryCondition<TInputImage> |
Definition at line 111 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::InputImageType = TInputImage |
Image type information.
Definition at line 82 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::InputInternalPixelType = typename TInputImage::InternalPixelType |
Definition at line 90 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::InputPixelType = typename TInputImage::PixelType |
Definition at line 89 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::InputPixelValueType = typename NumericTraits<InputPixelType>::ValueType |
Pixel value type for Vector pixel types
Definition at line 93 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::KernelType = GaussianOperator<RealOutputPixelValueType, ImageDimension> |
Type of kernel to be used in blurring
Definition at line 121 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::OutputImageType = TOutputImage |
Definition at line 83 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::OutputInternalPixelType = typename TOutputImage::InternalPixelType |
Definition at line 88 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, 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 87 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::OutputPixelValueType = typename NumericTraits<OutputPixelType>::ValueType |
Definition at line 94 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::Pointer = SmartPointer<Self> |
Definition at line 72 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::RadiusType = typename KernelType::RadiusType |
Definition at line 122 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::RealBoundaryConditionPointerType = ImageBoundaryCondition<RealOutputImageType> * |
Definition at line 112 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::RealDefaultBoundaryConditionType = ZeroFluxNeumannBoundaryCondition<RealOutputImageType> |
Definition at line 113 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::RealOutputImageType = Image<OutputPixelType, ImageDimension> |
Definition at line 102 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::RealOutputPixelType = typename NumericTraits<OutputPixelType>::RealType |
Type of the pixel to use for intermediate results
Definition at line 101 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::RealOutputPixelValueType = typename NumericTraits<RealOutputPixelType>::ValueType |
Definition at line 103 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::ScalarRealType = double |
Definition at line 118 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::Self = DiscreteGaussianImageFilter |
Standard class type aliases.
Definition at line 70 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::SigmaArrayType = ArrayType |
Definition at line 117 of file itkDiscreteGaussianImageFilter.h.
using itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::Superclass = ImageToImageFilter<TInputImage, TOutputImage> |
Definition at line 71 of file itkDiscreteGaussianImageFilter.h.
|
inlineprotected |
Definition at line 341 of file itkDiscreteGaussianImageFilter.h.
|
overrideprotecteddefault |
|
overrideprotectedvirtual |
Standard pipeline method. While this class does not implement a ThreadedGenerateData(), its GenerateData() delegates all calculations to an NeighborhoodOperatorImageFilter. Since the NeighborhoodOperatorImageFilter is multithreaded, this filter is multithreaded by default.
Reimplemented from itk::ProcessObject.
Reimplemented in itk::GPUImageToImageFilter< TInputImage, TOutputImage, DiscreteGaussianImageFilter< TInputImage, TOutputImage > >.
|
overrideprotectedvirtual |
DiscreteGaussianImageFilter needs a larger input requested region than the output requested region (larger by the size of the Gaussian kernel). As such, DiscreteGaussianImageFilter needs to provide an implementation for GenerateInputRequestedRegion() in order to inform the pipeline execution model.
Reimplemented from itk::ProcessObject.
|
protected |
Build a directional kernel to match user specifications
|
virtual |
Set the number of dimensions to smooth. Defaults to the image dimension. Can be set to less than ImageDimension, smoothing all the dimensions less than FilterDimensionality. For instance, to smooth the slices of a volume without smoothing in Z, set the FilterDimensionality to 2.
|
virtual |
Set/get the boundary condition.
ArrayType itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::GetKernelRadius | ( | ) | const |
Get the radius of the separable kernel in each direction
unsigned int itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::GetKernelRadius | ( | const unsigned int | dimension | ) | const |
Get the radius of the generated directional kernel
ArrayType itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::GetKernelSize | ( | ) | const |
Get the size of the separable kernel in each direction. size[i] = radius[i] * 2 + 1
|
protected |
Get the variance, optionally adjusted for pixel spacing
|
virtual |
The algorithm will size the discrete kernel so that the error resulting from truncation of the kernel is no greater than MaximumError. The default is 0.01 in each dimension.
|
virtual |
Set the kernel to be no wider than MaximumKernelWidth pixels, even if MaximumError demands it. The default is 32 pixels.
|
overridevirtual |
Reimplemented from itk::ProcessObject.
Reimplemented in itk::GPUImageToImageFilter< TInputImage, TOutputImage, DiscreteGaussianImageFilter< TInputImage, TOutputImage > >.
|
virtual |
Set/get the boundary condition.
|
inline |
Get the Sigma scalar. If the Sigma is anisotropic, we will just return the Sigma along the first dimension.
Definition at line 247 of file itkDiscreteGaussianImageFilter.h.
|
inline |
Get the Sigma value.
Definition at line 233 of file itkDiscreteGaussianImageFilter.h.
|
virtual |
Set/Get whether or not the filter will use the spacing of the input image in its calculations. Use On to take the image spacing information into account and to specify the Gaussian variance in real world units; use Off to ignore the image spacing and to specify the Gaussian variance in voxel units. Default is On.
|
virtual |
The variance for the discrete Gaussian kernel. Sets the variance independently for each dimension, but see also SetVariance(const double v). The default is 0.0 in each dimension. If UseImageSpacing is true, the units are the physical units of your image. If UseImageSpacing is false then the units are pixels.
itk::DiscreteGaussianImageFilter< TInputImage, TOutputImage >::itkLegacyMacro | ( | unsigned int GetInternalNumberOfStreamDivisions() const ; | ) |
Set/Get number of pieces to divide the input for the internal composite pipeline. The upstream pipeline will not be effected.
The default value is $ImageDimension^2$.
This parameter was introduced to reduce the memory used by images internally, at the cost of performance.
|
static |
Method for creation through the object factory.
|
overrideprotectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::ProcessObject.
Reimplemented in itk::GPUImageToImageFilter< TInputImage, TOutputImage, DiscreteGaussianImageFilter< TInputImage, TOutputImage > >.
|
virtual |
Set the number of dimensions to smooth. Defaults to the image dimension. Can be set to less than ImageDimension, smoothing all the dimensions less than FilterDimensionality. For instance, to smooth the slices of a volume without smoothing in Z, set the FilterDimensionality to 2.
|
virtual |
Set/get the boundary condition.
Reimplemented in itk::FFTDiscreteGaussianImageFilter< TInputImage, TOutputImage >.
|
virtual |
The algorithm will size the discrete kernel so that the error resulting from truncation of the kernel is no greater than MaximumError. The default is 0.01 in each dimension.
|
inline |
Definition at line 253 of file itkDiscreteGaussianImageFilter.h.
|
inline |
Definition at line 265 of file itkDiscreteGaussianImageFilter.h.
|
inline |
Definition at line 174 of file itkDiscreteGaussianImageFilter.h.
|
virtual |
Set the kernel to be no wider than MaximumKernelWidth pixels, even if MaximumError demands it. The default is 32 pixels.
|
virtual |
Set/get the boundary condition.
|
inline |
Set the standard deviation of the Gaussian used for smoothing. Sigma is measured in the units of image spacing.
Definition at line 207 of file itkDiscreteGaussianImageFilter.h.
|
inline |
SetSigmaArray is preserved for interface backwards compatibility.
Definition at line 225 of file itkDiscreteGaussianImageFilter.h.
|
inline |
SetSigmaArray is preserved for interface backwards compatibility.
Definition at line 220 of file itkDiscreteGaussianImageFilter.h.
|
virtual |
Set/Get whether or not the filter will use the spacing of the input image in its calculations. Use On to take the image spacing information into account and to specify the Gaussian variance in real world units; use Off to ignore the image spacing and to specify the Gaussian variance in voxel units. Default is On.
|
virtual |
The variance for the discrete Gaussian kernel. Sets the variance independently for each dimension, but see also SetVariance(const double v). The default is 0.0 in each dimension. If UseImageSpacing is true, the units are the physical units of your image. If UseImageSpacing is false then the units are pixels.
|
inline |
Definition at line 181 of file itkDiscreteGaussianImageFilter.h.
|
inline |
Definition at line 193 of file itkDiscreteGaussianImageFilter.h.
|
inline |
Convenience Set methods for setting all dimensional parameters to the same values.
Definition at line 166 of file itkDiscreteGaussianImageFilter.h.
|
virtual |
Set/Get whether or not the filter will use the spacing of the input image in its calculations. Use On to take the image spacing information into account and to specify the Gaussian variance in real world units; use Off to ignore the image spacing and to specify the Gaussian variance in voxel units. Default is On.
|
staticconstexpr |
Extract some information from the image types. Dimensionality of the two images is assumed to be the same.
Definition at line 98 of file itkDiscreteGaussianImageFilter.h.
|
private |
Number of dimensions to process. Default is all dimensions
Definition at line 396 of file itkDiscreteGaussianImageFilter.h.
|
private |
Pointer to a persistent boundary condition object used for the image iterator.
Definition at line 403 of file itkDiscreteGaussianImageFilter.h.
|
private |
Default boundary condition
Definition at line 406 of file itkDiscreteGaussianImageFilter.h.
|
private |
The maximum error of the gaussian blurring kernel in each dimensional direction. For definition of maximum error, see GaussianOperator.
Definition at line 389 of file itkDiscreteGaussianImageFilter.h.
|
private |
Maximum allowed kernel width for any dimension of the discrete Gaussian approximation
Definition at line 393 of file itkDiscreteGaussianImageFilter.h.
|
private |
Boundary condition use for the intermediate filters
Definition at line 409 of file itkDiscreteGaussianImageFilter.h.
|
private |
Default boundary condition use for the intermediate filters
Definition at line 412 of file itkDiscreteGaussianImageFilter.h.
|
private |
Flag to indicate whether to use image spacing
Definition at line 399 of file itkDiscreteGaussianImageFilter.h.
|
private |
The variance of the gaussian blurring kernel in each dimensional direction.
Definition at line 384 of file itkDiscreteGaussianImageFilter.h.