With an indexed image, how do you make a specific color to be brighter by editing the colormap itself.
Show older comments
With this line of code
% Load Atlas
% Relies on https://www.fieldtriptoolbox.org/template/atlas/ and
% https://github.com/fieldtrip/fieldtrip/tree/master/template/atlas and
% https://www.gin.cnrs.fr/en/tools/aal/
aalAtlas = ft_read_atlas('ROI_MNI_V4.nii');
BrainImage = ones(91, 109,'int8')
%help Image;
BrainImage(:,:) = aalAtlas.tissue(:, :, 50) %the tissue is part of the 3D BrainImage of the Atlas that looks at tissue
%BrainImage
%put it in a for loop to display each sect ion
for slice = 1:91
BrainImage(:,:) = aalAtlas.tissue(:, :, slice);
regions = ismember(BrainImage, [50,46,64]);
ColorBrainImage = ind2rgb(BrainImage, colorcube);
% Make those 3 regions a value brighter.
ColorBrainImage(regions) = uint8(5 * double(ColorBrainImage(regions))); %double allows to multipy with decimals and uint brings it back to whole number
BBrainImage = imresize(ColorBrainImage,10);
imshow(BBrainImage)
end
I am able to load a brain atlas that goes through the slices of the brain with the labelled respective regions. I have been able to highlight portions of the brain that I want, such as 50, 46, and 64. I can see these regions highlighted when I use different colormaps such as "copper," which is very easy to see the difference because it is in red compared to the rest of the image being shades of green. My issue is that I want to use the colorcube colormap because it is very easy to tell the portions of the brain labelled on the brain atlas I have apart, but since all the colors are already so bright, I can never tell which region is highlighted. Is there a way where I can possilbe make the colorcube colormap dimmer itself and then be able to see the highlighted regions I choose to be brighter?
Accepted Answer
More Answers (0)
Categories
Find more on Blue in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!