pystack3d.utils module

utilities functions

pystack3d.utils.mask_creation(arr, threshold_min=None, threshold_max=None)

Return mask with true values in range [threshold_min, threshold_max]

pystack3d.utils.outputs_saving(output_dirname, fname, img, img_res, stats)

Append stats and save img_res after reformatting

pystack3d.utils.get_tags(fid, extract_extra_tags=True)

Return tags and extra_tags from a TiffFile

pystack3d.utils.save_tif(arr, fname, fname_out)

Save arr in a ‘fname_out’ .tif file preserving the ‘fname’ metadata

pystack3d.utils.img_reformatting(arr, dtype)

Reformat the array in the machine limits related to the data type

pystack3d.utils.imread_3d_skipping(fnames, skip_factors=(10, 10, 10))

Return a 3D-Array from .tif files wrt skip factors in all directions

pystack3d.utils.skipping(arr, skip_factors)

Skip the array in each axis

pystack3d.utils.division(num)

Return the highest dividers pair. Ex: 6 -> (3, 2), 12 -> (4, 3)

pystack3d.utils.cumdot(mat)

Return the cumulative matrix product