unravel.image_tools.invert module#

Use img_invert (invert) from UNRAVEL to invert a 3D image and save it.

Inputs:
  • path/img<.nii.gz|.tif|.czi|.zarr> or glob pattern(s)

Outputs:
  • path/img_inv.<ext>

Note

  • Inversion is performed as max(image) - x, independent of data type.

  • A warning is issued if the input contains negative values.

Usage:#

invert [-i path/img<.nii.gz|.tif|.czi|.zarr> or glob pattern(s)] [-c channel] [-dt dtype] [-v]

unravel.image_tools.invert.parse_args()[source]#
unravel.image_tools.invert.invert_img(ndarray, dtype=None)[source]#

Invert an image using data-range inversion.

Behavior:

inv = max(image) - x

Notes

  • Inversion is based on the image maximum, not the data type range.

  • If the input contains negative values, a warning is issued.

unravel.image_tools.invert.main()[source]#