IO

aydin.io.io.is_batch(code, shape, axes)[source]

Method to check if given axis code belongs to a batch dimension.

Parameters
codestr
shapetuple
axesstr
Returns
bool
aydin.io.io.is_channel(code, length)[source]

Method to check if given axis code belongs to channel dimension.

Parameters
code :
Returns
bool
class aydin.io.io.FileMetadata[source]

Metadata class used across aydin package.

# TODO: make this docstring more detailed

aydin.io.io.imread(input_path)[source]

Image reading method.

Method takes the image path as a string argument. Upon certain checks and decisions it returns the image array and its corresponding metadata.

Parameters
input_pathstr
Returns
tuple(numpy.typing.ArrayLike, FileMetadata)

Returns tuple of (array, metadata).

aydin.io.io.imwrite(array, output_path, metadata=None, overwrite=True)[source]

Image writing method.

Parameters
arraynumpy.typing.ArrayLike
output_pathstr
metadataFileMetadata
overwritebool