Using ASSOC [message #39523] |
Tue, 25 May 2004 16:03 |
Jonathan Greenberg
Messages: 91 Registered: November 2002
|
Member |
|
|
I was hoping to get some help/feedback on the use of ASSOC. I'm working
with a large image file and, while I can extract subsections of the image
(say 3 consequtive lines), I'd prefer to work with the image as an array,
but not have it loaded into memory. Is this what ASSOC allows me to do?
I'm having a problem with the following situation:
Nl and ns = the dimensions of the byte image "someimage.dat".
Openr,unit,'someimage.dat',/get_lun
Testassoc=assoc(unit,bytarr(nl,ns))
I'd like to be able to extract the value from position x,y from testassoc --
how do I do this? Testassoc[0] seems to be the entire image. But
testassoc[0,1] gives me an end of file error, as does testassoc[0,1,1]
(which I would think would give me the value at that position).
Using the /packed keyword doesn't seem to do anything. Help!
--j
--
Jonathan Greenberg
Graduate Group in Ecology, U.C. Davis
http://www.cstars.ucdavis.edu/~jongreen
http://www.cstars.ucdavis.edu
AIM: jgrn307 or jgrn3007
MSN: jgrn307@msn.com or jgrn3007@msn.com
|
|
|