MATLAB: How to save non-dicom images (like tiff, bmp, raw files) as dicom images

bmpdicomdicomwrite

I have .bmp files which I want to save as dicom files. I tried using 'dicomwrite' command, but it didn't work. It seems the code just support dicom format files. Is that the case or could this be possible to save and view those .bmp files as dicom. Please support me with this.

Best Answer

dicomwrite( imread('YourFile.bmp'), 'YourFile.dcm')