f



idl call envi function, running with out ENVI?

I just write a simple IDL program, while the major code write in IDL
with some function of ENVI to speed up my programing.

example:
PRO test_read
  COMPILE_OPT idl2
  file_name = DIALOG_PICKFILE(/READ,FILTER='*.*')
  ENVI_OPEN_FILE, file_name, r_fid=r_dem,/NO_REALIZE
  IF (r_dem EQ -1) THEN RETURN
END

I hope to release this code running without ENVI, what should I do?
0
wxfei19 (2)
8/24/2011 3:26:38 AM
comp.lang.idl-pvwave 12260 articles. 2 followers. Post Follow

5 Replies
967 Views

Similar Articles

[PageSpeed] 5

On Aug 24, 1:26=A0pm, "wxfe...@gmail.com" <wxfe...@gmail.com> wrote:
> I just write a simple IDL program, while the major code write in IDL
> with some function of ENVI to speed up my programing.
>
> example:
> PRO test_read
> =A0 COMPILE_OPT idl2
> =A0 file_name =3D DIALOG_PICKFILE(/READ,FILTER=3D'*.*')
> =A0 ENVI_OPEN_FILE, file_name, r_fid=3Dr_dem,/NO_REALIZE
> =A0 IF (r_dem EQ -1) THEN RETURN
> END
>
> I hope to release this code running without ENVI, what should I do?

You must also have a envi_get_data in there somewhere if you're using
IDL functions.

What you probably want to do (assuming you know the details of the dem
format) is use the IDL read_binary function just to read it into an
array.

Max
0
maxjpeck (28)
8/24/2011 6:53:09 AM
On Aug 23, 11:26=A0pm, "wxfe...@gmail.com" <wxfe...@gmail.com> wrote:
> I just write a simple IDL program, while the major code write in IDL
> with some function of ENVI to speed up my programing.
>
> example:
> PRO test_read
> =A0 COMPILE_OPT idl2
> =A0 file_name =3D DIALOG_PICKFILE(/READ,FILTER=3D'*.*')
> =A0 ENVI_OPEN_FILE, file_name, r_fid=3Dr_dem,/NO_REALIZE
> =A0 IF (r_dem EQ -1) THEN RETURN
> END
>
> I hope to release this code running without ENVI, what should I do?

Are you asking how to read an envi file without envi running (ie,
using just idl)?  If so that's easy, it's just a matter of the
specifics you need to achieve (ie, do you know the dimensions
beforehand?).  Why don't you explain what you want to do a little
better...
0
8/25/2011 12:13:09 AM
On Aug 25, 8:13=A0am, "Jeff N." <jeffnettles4...@gmail.com> wrote:
> On Aug 23, 11:26=A0pm, "wxfe...@gmail.com" <wxfe...@gmail.com> wrote:
>
> > I just write a simple IDL program, while the major code write in IDL
> > with some function of ENVI to speed up my programing.
>
> > example:
> > PRO test_read
> > =A0 COMPILE_OPT idl2
> > =A0 file_name =3D DIALOG_PICKFILE(/READ,FILTER=3D'*.*')
> > =A0 ENVI_OPEN_FILE, file_name, r_fid=3Dr_dem,/NO_REALIZE
> > =A0 IF (r_dem EQ -1) THEN RETURN
> > END
>
> > I hope to release this code running without ENVI, what should I do?
>
> Are you asking how to read an envi file without envi running (ie,
> using just idl)? =A0If so that's easy, it's just a matter of the
> specifics you need to achieve (ie, do you know the dimensions
> beforehand?). =A0Why don't you explain what you want to do a little
> better...

yes I want to read an envi file and do some image process(using some
envi function).
and I hope the code(released in exe or other format) could run on the
other computer without envi installed.

0
wxfei19 (2)
8/25/2011 12:44:44 AM
On Aug 25, 10:44=A0am, "wxfe...@gmail.com" <wxfe...@gmail.com> wrote:
> On Aug 25, 8:13=A0am, "Jeff N." <jeffnettles4...@gmail.com> wrote:
>
>
>
>
>
> > On Aug 23, 11:26=A0pm, "wxfe...@gmail.com" <wxfe...@gmail.com> wrote:
>
> > > I just write a simple IDL program, while the major code write in IDL
> > > with some function of ENVI to speed up my programing.
>
> > > example:
> > > PRO test_read
> > > =A0 COMPILE_OPT idl2
> > > =A0 file_name =3D DIALOG_PICKFILE(/READ,FILTER=3D'*.*')
> > > =A0 ENVI_OPEN_FILE, file_name, r_fid=3Dr_dem,/NO_REALIZE
> > > =A0 IF (r_dem EQ -1) THEN RETURN
> > > END
>
> > > I hope to release this code running without ENVI, what should I do?
>
> > Are you asking how to read an envi file without envi running (ie,
> > using just idl)? =A0If so that's easy, it's just a matter of the
> > specifics you need to achieve (ie, do you know the dimensions
> > beforehand?). =A0Why don't you explain what you want to do a little
> > better...
>
> yes I want to read an envi file and do some image process(using some
> envi function).
> and I hope the code(released in exe or other format) could run on the
> other computer without envi installed.- Hide quoted text -
>
> - Show quoted text -

Unless something is changed this is not possible. You need to use IDL
functions only (which may or may not be straightforward).

Max
0
maxjpeck (28)
8/25/2011 7:01:09 AM
On 8/24/11 6:44 PM, wxfei19@gmail.com wrote:
> On Aug 25, 8:13 am, "Jeff N."<jeffnettles4...@gmail.com>  wrote:
>> On Aug 23, 11:26 pm, "wxfe...@gmail.com"<wxfe...@gmail.com>  wrote:
>>
>>> I just write a simple IDL program, while the major code write in IDL
>>> with some function of ENVI to speed up my programing.
>>
>>> example:
>>> PRO test_read
>>>    COMPILE_OPT idl2
>>>    file_name = DIALOG_PICKFILE(/READ,FILTER='*.*')
>>>    ENVI_OPEN_FILE, file_name, r_fid=r_dem,/NO_REALIZE
>>>    IF (r_dem EQ -1) THEN RETURN
>>> END
>>
>>> I hope to release this code running without ENVI, what should I do?
>>
>> Are you asking how to read an envi file without envi running (ie,
>> using just idl)?  If so that's easy, it's just a matter of the
>> specifics you need to achieve (ie, do you know the dimensions
>> beforehand?).  Why don't you explain what you want to do a little
>> better...
>
> yes I want to read an envi file and do some image process(using some
> envi function).
> and I hope the code(released in exe or other format) could run on the
> other computer without envi installed.

It's possible to do the *equivalent* of what ENVI is doing using IDL 
(ENVI is written in IDL after all), but you have to have ENVI to use 
ENVI functions.

Mike
-- 
Michael Galloy
www.michaelgalloy.com
Modern IDL, A Guide to Learning IDL: http://modernidl.idldev.com
Research Mathematician
Tech-X Corporation

0
mgalloy (665)
8/25/2011 5:24:30 PM
Reply: