Re: Reading PCI files in ENVI [message #15844] |
Wed, 16 June 1999 00:00 |
Peter Mason
Messages: 145 Registered: June 1996
|
Senior Member |
|
|
Jeff Nettles <jnettles@csc.noaa.gov> wrote:
> Does anybody know of a way to open and read a PCI (*.pix) file in ENVI
> using (non-interactive) batch routines? I know you can open them from
> the ENVI menu, but we want to set up automatic routines to do image
> processing at night while we're not here. Is this even possible? If
> i use the ENVI_OPEN_FILE routine i immediately get the edit header
> dialogue.
>
> Any help is welcome.
I'll take you on your word with that last sentence, Jeff :-) I have
neither used ENVI in batch mode nor had any truck with PCI files, but I
gather that an ENVI batch command script is essentially an IDL program
that calls ENVI support routines, and so something like the following
should work. (?)
;Open it (with filename_string holding the file's path+name)
ENVI_OPEN_DATA_FILE,filename_string,/PCI,R_FID=fid
;Find out how big it is
ENVI_FILE_QUERY,fid,ns=ns,nl=nl,nb=nb,data_type=dt
;Make an array for it
img=MAKE_ARRAY(ns,nl,nb,TYPE=dt,/NOZERO)
;Read all bands
FOR i=0L,nb-1L do img[0,0,i]=ENVI_GET_DATA(fid,POS=i)
Perhaps more to the point, it appears that once you have a FID from
ENVI_OPEN_DATA_FILE it's pretty much business as usual. e.g., You
should be able to do spatial subsetting in the read using a DIMS array,
and so on.
Peter Mason
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
|
|
|
Re: Reading PCI files in ENVI [message #15850 is a reply to message #15844] |
Tue, 15 June 1999 00:00  |
Liam Gumley
Messages: 473 Registered: November 1994
|
Senior Member |
|
|
Jeff Nettles wrote:
> Does anybody know of a way to open and read a PCI (*.pix) file in ENVI
> using (non-interactive) batch routines? I know you can open them from
> the ENVI menu, but we want to set up automatic routines to do image
> processing at night while we're not here. Is this even possible? If i
> use the ENVI_OPEN_FILE routine i immediately get the edit header
> dialogue.
I don't have an IDL reader for PCI image data files, but if I wanted to
write one, I guess I'd start with the "PCIDSK Database Reference",
available at
http://www.pci.on.ca/dev_corner/index.html
Cheers,
Liam.
--
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
http://cimss.ssec.wisc.edu/~gumley
|
|
|