dpm_tools.io#

Input/Output functions for reading and writing images.#

This module contains functions for reading and writing 3D volumetric images from a variety of file formats.

Image(*[, scalar, vector, filepaths, meta])

Image dataclass.

read_image(read_path, **kwargs)

A general use function for reading in an image of the implemented filetypes Currently supports reading in tiff, raw, and mat.

write_image(save_path, save_name, image[, ...])

Write a 3D image in a specified filetype

find_files_with_ext(directory, extension)

Search the given parent directory for files with the given extension.

get_tiff_metadata(directory)

Get the metadata of all tiff files in the given directory.

natural_sort(list_to_sort)

Sort a list of strings or in alphanumeric order.

combine_slices(filepath, filenames[, ...])

Combine individual slices into a volumetric stack.

convert_filetype(filepath, convert_to, **kwargs)

Convert the file extension from one format to another

download_file(url[, save_path])

Download a file from the provided URL and save it to the specified save path.