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 areL,E,S,W, andR.padding_type ({"constant", "nearest", "wrap", "reflect"}) – Boundary handling mode used during convolution.
distance (int) – Radius of the local averaging window used when
energy_mapis 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 the filter to an image or set |
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
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:
- Laws.get_params()#
Return filter parameters mapped to their configured values.
- Returns:
params – Constructor parameters stored by the filter instance.
- Return type:
dict