Re: Display two images on one position : or even three! [message #28621] |
Thu, 03 January 2002 10:42 |
Martin Downing
Messages: 136 Registered: September 1998
|
Senior Member |
|
|
"Emmler, Oliver" <oemmler@ix.urz.uni-heidelberg.de> wrote in message
news:a115qv$iin$1@news.urz.uni-heidelberg.de...
> Hi Martin,
>
> That's absolutely, exactly what i was searching for. I want to display a
> fMRT with contrast (amplified by slope) over a more detailed anatomical
> slice of the same region. I knew there will be a function in IDL to do
this
> but never heard about the GX functions. Here's the code i use now. It's
just
> like Christmas !!!
>
> DEVICE, SET_GRAPHICS = 3
> LoadCT, ct
> TV, amplified_image * (amplified_image GE x)
> LoadCT, 0
> DEVICE, SET_GRAPHICS = 7
> TV, reference_image * (amplified_image LT x)
>
> Thanx to You, Craig and David.
>
Glad to help, just remember to switch back to
DEVICE, SET_GRAPHICS = 3
When you have finished this stuff.
cheers
Martin
|
|
|
Re: Display two images on one position : or even three! [message #28624 is a reply to message #28621] |
Thu, 03 January 2002 00:50  |
Emmler, Oliver
Messages: 14 Registered: May 2001
|
Junior Member |
|
|
Hi Martin,
That's absolutely, exactly what i was searching for. I want to display a
fMRT with contrast (amplified by slope) over a more detailed anatomical
slice of the same region. I knew there will be a function in IDL to do this
but never heard about the GX functions. Here's the code i use now. It's just
like Christmas !!!
DEVICE, SET_GRAPHICS = 3
LoadCT, ct
TV, amplified_image * (amplified_image GE x)
LoadCT, 0
DEVICE, SET_GRAPHICS = 7
TV, reference_image * (amplified_image LT x)
Thanx to You, Craig and David.
> I've been following this thread trying to work out exactly what you want
to
> do with your images :)
> Coming from a background of 8bit graphics, I have often opt for creating a
> color table of greyscale with a few bright colors for overlay at one end
of
> the colortable. However, I dont think that is what you want as it looks
like
> you are wanting to use more than one color table for different bits of the
> image. Ok so heres how: take advantage of Graphics functions and use GXor
>
> The following shows a distace image displayed with the top values using
the
> hot body scale, middle using grey-scale and lower using black-white color
> scale, this should give you the idea.
> The key point is to OR each region using a image mask so that no area is
> updated twice
>
> ; start with GXcopy
> IDL> device, set_graphics = 3
> IDL> loadct, 3
> % LOADCT: Loading table RED TEMPERATURE
> IDL> tv, im * ((im gt 130))
> IDL> loadct, 0
> % LOADCT: Loading table B-W LINEAR
> ; now switch to GXor
> IDL> device, set_graphics = 7
> IDL> tv, im * ((im le 130) and (im gt 100))
> IDL> loadct, 1
> % LOADCT: Loading table BLUE/WHITE
> IDL> tv, im * (im lt 100)
> hope this is useful - if not its quite pretty anyhoo!
|
|
|
Re: Display two images on one position : or even three! [message #28628 is a reply to message #28624] |
Wed, 02 January 2002 13:54  |
Martin Downing
Messages: 136 Registered: September 1998
|
Senior Member |
|
|
Hi Oliver,
I've been following this thread trying to work out exactly what you want to
do with your images :)
Coming from a background of 8bit graphics, I have often opt for creating a
color table of greyscale with a few bright colors for overlay at one end of
the colortable. However, I dont think that is what you want as it looks like
you are wanting to use more than one color table for different bits of the
image. Ok so heres how: take advantage of Graphics functions and use GXor
The following shows a distace image displayed with the top values using the
hot body scale, middle using grey-scale and lower using black-white color
scale, this should give you the idea.
The key point is to OR each region using a image mask so that no area is
updated twice
; start with GXcopy
IDL> device, set_graphics = 3
IDL> loadct, 3
% LOADCT: Loading table RED TEMPERATURE
IDL> tv, im * ((im gt 130))
IDL> loadct, 0
% LOADCT: Loading table B-W LINEAR
; now switch to GXor
IDL> device, set_graphics = 7
IDL> tv, im * ((im le 130) and (im gt 100))
IDL> loadct, 1
% LOADCT: Loading table BLUE/WHITE
IDL> tv, im * (im lt 100)
hope this is useful - if not its quite pretty anyhoo!
Martin
----------------------------------------
Martin Downing,
Clinical Research Physicist,
Grampian Orthopaedic RSA Research Centre,
Woodend Hospital, Aberdeen, AB15 6LS.
"Emmler, Oliver" <oemmler@ix.urz.uni-heidelberg.de> wrote in message
news:a0v7vc$s0g$1@news.urz.uni-heidelberg.de...
>> But this goes even further afield from "easy" than my
>> previous example, so I'm not sure it would meet
>> your criteria. :-)
>
> Thanks. I tried using your procedures. The scaling of the
colortable/images
> will cause the picture to lose details. I think i have to use the
following
> loop. Is there any way to speed it up ?
>
> FOR x = 0,510 DO BEGIN
> FOR y = 0,510 DO BEGIN
> IF highlight(x,y) NE 0 THEN TV, highlight(x:x+1,y:y+1),x,y
> ENDFOR
> ENDFOR
>
> With Best Regards for the new year,
>
> Oliver
>
>
>
|
|
|