Laws#

class zrad.filtering.spatial.Laws(response_map, padding_type, distance, energy_map, dimensionality, rotation_invariance=False, pooling=None)[source]#

Laws-kernel texture filtering in 2D or 3D.

Laws filters combine separable 1D kernels such as level, edge, spot, wave, and ripple operators to form texture response maps. Optional energy maps summarize absolute responses in a local neighbourhood.

Parameters:
  • response_map (str) – Kernel combination, for example "L5E5" in 2D or "L5E5S5" in 3D. Supported kernel letters are L, E, S, W, and R.

  • padding_type ({"constant", "nearest", "wrap", "reflect"}) – Boundary handling mode used during convolution.

  • distance (int) – Radius of the local averaging window used when energy_map is true.

  • energy_map (bool) – If true, return a local mean absolute response map.

  • dimensionality ({"2D", "3D"}) – Apply 2D or 3D Laws filtering.

  • rotation_invariance (bool, optional) – If true, combine responses over axis permutations and flips.

  • pooling ({"avg", "max", None}, optional) – Pooling rule for rotation-invariant responses.

Methods

apply(image)

Apply the filter to an image or set RoiData.filtered_image.

get_params()

Return filter parameters mapped to their configured values.

Laws.apply(image)#

Apply the filter to an image or set RoiData.filtered_image.

Parameters:

image (Image or RoiData) – Input image to filter. If RoiData is supplied, filtering is applied to image.image and the result is stored as filtered_image in the returned ROI data. Existing intensity, texture, and IVH prepared fields are cleared.

Returns:

filtered – Filtered image, or ROI data with filtered_image updated.

Return type:

Image or RoiData

Laws.get_params()#

Return filter parameters mapped to their configured values.

Returns:

params – Constructor parameters stored by the filter instance.

Return type:

dict