Home > Archive > Matlab > April 2005 > colormap help
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| David Shin 2005-04-26, 4:06 am |
| Hi,
I have a MRI image. I know that colormap function in conjunction with
colorbar function can be used to indicate the range of intensity
values. My problem is that I want to color express the intensity
values ONLY for a small portion of the image. For example, I have an
image of a human brain with a small tumor area. I want to color
express the intensities only for the tumor region within the brain
image and display the colorbar next to the image. Can somebody help
me with this?
Thanks
David
| |
| Steve Irwin 2005-04-26, 4:06 am |
| David Shin wrote:
> I have a MRI image. I know that colormap function in conjunction with
> colorbar function can be used to indicate the range of intensity
> values. My problem is that I want to color express the intensity
> values ONLY for a small portion of the image. For example, I have an
> image of a human brain with a small tumor area. I want to color
> express the intensities only for the tumor region within the brain
> image and display the colorbar next to the image. Can somebody help
> me with this?
sorry to sound ignorant, but i'm not quite sure what you want to do. you
say that you want to express the intensity values only for a selected
region - what do you want for the rest of the image? all
black/white/transparent? or, do you want the image greyscale, with the
tumour in colour? or have i completely missed the point?
| |
| David Shin 2005-04-26, 9:02 am |
| Steve Irwin wrote:
>
>
> David Shin wrote:
conjunction[color=darkred]
> with
intensity[color=darkred]
intensity[color=darkred]
have[color=darkred]
> an
> brain
> help
>
> sorry to sound ignorant, but i'm not quite sure what you want to
> do. you
> say that you want to express the intensity values only for a
> selected
> region - what do you want for the rest of the image? all
> black/white/transparent? or, do you want the image greyscale, with
> the
> tumour in colour? or have i completely missed the point?
>
Sorry for the lack of clarification. You are exactly right. I need to
preserve the grayscale information of the overall image, i.e. keeping
the brain. On top of this brain image, I want to superimpose
temperature data of the tumor. Unlike the rest of the image pixels
whose value range from 0 to 4096, the intensity of pixels of the
tumor ranges only from 0 to 45, which translates to temperature value
in celsius. I want to translate these pixel values (0 to 40) in
color, perhaps using Matlab colormap JET. Therefore, the colorbar
next to the image would show 0 value (min) having blue color and 40
(max) having red. This is a nice way to show the temperature
distribution of the tumor while maintaining the actual image
surrounding it. I hope this helps.
Thanks,
David
| |
| Steve Irwin 2005-04-26, 9:02 am |
| David Shin wrote:
> Sorry for the lack of clarification. You are exactly right. I need to
> preserve the grayscale information of the overall image, i.e. keeping
> the brain. On top of this brain image, I want to superimpose
> temperature data of the tumor. Unlike the rest of the image pixels
> whose value range from 0 to 4096, the intensity of pixels of the
> tumor ranges only from 0 to 45, which translates to temperature value
> in celsius. I want to translate these pixel values (0 to 40) in
> color, perhaps using Matlab colormap JET. Therefore, the colorbar
> next to the image would show 0 value (min) having blue color and 40
> (max) having red. This is a nice way to show the temperature
> distribution of the tumor while maintaining the actual image
> surrounding it. I hope this helps.
, i'm pretty sure i now know what you want. i don't have time today
to give a full solution, but basically split the image into the bits you
want color and grey, tweak the intensity limits, then use ind2rgb on
each separately add the results.
sorry i don't have time for than that at the moment. if i get time
t'mora i'll look into it further if you don't get a more thorough solution.
lata,
steve
| |
| Jérôme 2005-04-26, 9:02 am |
| Hi,
another solution is to mix different colormaps :
something like :
colormap([flipud(hot(5));gray(32)])
I can't say anymore about this solution because I only tried it.
I found this solution in the NewsGroup
Search for "multiple colormap"
You can also read this :
<http://www.mathworks.com/support/te...1200/1215.shtml>
Hope someone will give you more informations about this solution.
Jérôme
|
|
|
|
|