filename)
¶filename, info)
¶Write a DICOM format file to filename.
im - image data or empty matrix, [], if only metadata save is required
filename - filename to write dicom to. if [], then function runs in verbose trial mode.
info - struct, like that produced by dicominfo
Create a dicom file using default info, and the supplied data:
> wdata = uint8 (10*rand (10,10)); > dicomwrite (wdata, 'test.dcm');
Create a dicom file using data and meta info:
> wdata = dicomread(file_in_loadpath('imdata/CT-MONO2-16-ankle.dcm'); > info = dicominfo(file_in_loadpath('imdata/CT-MONO2-16-ankle.dcm'); > dicomwrite(wdata, info);
See also: dicomread, dicominfo.
Package: dicom