| Help with ASSOC function [message #2399] |
Wed, 22 June 1994 22:41 |
cce
Messages: 2 Registered: December 1993
|
Junior Member |
|
|
Could someone please explain the reason for having to replace lines 7 and 9
with those shown to get this .pro file to work. I am using a 512x512 BIL
2 channel image. What is the significance of the extra 0?
pro dspim,name ; Line 01
openr,1,name ; Line 02
hdr = intarr(512) ; Line 03
image = assoc(1,intarr(512,2,512,/nozero),1024) ; Line 04
ch1 = bytarr(512,512) ; Line 05
ch2 = bytarr(512,512) ; Line 06
ch1(*,*) = bytscl(image(*,0,*),min=0,max=200) ; Line 07
tv,ch1 ; Line 08
ch2(*,*) = bytscl(image(*,1,*),min=0,max=200) ; Line 09
tv,ch2 ; Line 10
close,1 ; Line 11
end ; Line 12
% Compiled module: DSPIM.
% Range illegal for record number in assoc var ref: IMAGE
% Execution halted at DSPIM <dspim.pro( 7)> .
% Called from $MAIN$ .
If the above two lines replace their respective lines above everything works.
ch1(*,*) = bytscl(image(*,0,*,0),min=0,max=200) ; Replace Line 07
ch2(*,*) = bytscl(image(*,1,*,0),min=0,max=200) ; Replace Line 09
------------------------------------------------------------ ---------
Clive Elsum e-mail: cce@dar.csiro.au
CSIRO Atmospheric Research Phone : (+61 3) 586 7509
Private Bag #1 Fax: (+61 3) 586 7600
Mordialloc Victoria 3195
Australia
------------------------------------------------------------ ---------
|
|
|
|