sdcflows.utils.tools module

Image processing tools.

sdcflows.utils.tools.brain_masker(in_file, out_file=None, padding=5)[source]

Use grayscale morphological operations to obtain a quick mask of EPI data.

sdcflows.utils.tools.ensure_positive_cosines(img)[source]

Reorient axes polarity to have all positive direction cosines.

In other words, this interface will reorient the image polarities to be all positive, respecting the axes ordering. For instance, LAS -> RAS or ALS -> ARS.

sdcflows.utils.tools.resample_to_zooms(in_file, zooms, order=3, prefilter=True)[source]

Resample the input data to a new grid with the requested zooms.