unravel.register.reg_background module#

Use reg_background (background or rbg) from UNRAVEL to estimate and save the background of a 3D image using a rolling-ball-like method.

Notes

  • Provides a background image for registration when no autofluorescence channel is available (e.g., c-Fos IF).

  • Supports uint8 and uint16 images only.

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

Outputs:
  • path/img_rb<radius>_bg.<ext>

Usage:#

background [-i input] [-o output] [-rb radius] [-c channel] [-dt dtype] [-v]

unravel.register.reg_background.parse_args()[source]#
unravel.register.reg_background.process_slice(slice2d, struct_element)[source]#

Return background estimate via morphological opening.

unravel.register.reg_background.rolling_ball_background_opencv_parallel(ndarray, radius, threads=8)[source]#

Return background estimate per-slice using morphological opening (rolling ball approximation).

unravel.register.reg_background.main()[source]#