normalization

functional

auxiliary.normalization.functional.normalize_with_percentiles(image: ndarray, lower_percentile: float = 0.0, upper_percentile: float = 100.0, lower_limit: float = 0, upper_limit: float = 1)

Normalize an input image using percentile-based normalization.

Parameters:
  • image (numpy.ndarray) – The input image.

  • lower_percentile (float) – The lower percentile for mapping.

  • upper_percentile (float) – The upper percentile for mapping.

  • lower_limit (float) – The lower limit for normalized values.

  • upper_limit (float) – The upper limit for normalized values.

Returns:

The normalized image.

Return type:

numpy.ndarray

auxiliary.normalization.functional.normalize_with_windowing(image: ndarray, center: float, width: float)

Normalize an input image using windowing-based normalization.

Parameters:
  • image (numpy.ndarray) – The input image.

  • center (float) – The window center.

  • width (float) – The window width.

Returns:

The normalized image.

Return type:

numpy.ndarray

normalizer_base

class auxiliary.normalization.normalizer_base.Normalizer

Bases: ABC

Abstract base class for image normalization methods.

_abc_impl = <_abc._abc_data object>
abstract normalize(image)

Normalize the input image based on the chosen method.

Parameters:

image (numpy.ndarray) – The input image.

Returns:

The normalized image.

Return type:

numpy.ndarray

percentile_normalizer

class auxiliary.normalization.percentile_normalizer.PercentileNormalizer(lower_percentile: float = 0.0, upper_percentile: float = 100.0, lower_limit: float = 0, upper_limit: float = 1)

Bases: Normalizer

Normalizer subclass for percentile-based image normalization.

_abc_impl = <_abc._abc_data object>
normalize(image: ndarray)

Normalize the input image using percentile-based mapping.

Parameters:

image (numpy.ndarray) – The input image.

Returns:

The percentile-normalized image.

Return type:

numpy.ndarray

windowing_normalizer

class auxiliary.normalization.windowing_normalizer.WindowingNormalizer(center, width)

Bases: Normalizer

Normalizer subclass for windowing-based image normalization.

_abc_impl = <_abc._abc_data object>
normalize(image)

Normalize the input image using windowing.

Parameters:

image (numpy.ndarray) – The input image.

Returns:

The windowed normalized image.

Return type:

numpy.ndarray