comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » image display by IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
image display by IDL [message #28640] Thu, 27 December 2001 20:46 Go to next message
fisher01 is currently offline  fisher01
Messages: 1
Registered: December 2001
Junior Member
Hi, folks;

A member of our group meet a problem, she wants to display a raw
multispectral satellite image. She writes a program using IDL
(Interactive Data Language). At first she displays a .JPEG image as
the interface, and then she try to display the raw satellite image but
she couldn't get the currect color mapping table. Could you please
tell us how to get the currect color mapping table for image display?
Now she can get the currect color mapping table if she just opens
.JPEG imge or raw image, respectively.


Thank you very much for your help.


L.Zhang

P.S.
here is her program:

pro picture
tvlct,rr,gg,bb,/get
image=READ_IMAGE('picture.jpg')
if (SIZE(image,/N_DIM) EQ 3) THEN $
nimage=COLOR_QUAN(image,1,r,g,b)
nnimage=CONGRID(nimage,!D.X_SIZE,!D.Y_SIZE)
DEVICE,DECOMPOSED=0
TVLCT,r,g,b
tv,nnimage
tvlct,rr,gg,bb
end

pro display
....
....
....

orig_image =fordisplay(106)
new_image=intarr(x,y)
for a=0,x-1 do begin
for b=0,y-1 do begin
new_image[a,y-1-b]=orig_image[a,b]
endfor
endfor
TVSCL,CONGRID(new_image, x_size, y_size)

....
....

end

function fordisplay,band
COMMON UNITNUM
point_lun,w,0
head=lonarr(11)
readu,w,head
point_lun,w,0
image=intarr(head[0],head[1])
point_lun,w,head[10]+(band-1)*head[0]*head[1]*2L
readu,w,image
return,image/4095.0*255.0
end
Re: Image display [message #36051 is a reply to message #28640] Thu, 07 August 2003 09:39 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
New2IDL writes:

> Is there anyway to display images in a clear format without
> bytscaling them. I have a dicom image which i can open using ImageJ
> and Osiris. When i try to open the same without bytscaling in IDL, i
> can see grains in the image and the number of grey shades in the image
> is lesser and there are white patches.
> Is there any way to fix this. The image has floating point values.

If you don't byte scale your data, IDL will use only
the lowest 8 bits of information in each pixel value
to display the data. This is why you are seeing those
strange artifacts.

Dicom images are typically 16-bit images, so users
sometimes like to choose what portion of their
total data set is being byte scaled. This is called
"windowing". Setting the TOP keyword on the BYTSCL
command will adjust the contrast on the portion of
the data that is in the "window".

You can read about this in this article (as well as
find links to some programs):

http://www.dfanning.com/ip_tips/contrast.html

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Image display
Next Topic: Re: Real time application

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:43:03 PDT 2025

Total time taken to generate the page: 0.00488 seconds