dosma.write
- dosma.write(vol: MedicalVolume, path: Union[str, Path, PathLike], data_format: Optional[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.