Image overlay using transparency: I only want to apply the colour displacement map to a selected rectangle of my medical image (area of interest). Can this be done?

2 次查看(过去 30 天)
I am doing a medical image registration looking at displacement off tissue. I have completed image overlay using transparency. I have cropped out a certain area for the colour map to be applied on the area of interest of my medical image.
Problem: The colour map at this area of interest does not show much variation in colour due to the fact that the other areas of the colour map (not displayed) have large colour variety. Is there anyway I can apply this imagesc to only the area of interest? I tried changing the scale of the colour map, although it made no difference. I attached an image to show you what I mean.

回答(2 个)

Image Analyst
Image Analyst 2015-9-7
I'm not sure I understand. But why don't you just convert everything to RGB images and assign the proper rectangular region a nice color image that you like?

Walter Roberson
Walter Roberson 2015-9-8
Extract the minimum and maximum of your region of interest, and use the result with caxis()
Note: for this to not distort the color of anything outside your ROI, the area outside your ROI will need to be in a different axes than you are applying the colormap to (works in R2014b and later only), or the area outside the ROI must be converted to RGB. For example
ImageAsRGB = repmat(YourIntensityImage, [1, 1, 3]);
image(ImageAsRGB);
hold on
alphamask = double(ROIMask); %ROIMask should be true (1) for the pixels inside the ROI, false (0) otherwise
image(YourIntensityImage, 'alphadata', alphamask);
data_inside_ROI = YourIntensityImage(ROIMask);
minval = min(data_inside_ROI);
maxval = max(data_inside_ROI);
caxis([minval, maxval]);
colormap(AnAppropriateColormap);
colorbar(); %if you want

类别

Help CenterFile Exchange 中查找有关 Geometric Transformation and Image Registration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by