Effacer les filtres
Effacer les filtres

TO convert *.mat file into *.dcm files

4 vues (au cours des 30 derniers jours)
Kavitha Srinivasan
Kavitha Srinivasan le 3 Déc 2012
Hi all I am working with multidimensional array of CT images in mat format. Now I need to save them as *.dicom files. By using dicomwrite, the intensity (pixel) values fall within smallest value=0 to max= 65535(default). Thus all my finer details of my image is lost (image is almost blank & most of the part is white). I want to retain the same details after conversion to dcm files. Could anyone please help me with this.
Thanks
  4 commentaires
Walter Roberson
Walter Roberson le 4 Déc 2012
How do you normally display the image? Are you using imagesc() With some particular colormap ?
Kavitha Srinivasan
Kavitha Srinivasan le 4 Déc 2012
when it is in mat file, I use imagesc() with colormap gray. when it is dcm file, I use imshow().

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 4 Déc 2012
mindata = min(YourData(:));
maxdata = max(Yourdata(:));
mappeddata = uint16( (YourData - mindata) ./ (maxdata - mindata) * 65535 );
Now write mappeddata
  1 commentaire
Kavitha Srinivasan
Kavitha Srinivasan le 4 Déc 2012
It works.Thank you very much.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Import, Export, and Conversion dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by