mango.image.gaussian_downsample

mango.image.gaussian_downsample(input, sigma=None, interptype=mango.image._mango_open_filters.InterpolationType.CATMULL_ROM_CUBIC_SPLINE, factor=None, voxsz=None, voxunit=None)

Downsample an image (mango.Dds) by blurring with a Discrete Gaussian kernel and resampling on a sparse grid.

Parameters:
  • input (mango.Dds) – mango.Dds image which is to be downsampled.
  • sigma (float) – The scale (standard deviation) of the Discrete Gaussian filter. If None, default is sigma=2.0*(1.0/factor)/6.0.
  • interptype (InterpolationType) – Type of interpolation for re-sampling, see InterpolationType.
  • factor (3-sequence of float) – Sampling rate, factor=(2.0,2.0,2.0) returns an image which is 8 times the size (number of voxels) of the input. If factor=(0.5,0.5,0.5) returns an image which is 1/8 times the size (number of voxels) of the input image.
  • voxsz (3-sequence of float) – New voxel size, the re-sampling rate/factor is calculated as factor=input.md.getVoxelSize()/voxsz (with appropriate size-unit conversion).
  • voxunit (str) – String indicating the length unit of the voxsz argument.
Return type:

mango.Dds

Returns:

Re-sampled image.

Previous topic

mango.image.resample

Next topic

mango.image.InterpolationType

This Page