|
From: Ruud on 26 Jan 2010 08:28 Hello, I have a color image C that I overlay on a part of a grayscale image G; a colormap of concentration on an anatomical MRI image. I would like a colorbar on the side that shows the colors of the overlaid color image C instead of the default grayscale, but I have no idea on how to switch the reference of the colorbar on the side. What I do to get the overlaid/coregistered image: - Scale the grayscale image G to 0-1 range, use imageA=imshow(G) to plot (need to do it first since it has a larger plot area) - Scale the colormap data to the 0-1 range, use gray2ind(jet) and ind2rgb to get a jet colormap C. set 'hold on' and use imageB=imshow(C,'XData',rangeX,'YData',rangeY). - Set the transparancy of the overlay with set(imageB,'AlphaData',AlphaMatrix) So far, so good. If I now add a line 'colorbar', it will show the gray color range of the first plotted image (imageA, from G). Can anyone tell me how to set it to display the color range used in imageB? Thanks, Ruud
|
Pages: 1 Prev: Attempt to call constructor image with incorrect letter case Next: Windows Vista Problem |