dosma.write
- dosma.write(vol: dosma.core.med_volume.MedicalVolume, path: Union[str, pathlib.Path, os.PathLike], data_format: Optional[dosma.core.io.format_io.ImageDataFormat] = None, **kwargs) None[source]
Write MedicalVolume to file.
- Parameters
vol (MedicalVolume) – Volume to write.
path (str) – File/directory path.
data_format (ImageDataFormat, optional) – Data format (e.g.
'dicom','nifti', etc.). Use this is disambiguate between different data formats. If this function is not working, try using this argument. If not provided, dosma will try to infer data format from file extension.**kwargs – Additional keyword arguments passed to the data format writer.
- Raises
FileNotFoundError – If file path or corresponding versions of file path not found.