How to convert Dicom images (.dcm) into '.img' format ?
Afficher commentaires plus anciens
Hi, I have a c ++ program linked through MEX file to a Matlab program. The input to this is only '.img' format. Now I have a few images which are .dcm which cannot be given as input to the program.
Is there any way to convert .dcm to .img format?
Réponses (1)
Walter Roberson
le 10 Juin 2017
0 votes
You can use dicomread() to read the files.
If you look in the File Exchange you will find several programs that can write ENVI img/hdr files
5 commentaires
Gopichandh Danala
le 13 Juin 2017
Walter Roberson
le 13 Juin 2017
.hdr files give you information about how to interpret the .img files
There is some potential ambiguity here. The same file extension pair .img/.hdr is used for ENVI and for NIFTI / Analyze files. You might wish to have a look at https://www.mathworks.com/matlabcentral/fileexchange/8797-tools-for-nifti-and-analyze-image if your are looking for NIFTI / Analyze
Gopichandh Danala
le 13 Juin 2017
Gopichandh Danala
le 13 Juin 2017
Walter Roberson
le 13 Juin 2017
Look at the documentation:
% Usage: save_nii(nii, filename, [old_RGB])
%
% nii.hdr - struct with NIFTI header fields (from load_nii.m or make_nii.m)
%
% nii.img - 3D (or 4D) matrix of NIFTI data.
You passed in a plain data array instead of an appropriate struct.
Catégories
En savoir plus sur DICOM Format dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!