Gabor#
- class zrad.filtering.spatial.Gabor(padding_type: str, res_mm: float, sigma_mm: float, lambda_mm: float, gamma: float, theta: float, rotation_invariance: bool = False, orthogonal_planes: bool = False, n_stds: float = None)[source]#
Gabor filtering with complex 2D kernels.
Gabor filters measure oriented, frequency-selective texture. The implementation applies real and imaginary kernels slice-wise, returns their magnitude, and can average responses over orientations and orthogonal planes.
- Parameters:
padding_type ({"constant", "nearest", "reflect", "mirror", "wrap"}) – Boundary handling mode used by OpenCV.
res_mm (float) – Voxel spacing in millimetres used to convert physical scales to pixels.
sigma_mm (float) – Gaussian envelope standard deviation in millimetres.
lambda_mm (float) – Sinusoidal wavelength in millimetres.
gamma (float) – Spatial aspect ratio of the Gabor kernel.
theta (float) – Orientation angle in radians, or angular step when
rotation_invarianceis true.rotation_invariance (bool, optional) – If true, average responses over orientations from 0 to
2*pi.orthogonal_planes (bool, optional) – If true, also evaluate the three orthogonal slice planes.
n_stds (float or None, optional) – Kernel size in standard deviations. If
None, seven standard deviations are used.
Methods
|
Apply the filter to an image or set |
Return filter parameters mapped to their configured values. |
- Gabor.apply(image)#
Apply the filter to an image or set
RoiData.filtered_image.- Parameters:
image (Image or RoiData) – Input image to filter. If
RoiDatais supplied, filtering is applied toimage.imageand the result is stored asfiltered_imagein the returned ROI data. Existing intensity, texture, and IVH prepared fields are cleared.- Returns:
filtered – Filtered image, or ROI data with
filtered_imageupdated.- Return type:
- Gabor.get_params()#
Return filter parameters mapped to their configured values.
- Returns:
params – Constructor parameters stored by the filter instance.
- Return type:
dict