Purpose

The module GaussGradient calculates the gradient/derivative of scalar 2D images and 3D volumes using a Derivative-of-Gaussian approach.

Usage

The extent or scale of the Gaussian function is determined by the field Gauss Sigma, which can be given in either voxels or millimeters.

In its normal operation mode, the module delivers a vecf2 or vecf3 gradient vector for 2D and 3D, respectively.

Details

A separable filtering approach is used to calculate the gradient. 1D filter kernels are calculated by sampling the 1D Gaussian:

../../../Modules/ML/MLGaussFiltersStable/mhelp/Images/GaussGradient001.gif

at the points

../../../Modules/ML/MLGaussFiltersStable/mhelp/Images/GaussHessian002.gif

The filter kernel is subsequently scaled so that the kernel elements sum to 1. The derivative kernel is found as

../../../Modules/ML/MLGaussFiltersStable/mhelp/Images/GaussGradient003.gif

where voxelSize is the size of a voxel in millimeters. With this scaling, the derivatives can be interpreted as

../../../Modules/ML/MLGaussFiltersStable/mhelp/Images/GaussGradient004.gif

or

../../../Modules/ML/MLGaussFiltersStable/mhelp/Images/GaussGradient005.gif

depending on the user-chosen unit.

The x-axis runs from left to right, the y-axis from top to bottom and z-axis into the screen. That is, the standard image coordinate system in MeVisLab is used.

Windows

Default Panel

../../../Modules/ML/MLGaussFiltersStable/mhelp/Images/Screenshots/GaussGradient._default.png

Input Fields

input0

name: input0, type: Image

Output Fields

output0

name: output0, type: Image

Parameter Fields

Field Index

2D calculation: Bool
Auto update: Bool
Gauss Sigma: Double
Gradient magnitude: Bool
Sigma Unit: Enum
Update: Trigger

Visible Fields

Gauss Sigma

name: sigma, type: Double, default: 1

Sets the width or scale of the Gaussian filter. Should be at least 0.6 voxels, otherwise the result will be inaccurate.

Sigma Unit

name: unit, type: Enum, default: voxel

Defines the unit of the sigma value.

Values:

Title Name
voxel voxel
mm mm

2D calculation

name: calc2D, type: Bool, default: FALSE

If checked, a slice-wise 2D calculation is forced, even if the input is a 3D image.

Gradient magnitude

name: calcMagnitude, type: Bool, default: FALSE

If checked, the module computes the magnitude of the gradient.

Update

name: calcButton, type: Trigger

If pressed, the module computes anew.

Auto update

name: autoUpdate, type: Bool, default: TRUE

If checked, the module computes anew on any field or input change.