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

 Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 21 de Dic. de 2020

0 votos

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'.

Más respuestas (0)

Categorías

Más información sobre DICOM Format en Centro de ayuda y File Exchange.

Productos

Versión

R2019a

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by