How to overlay color map onto dicom image?

6 ビュー (過去 30 日間)
Tsai
Tsai 2019 年 7 月 22 日
回答済み: Jayanti 2025 年 7 月 8 日
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

回答 (1 件)

Jayanti
Jayanti 2025 年 7 月 8 日
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!

カテゴリ

Help Center および File ExchangeDICOM Format についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by