locan.visualize.transform.adjust_contrast#

locan.visualize.transform.adjust_contrast(image, rescale=True, **kwargs)[source]#

Adjust contrast of image by a predefined transformation:

Parameters:
  • image (Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]) – Values to be adjusted

  • rescale (UnionType[int, str, Trafo, Callable[..., Any], bool, None]) – Transformation as defined in locan.constants.Trafo or by transformation function. For None or False no rescaling occurs. Legacy behavior: For tuple with upper and lower bounds provided in percent, rescale intensity values to be within percentile of max and min intensities. For ‘equal’ intensity values are rescaled by histogram equalization.

  • kwargs (Any) – Other parameters that are passed to the specific Transformation class.

Return type:

npt.NDArray[np.float64]