nanslice.util module

util.py

Utility functions for nanslice module

nanslice.util.add_common_arguments(parser)[source]

Defines a set of common arguments that are shared between nanviewer and nanslicer

nanslice.util.center_of_mass(img)[source]

Calculates the center of mass of the image

nanslice.util.check_path(maybe_path)[source]

Helper function to check if an object is path-like

nanslice.util.ensure_image(maybe_path)[source]

Helper function that lets either images or paths be passed around