medmask.storage.maskfile

storage.maskfile

Classes

Name Description
MaskFile Light-weight file format for a single segmentation mask (.msk).

MaskFile

storage.maskfile.MaskFile(path, mode='r', *, codec=None)

Light-weight file format for a single segmentation mask (.msk).

Methods

Name Description
read Read segmentation mask from file.
write Write segmentation mask to file.
read
storage.maskfile.MaskFile.read()

Read segmentation mask from file.

Reads mask data as-is, but converts space description from (x,y,z) back to internal (z,y,x) format.

write
storage.maskfile.MaskFile.write(segmask)

Write segmentation mask to file.

Stores mask data as-is, but converts space description to (x,y,z) order for C++ compatibility.

Functions

Name Description
load_mask Load and return a :class:SegmentationMask from path.
save_mask Save segmask to path (.msk).

load_mask

storage.maskfile.load_mask(path, *, codec=None)

Load and return a :class:SegmentationMask from path.

save_mask

storage.maskfile.save_mask(segmask, path, *, codec=None)

Save segmask to path (.msk).