comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Como converter uma rotina IDL em ferramenta na extensão .sav para usar no ENVI.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Como converter uma rotina IDL em ferramenta na extensão .sav para usar no ENVI. [message #94209 is a reply to message #94208] Wed, 22 February 2017 14:29 Go to previous message
Jim  Pendleton is currently offline  Jim Pendleton
Messages: 165
Registered: November 2011
Senior Member
On Wednesday, February 22, 2017 at 1:22:06 PM UTC-7, Dick Jackson wrote:
> On Tuesday, 21 February 2017 15:46:41 UTC-8, Clovis Cechim wrote:
>> Olá, tenho algumas rotinas em IDL e preciso converte-las na extensão .sav para usa-las como ferramentas no ENVI. Qual é o procedimento ou programa que posso realizar este procedimento.
>
> Google translates this as:
>
>> Hello, I have some routines in IDL and need to convert them in the .sav extension to use them as tools in ENVI. What is the procedure or program that can perform this procedure.
>
> Hi Clovis, (sorry, I can't reply in Portuguese!)
>
> If your main routine that you want ENVI to call is "MyMainRoutine", then once you have compiled your IDL routines, do this:
>
> IDL> RESOLVE_ALL
> IDL> SAVE, /ROUTINES, FILE='mymainroutine.sav' ; Must be lower-case
>
> Then, copy or move the mymainroutine.sav file to the save_add directory of your ENVI installation.
>
> Some more information is here:
>
> http://www.harrisgeospatial.com/Learn/WhitepapersDetail/TabI d/802/ArtMID/2627/ArticleID/9888/Customizing-ENVI-with-IDL.a spx
>
> I hope this is helpful! (Espero que isto seja útil!)
>
> Cheers,
> -Dick
>
> Dick Jackson Software Consulting Inc.
> Victoria, BC, Canada --- http://www.d-jackson.com

I will add is that if you are calling any ENVI routines from within your .pro code, you will want to use the SKIP_ROUTINES keyword to RESOLVE_ALL otherwise you will end up with duplicate, and potentially conflicting versions of the routines ENVI will otherwise restore from its own SAVE files, especially if you transfer your own SAVE file between different versions of IDL and ENVI.

For example, if your code calls "e = envi(/current) & r = e.openraster('file')" you might use

RESOLVE_ALL, SKIP_ROUTINES = ['envi', 'enviraster', ..., ]

The other side effect of (accidentally) including ENVI is that it can make your SAVE file very, very large due to the number of routines used within ENVI.

The most "modern" way to add your own code to ENVI is through a custom task. In addition to the link that Dick provided, see http://www.harrisgeospatial.com/docs/TutorialCustomTasks.htm l

Jim P.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Segregating data in bimodal distribution
Next Topic: IDL, netCDF-4, VLEN

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:47:26 PDT 2025

Total time taken to generate the page: 0.00488 seconds