voxel.utils.pixel_data.invert

voxel.utils.pixel_data.invert(volume: ndarray, output_range: Optional[Tuple[float, float]] = None, inplace: bool = False) ndarray[source]

Invert the pixel values in a volume.

Parameters:
  • volume (np.ndarray) – Volume to invert.

  • pixel_range (Tuple[float, float], optional) – Pixel range. Defaults to None.

  • inplace (bool, optional) – Whether to apply the rescale in place. Defaults to False.

Returns:

Inverted volume.

Return type:

np.ndarray