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
|