Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > Re: ENVI header...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 6 Topic 5478 of 6266
Post > Topic >>

Re: ENVI header files in IDL

by Bob Crawford <Snowman42@[EMAIL PROTECTED] > Feb 27, 2008 at 09:29 AM

On Feb 27, 10:39=A0am, David Fanning <n...@[EMAIL PROTECTED]
> wrote:
> Raghu writes:
> > In IDL, i'm using filesearch function to read through files of certain
> > types.
> > Since an envi file has no specific extension, i'm not able to figure
> > out how to sort out the files.
> > Here's an example:
>
> > Say i have 2 images in ENVI format. It would look like IMAGE1,
> > IMAGE1.hdr,IMAGE2, IMAGE2.hdr.
> > As you can see, its only the header file which has the extension. When
> > i use the filesearch(image*), i am not
> > able to ignore the header files. These header files are not to be
> > processed.
>
> > Any ideas of how to choose only the images and not the header files,
> > as in this case ?
> > I guess i could convert the files to IMG so that they have an
> > extension, but there must be an easier way.
>
> Are you feeling confident this morning? Charged up?
> If so, you may want to try to wrap your head around
> regular expressions. Here is where I would go for a
> start:
>
> =A0 =A0http://www.ittvis.com/codebank/search.asp?FID=3D311
>
> This points you to Mike Galloy's excellent article on
> the subject. I've been studying the damn things for years
> without making the slightest bit of progress, but maybe
> you will have more luck.
>
> Failing that, I think a WHERE statement to locate the
> parts of the file search array you want to keep
> (or eliminate) wouldn't be totally out of place. :-)
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Se****e ma de ni thui. ("Perhaps thou speakest truth.")- Hide quoted text
-=

>
> - Show quoted text -

Or, if you know you only have at max image0 thru image9:
result =3D FILE_SEARCH('image?')

Or if your known max is image99:
result =3D FILE_SEARCH('{image?,image??}')

(that is if you're not feeling up to regular expressions)
 




 6 Posts in Topic:
ENVI header files in IDL
Raghu <raghuram.narasi  2008-02-27 07:29:35 
Re: ENVI header files in IDL
David Fanning <news@[E  2008-02-27 08:39:11 
Re: ENVI header files in IDL
Bob Crawford <Snowman4  2008-02-27 09:29:07 
Re: ENVI header files in IDL
Jean H <jghasban@[EMAI  2008-02-27 10:36:33 
Re: ENVI header files in IDL
Raghu <raghuram.narasi  2008-03-10 19:30:59 
Re: ENVI header files in IDL
Jean H <jghasban@[EMAI  2008-03-11 09:16:51 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 14 11:17:26 CDT 2008.