How do I edit a DICOM image (e.g. overlaying a black box) while maintaining the DICOM file format?

 Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 21 Déc 2020

0 votes

There currently is no image processing function to directly add features to a DICOM image. Instead, use the following workflow to edit the desired image and rewrite to a DICOM file:
1) Read in and display DICOM image
img = dicomread('FILENAME.dcm');
imshow(img,'DisplayRange',[]);
2) Plot desired features onto the image (e.g. 'rectangle')
3) Get image data array for updated figure
img = getframe();
4) Write image data to new DICOM file
dicomwrite(img.cdata,'FILENAME_REDACTED.dcm')
If you would like to maintain the metadata from the original file, store it using 'dicominfo' and pass the resulting struct as an argument to 'dicomwrite'.

Plus de réponses (0)

Catégories

En savoir plus sur DICOM Format dans Centre d'aide et File Exchange

Produits

Version

R2019a

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!

Translated by