How to overlay color map onto dicom image?

6 visualizzazioni (ultimi 30 giorni)
Tsai
Tsai il 22 Lug 2019
Risposto: Jayanti il 8 Lug 2025
I want to overlay color map onto dicom image,
but the size of color map is different from dicom image since the color map had been processed by interp2.
size of color map : 1501*1501
size of dicom image:256*256

Risposte (1)

Jayanti
Jayanti il 8 Lug 2025
Hi Tsai,
Since you want to overlay a colormap onto a DICOM image when their sizes differ, you’ll need to first resize the colormap to match the dimensions of the DICOM image (i.e., 256×256). MATLAB’s imresize function is suitable for this.
So you can read the dicom image, resize colormap to match dicom image size. Then overlay the resized colormap using "imshow" and "alpha" blending.
Please refer to the below code for more details where I have assumed "colorMap" to be colormap and "dicomImg" to be dicom image:
resizedColorMap = imresize(colorMap, size(dicomImg));
imshow(dicomImg, []);
hold on;
h = imshow(resizedColorMap );
set(h, 'AlphaData', 0.5);
title('Simulated Overlay of Colormap on DICOM Image');
Hope this is helpful!

Categorie

Scopri di più su DICOM Format in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by