morphogen.io.native

NumPy-based files: .npz (array + geometry + metadata, round-trips) and raw .npy.

morphogen.io.native.write_npz(path, image: VoxelImage, *, compress: bool = True) → Path[source]

A voxel image written as a NumPy archive (.npz, compressed if compress) with its spacing, origin, periodicity, name, metadata and the version of morphoGen.

morphogen.io.native.read_npz(path) → VoxelImage[source]

A voxel image read back from the .npz archive of write_npz(), with its spacing, origin, periodicity, name and metadata.

morphogen.io.native.write_npy(path, image: VoxelImage) → Path[source]

The phases of a voxel image written as a NumPy array (.npy), without its spacing or metadata.

morphogen.io.native.read_npy(path) → VoxelImage[source]

A voxel image of the phases of a NumPy array (.npy), of unit spacing.