cyto_dl.image.transforms.contrastadjust module#

class cyto_dl.image.transforms.contrastadjust.ContrastAdjust(low: int, high: int, background: int = 0)[source]#

Bases: Transform

Transform for contrast adjusting intensity values to be within a range and everything outside the range be set to a background value.

Parameters:
  • low (int) – lower bound for clipping

  • high (int) – upper bound for clipping

  • background (int) – intensity value for everywhere outside the specified range

class cyto_dl.image.transforms.contrastadjust.ContrastAdjustd(keys: str, low: int, high: int, background: int, allow_missing_keys: bool = False)[source]#

Bases: Transform

Dictionary Transform for clipping image intensities based on absolute or percentile values.

Parameters:
  • keys (str) – name of images to resize

  • low (float) – lower bound for clipping

  • high (float) – upper bound for clipping

  • percentile (bool) – whether to use percentile or absolute values for clipping

  • allow_missing_keys (bool) – whether to fail if provided keys are missing