idl envi reference guide.pdf

Upload: ashoka-vanjare

Post on 07-Aug-2018

245 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    1/772

    ENVI Version 4.2August, 2005 EditionCopyright © Research Systems, Inc.All Rights Reserved

    ENVI ReferenceGuide

    20REF42DOC

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    2/772

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    3/772

    ENVI Reference Guide

    ContentsChapter 1Overview ................................................................................................ 11How to Use this Reference Section ................................................................................. 12Alphabetic List of ENVI Routines .................................................................................. 18Functional List of Basic ENVI Routines ......................................................................... 33Quick Reference of ENVI Library Function Variable Codes ......................................... 41

    Chapter 2ENVI Routines ....................................................................................... 46ADAPT_FILT_DOIT ...................................................................................................... 47AIRSAR_HEADER_DOIT ............................................................................................. 52AIRSAR_PED_HEIGHT_DOIT .................................................................................... 54AIRSAR_PHASE_IMAGE_DOIT ................................................................................. 57AIRSAR_POLSIG_DOIT ............................................................................................... 60AIRSAR_SCATTER_DOIT ........................................................................................... 63AIRSAR_SYNTH_DOIT ............................................................................................... 67

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    4/772

    4

    Contents ENVI Reference Guide

    ASPECT_DOIT ............................................................................................................... 71AUTO_WID_MNG ......................................................................................................... 74BAD_DATA_DOIT ........................................................................................................ 75CATCH ............................................................................................................................ 78CF_DOIT ......................................................................................................................... 79CLASS_CONFUSION_DOIT ......................................................................................... 82CLASS_CS_DOIT ........................................................................................................... 87CLASS_DOIT .................................................................................................................. 91CLASS_MAJORITY_DOIT ......................................................................................... 102CLASS_RULE_DOIT ................................................................................................... 105CLASS_STATS_DOIT ................................................................................................. 108COM_CLASS_DOIT .................................................................................................... 112CONTINUUM_REMOVE_DOIT ................................................................................. 115

    CONV_DOIT ................................................................................................................. 118CONVERT_DOIT ......................................................................................................... 122CONVERT_INPLACE_DOIT ...................................................................................... 125CROSS_TRACK_CORRECTION_DOIT .................................................................... 128DARK_SUB_DOIT ....................................................................................................... 133DECOR_DOIT .............................................................................................................. 136DEM_BAD_DATA_DOIT ............................................................................................ 139DESKEW_DOIT ........................................................................................................... 142

    DESTRIPE_DOIT ......................................................................................................... 145DISP_GET_LOCATION ............................................................................................... 148DISP_GOTO .................................................................................................................. 150DISP_OUT_IMG ........................................................................................................... 152ELINE_CAL_DOIT ...................................................................................................... 155EMITTANCE_CALC_DOIT ........................................................................................ 158ENVI .............................................................................................................................. 161ENVI_ADD_PROJECTION ......................................................................................... 162ENVI_ASSIGN_HEADER_VALUE ............................................................................ 163ENVI_AUTO_TIE_POINTS_DOIT ............................................................................. 166ENVI_AVHRR_CALIBRATE_DOIT .......................................................................... 176ENVI_AVHRR_GEOMETRY_DOIT .......................................................................... 179ENVI_AVHRR_WARP_DOIT ..................................................................................... 182ENVI_BANDMAX_SELECT_BANDS ....................................................................... 186ENVI_BATCH_EXIT ................................................................................................... 190

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    5/772

    ENVI Reference Guide Contents

    ENVI_BATCH_INIT .................................................................................................... 192ENVI_BATCH_STATUS_WINDOW ......................................................................... 194ENVI_BUFFER_ZONE_DOIT .................................................................................... 197ENVI_CAL_DOIT ........................................................................................................ 200ENVI_CENTER ............................................................................................................ 203ENVI_CLOSE_DISPLAY ............................................................................................ 204ENVI_CLOVER_DOIT ................................................................................................ 205ENVI_COLLECT_SPECTRA ...................................................................................... 208ENVI_COMPUTE_SUN_ANGLES ............................................................................. 211ENVI_CONVERT_FILE_COORDINATES ................................................................ 213ENVI_CONVERT_FILE_MAP_PROJECTION ......................................................... 215ENVI_CONVERT_LIDAR_DATA_DOIT .................................................................. 220ENVI_CONVERT_PROJECTION_COORDINATES ................................................ 225

    ENVI_CREATE_ROI ................................................................................................... 228ENVI_CUBE_3D_DOIT .............................................................................................. 230ENVI_DEFAULT_STRETCH_CREATE .................................................................... 233ENVI_DEFINE_MENU_BUTTON ............................................................................. 236ENVI_DEFINE_ROI .................................................................................................... 244ENVI_DELETE_ROIS ................................................................................................. 247ENVI_DISP_QUERY ................................................................................................... 248ENVI_DISPLAY_BANDS ........................................................................................... 251

    ENVI_DOIT .................................................................................................................. 254ENVI_ENTER_DATA ................................................................................................. 257ENVI_ENVISAT_GEOREF_DOIT ............................................................................. 265ENVI_EVF_CLOSE ..................................................................................................... 269ENVI_EVF_DEFINE_ADD_RECORD ....................................................................... 271ENVI_EVF_DEFINE_CLOSE ..................................................................................... 275ENVI_EVF_DEFINE_INIT .......................................................................................... 279ENVI_EVF_INFO ......................................................................................................... 283ENVI_EVF_OPEN ....................................................................................................... 286ENVI_EVF_READ_RECORD ..................................................................................... 288ENVI_EVF_TO_SHAPEFILE ..................................................................................... 290ENVI_FILE_MNG ........................................................................................................ 292ENVI_FILE_QUERY ................................................................................................... 293ENVI_FILE_TYPE ....................................................................................................... 301ENVI_FILTER_DOIT .................................................................................................. 304

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    6/772

    6

    Contents ENVI Reference Guide

    ENVI_GEOREF_FROM_GLT_DOIT .......................................................................... 307ENVI_GET_CONFIGURATION_VALUES ................................................................ 311ENVI_GET_DATA ....................................................................................................... 312ENVI_GET_DISPLAY_NUMBERS ............................................................................ 315ENVI_GET_FILE_IDS ................................................................................................. 316ENVI_GET_HEADER_VALUE .................................................................................. 317ENVI_GET_IMAGE ..................................................................................................... 321ENVI_GET_MAP_INFO .............................................................................................. 323ENVI_GET_PATH ........................................................................................................ 325ENVI_GET_PROJECTION .......................................................................................... 326ENVI_GET_RGB_TRIPLETS ...................................................................................... 328ENVI_GET_ROI ........................................................................................................... 330ENVI_GET_ROI_DATA .............................................................................................. 332

    ENVI_GET_ROI_DIMS_PTR ...................................................................................... 334ENVI_GET_ROI_IDS ................................................................................................... 335ENVI_GET_ROI_INFORMATION ............................................................................. 337ENVI_GET_SLICE ....................................................................................................... 339ENVI_GET_STATISTICS ............................................................................................ 341ENVI_GET_TILE .......................................................................................................... 344ENVI_GLT_DOIT ......................................................................................................... 346ENVI_GRID_DOIT ....................................................................................................... 349

    ENVI_GS_SHARPEN_DOIT ....................................................................................... 353ENVI_INFO_WID ......................................................................................................... 358ENVI_INIT_TILE ......................................................................................................... 359ENVI_IO_ERROR ........................................................................................................ 361ENVI_L7_CPF .............................................................................................................. 362ENVI_LAYER_STACKING_DOIT ............................................................................. 364ENVI_MAP_INFO_CREATE ...................................................................................... 370ENVI_MASK_APPLY_DOIT ...................................................................................... 375ENVI_NEURAL_NET_DOIT ...................................................................................... 378ENVI_OPEN_DATA_FILE .......................................................................................... 384ENVI_OPEN_FILE ....................................................................................................... 390ENVI_OUTPUT_TO_EXTERNAL_FORMAT ........................................................... 392ENVI_PC_SHARPEN_DOIT ....................................................................................... 395ENVI_PICKFILE .......................................................................................................... 398ENVI_PLOT_DATA ..................................................................................................... 400

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    7/772

    ENVI Reference Guide Contents

    ENVI_PROJ_CREATE ................................................................................................. 403ENVI_QUERY_VERSION .......................................................................................... 407ENVI_RADARSAT_GEOREF_DOIT ......................................................................... 408ENVI_READ_COLS .................................................................................................... 412ENVI_REGISTER_DOIT ............................................................................................. 414ENVI_REPORT_ERROR ............................................................................................. 420ENVI_REPORT_INC ................................................................................................... 422ENVI_REPORT_INIT .................................................................................................. 423ENVI_REPORT_STAT ................................................................................................ 425ENVI_RESAMPLE_SPECTRA ................................................................................... 427ENVI_RESTORE_ROIS ............................................................................................... 429ENVI_ROI_TO_IMAGE_DOIT ................................................................................... 430ENVI_SAVE_ROIS ...................................................................................................... 433

    ENVI_SEAWIFS_GEOMETRY_DOIT ....................................................................... 434ENVI_SEAWIFS_GEOREF_DOIT ............................................................................. 439ENVI_SEGMENT_DOIT ............................................................................................. 444ENVI_SELECT ............................................................................................................. 447ENVI_SENSOR_TYPE ................................................................................................ 452ENVI_SET_INHERITANCE ....................................................................................... 455ENVI_SETUP_HEAD .................................................................................................. 458ENVI_SMACC_DOIT .................................................................................................. 468

    ENVI_SPECTRAL_RESAMPLING_DOIT ................................................................ 474ENVI_STATS_DOIT .................................................................................................... 478ENVI_SUM_DATA_DOIT .......................................................................................... 484ENVI_SYNTHETIC_COLOR_DOIT .......................................................................... 488ENVI_THERMAL_CORRECT_DOIT ........................................................................ 491ENVI_TILE_DONE ...................................................................................................... 494ENVI_TOGGLE_CATCH ............................................................................................ 495ENVI_TRANSLATE_PROJECTION_NAME ............................................................ 496ENVI_TRANSLATE_PROJECTION_UNITS ............................................................ 497ENVI_USER_DEFINED_ANNOTATION .................................................................. 498ENVI_VEG_INDEX_AVAILABLE_INDICES .......................................................... 506ENVI_VEG_INDEX_DOIT ......................................................................................... 509ENVI_WRITE_DBF_FILE ........................................................................................... 512ENVI_WRITE_ENVI_FILE ......................................................................................... 516ENVI_WRITE_FILE_HEADER .................................................................................. 526

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    8/772

    8

    Contents ENVI Reference Guide

    ENVI_WRITE_STATISTICS ....................................................................................... 528FFT_DOIT ..................................................................................................................... 531FFT_INV_DOIT ............................................................................................................ 534GAINOFF_DOIT ........................................................................................................... 538GEN_IMAGE_DOIT ..................................................................................................... 541HANDLE_VALUE ........................................................................................................ 544HIST_EXPORT_DOIT .................................................................................................. 546MAGIC_MEM_CHECK ............................................................................................... 551MATCH_FILTER_DOIT .............................................................................................. 553MATCH_FILTER_MT_DOIT ...................................................................................... 557MATH_DOIT ................................................................................................................ 561MNF_DOIT ................................................................................................................... 564MNF_INV_DOIT .......................................................................................................... 568

    MORPH_DOIT .............................................................................................................. 570MOSAIC_DOIT ............................................................................................................ 574MSSCAL_DOIT ............................................................................................................ 580MUNSELL_DOIT ......................................................................................................... 584MUNSELL_INV_DOIT ................................................................................................ 587NDVI_DOIT .................................................................................................................. 590ON_IOERROR .............................................................................................................. 593PC_ROTATE ................................................................................................................. 594

    PPI_DOIT ...................................................................................................................... 598RADAR_INC_ANGLE_DOIT ...................................................................................... 601RATIO_DOIT ................................................................................................................ 604RESIZE_DOIT .............................................................................................................. 607RGB_GET_BANDS ...................................................................................................... 610RGB_ITRANS_DOIT ................................................................................................... 612RGB_TRANS_DOIT ..................................................................................................... 615ROC_CURVE_DOIT .................................................................................................... 618ROI_THRESH_DOIT .................................................................................................... 622ROTATE_DOIT ............................................................................................................ 625RTV_DOIT .................................................................................................................... 628SAT_STRETCH_DOIT ................................................................................................. 631SHARPEN_DOIT .......................................................................................................... 634SIRC_HEADER_DOIT ................................................................................................. 638SIRC_MULTILOOK_DOIT ......................................................................................... 641

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    9/772

    ENVI Reference Guide Contents

    SIRC_PED_HEIGHT_DOIT ........................................................................................ 645SIRC_PHASE_IMAGE_DOIT ..................................................................................... 649SIRC_POLSIG_DOIT ................................................................................................... 653SIRC_SYNTH_DOIT ................................................................................................... 657SLICE_DOIT ................................................................................................................ 662SLT2GND_DOIT .......................................................................................................... 664SPECTRAL_FEATURE_DOIT ................................................................................... 668STRETCH_DOIT .......................................................................................................... 672TASCAP_DOIT ............................................................................................................ 676TEXTURE_COOCCUR_DOIT .................................................................................... 679TEXTURE_STATS_DOIT ........................................................................................... 683TIMS_CAL_DOIT ........................................................................................................ 687TMCAL_DOIT ............................................................................................................. 690

    TOPO_DOIT ................................................................................................................. 694TOPO_FEATURE_DOIT ............................................................................................. 698UNMIX_DOIT .............................................................................................................. 703VAX_IEEE_DOIT ........................................................................................................ 707WIDGET_AUTO_BASE .............................................................................................. 709WIDGET_BASE ........................................................................................................... 711WIDGET_CONTROL .................................................................................................. 716WIDGET_EDIT ............................................................................................................ 722

    WIDGET_GEO ............................................................................................................. 726WIDGET_MAP ............................................................................................................. 728WIDGET_MENU ......................................................................................................... 730WIDGET_MULTI ......................................................................................................... 733WIDGET_OUTF ........................................................................................................... 736WIDGET_OUTFM ....................................................................................................... 738WIDGET_PARAM ....................................................................................................... 740WIDGET_PMENU ....................................................................................................... 744WIDGET_RGB ............................................................................................................. 746WIDGET_SLABEL ...................................................................................................... 748WIDGET_SLIST ........................................................................................................... 750WIDGET_SSLIDER ..................................................................................................... 753WIDGET_STRING ....................................................................................................... 757

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    10/772

    10

    Contents ENVI Reference Guide

    WIDGET_SUBSET ....................................................................................................... 759WIDGET_TOGGLE ...................................................................................................... 761

    Index .................................................................................................... 763

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    11/772

    ENVI Reference Guide 1

    Chapter 1

    Overview

    This chapter covers the following topics:

    How to Use this Reference Section . . . . . . . 12Alphabetic List of ENVI Routines . . . . . . . 18

    Functional List of Basic ENVI Routines . . 3Quick Reference of ENVI Library FunctionVariable Codes . . . . . . . . . . . . . . . . . . . . . . 41

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    12/772

    12 Chapter 1: Overview

    How to Use this Reference Section ENVI Reference Guide

    How to Use this Reference SectionAll of ENVI’s routines are documented alphabetically in this chapter. A descriptionof each routine follows its name. Beneath the general description of the routine are anumber of sections that describe the syntax for the routine, its arguments (if any), itskeywords (if any), and an example of using the routine. These sections are describedbelow.

    Syntax

    The “Syntax” section shows the proper syntax for calling the function or procedure.The following table lists the elements used in ENVI and IDL syntax listings:

    Element Description

    [ ] (Square brackets) Indicates that the contents are optional. Do not include thebrackets in your call.

    [ ] (Italicized squarebrackets)

    Indicates that the square brackets are part of the statement(used to define an array).

    Argument Arguments are shown in italics, and must be specified inthe order listed.

    KEYWORD Keywords are all caps, and can be specified in any order.

    For functions, all arguments and keywords must becontained within parentheses.

    /KEYWORD Indicates a boolean keyword.

    Italics Indicates arguments, expressions, or statements for whichyou must provide values.

    { } (Braces) • Indicates that you must choose one of the values theycontain

    • Encloses a list of possible values, separated by vertical

    lines ( | )• Encloses useful information about a keyword

    • Defines an IDL structure (this is the only case in whichthe braces are included in the call).

    Table 1-1: Elements of ENVI and IDL Syntax

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    13/772

    Chapter 1: Overview 1

    ENVI Reference Guide How to Use this Reference Section

    Elements of Syntax

    Square Brackets ( [] )

    • Content between square brackets is optional. Pay close attention to thegrouping of square brackets. Consider the following examples:

    ROUTINE_NAME, Value1 [, Value2 ] [, Value3 ]: You must include Value1 .You do not have to include Value2 or Value3 . Value2 and Value3 can bespecified independently.

    ROUTINE_NAME, Value1 [, Value2 , Value3 ]: You must include Value1 . Youdo not have to include Value2 or Value3 , but you must include both Value2 andValue3 , or neither.

    ROUTINE_NAME [, Value1 [, Value2 ]]: You can specify Value1 withoutspecifying Value2 , but if you specify Value2 , you must also specify Value1 .

    • Do not include square brackets in your statement unless the brackets areitalicized. Consider the following syntax:

    Result = KRIG2D( Z [, X , Y ] [, BOUNDS= [xmin , ymin , xmax , ymax] ] )

    An example of a valid statement is:

    R = KRIG2D( Z, X, Y, BOUNDS=[0,0,1,1] )

    • Note that when [, Value 1, ... , Value n] is listed, you can specify any number ofarguments. When an explicit number is listed, as in [, Value 1, ... , Value 8 ], you

    can specify only as many arguments as are listed.Braces ( {} )

    • For certain keywords, a list of the possible values is provided. This list isenclosed in braces, and the choices are separated by a vertical line ( | ). Do not

    | (Vertical lines) Separates multiple values or keywords.

    [, Value 1, ... , Value n] Indicates that any number of values can be specified.

    [, Value 1, ... , Value 8 ] Indicates the maximum number of values that can bespecified.

    Element Description

    Table 1-1: Elements of ENVI and IDL Syntax (Continued)

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    14/772

    14 Chapter 1: Overview

    How to Use this Reference Section ENVI Reference Guide

    include the braces in your statement. For example, consider the followingsyntax:

    READ_JPEG [, TRUE={1 | 2 | 3 }]

    In this example, you must choose either 1, 2, or 3. An example of a valid

    statement is:READ_JPEG, TRUE=1

    • Braces are used to enclose the allowable range for a keyword value. Unlessotherwise noted, ranges provided are inclusive. Consider the following syntax:

    Result = CVTTOBM( Array [, THRESHOLD= value {0 to 255}] )

    An example of a valid statement is:

    Result = CVTTOBM( A, THRESHOLD=150 )

    • Braces are also used to provide useful information about a keyword. Forexample:

    [, LABEL= n{label every nth gridline}]

    Do not include the braces or their content in your statement.

    • Certain keywords are prefaced by X, Y, or Z. Braces are used for thesekeywords to indicate that you must choose one of the values it contains. Forexample, [{X | Y}RANGE= array ] indicates that you can specify eitherXRANGE= array or YRANGE= array .

    • Note that in ENVI and IDL, braces are used to define structures. Whendefining a structure, you do want to include the braces in your statement.

    Italics

    • Italicized words are arguments, expressions, or statements for which you mustprovide values. The value you provide can be a numerical value, such as 10, anexpression, such as DIST(100), or a named variable. For keywords that expecta string value, the syntax is listed as KEYWORD= string . The value youprovide can be a string, such as 'Hello' (enclosed in single quotation marks), ora variable that holds a string value.

    • The italicized values that must be provided for keywords are listed in the mosthelpful terms possible. For example, [, XSIZE= pixels ] indicates that the XSIZEkeyword expects a value in pixels, while[, ORIENTATION= ccw_degrees_from_horiz ] indicates that you must providea value in degrees, measured counter-clockwise from horizontal.

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    15/772

    Chapter 1: Overview 1

    ENVI Reference Guide How to Use this Reference Section

    Procedures

    Procedures have the syntax:

    PROCEDURE_NAME,Argument [, Optional_Arguments]

    where PROCEDURE_NAME is the name of the procedure, Argument is a requiredparameter, and Optional_Argument is an optional parameter to the procedure. Notethat the square brackets around optional arguments are not used in the actual call tothe procedure, they are simply used to denote the optional nature of the argumentswithin this document.

    Functions

    Functions have the syntax:

    Result = FUNCTION_NAME( Argument [, Optional_Arguments] )

    where Result is the returned value of the function, FUNCTION_NAME is the nameof the function, Argument is a required parameter, and Optional_Argument is anoptional parameter. Note that the square brackets around optional arguments are notused in the actual call to the function, they are simply used to denote the optionalnature of the arguments within this document. Note also that all arguments andkeyword arguments to functions should be supplied within the parentheses thatfollow the function’s name.

    Functions do not always have to be used in assignment statements (i.e.,A=SIN(10.2) ), they can be used just like any other IDL expression. For example,

    you could print the result of SIN(10.2) by entering the command:PRINT, SIN(10.2)

    Arguments

    The Arguments section describes each valid argument to the routine. Note that thesearguments are positional parameters that must be supplied in the order indicated bythe routine’s syntax.

    Named Variables

    Often, arguments that contain values upon return from the function or procedure(output arguments) are described as accepting named variables. A named variable issimply a valid IDL variable name. This variable does not need to be defined beforebeing used as an output argument. Note, however that when an argument calls for anamed variable, only a named variable can be used—sending an expression causes anerror.

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    16/772

    16 Chapter 1: Overview

    How to Use this Reference Section ENVI Reference Guide

    Keywords

    The Keywords section describes each valid keyword argument to the routine. Notethat keyword arguments are formal parameters that can be supplied in any order.

    Keyword arguments are supplied to ENVI routines by including the keyword name

    followed by an equal sign (“=”) and the value to which the keyword should be set.For example, to set the filename to ENVI_SETUP_HEAD set the FNAME keywordto a string containing the desired filename.

    ENVI_SETUP_HEAD, FNAME=’test.img’

    Note that keywords can be abbreviated to their shortest unique length. However, thisis not recommended, since the addition of a keyword may make the abbreviationinvalid.

    Setting Keywords

    When the documentation for a keyword says something similar to, “Set this keywordto enable logarithmic plotting,” the keyword is simply a switch that turns an optionon and off. Usually, setting such keywords equal to 1 causes the option to be turnedon. Explicitly setting the keyword to zero (or not including the keyword) turns theoption off.

    There is a shortcut that can be used to set a keyword equal to 1 without the usualsyntax (i.e., KEYWORD=1). To “set” a keyword, simply preface it with a slashcharacter (“/”). For example, set the OPEN keyword to ENVI_SETUP_HEAD asfollows:

    ENVI_SETUP_HEAD, FNAME=FNAME, /OPEN

    Named Variables

    Often, keywords that contain values upon return from the function or procedure(output arguments) are described as accepting “named variables. A named variable isa valid IDL variable name. This variable does not need to be defined before beingused with the keyword. Note, however that when a keyword calls for a namedvariable, only a named variable can be used—sending an expression causes an error.

    For example, the WIDGET_CONTROL procedure can return the user values ofwidgets in a named variable using the GET_UVALUE keyword. To return the uservalue for a widget ID (contained in the variable MYWIDGET) in the variableUSERVAL, you would use the command:

    WIDGET_CONTROL, mywidget, GET_UVALUE = userval

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    17/772

    Chapter 1: Overview 1

    ENVI Reference Guide How to Use this Reference Section

    Upon return from the procedure, USERVAL contains the user value. Note thatUSERVAL did not have to be defined before the call to WIDGET_CONTROL.

    Examples

    Most routines have an example that demonstrates how the function or procedure isused. These code fragments are designed to serve as examples for your ownprograms.

    See Also

    The names of related routines will be listed in this section.

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    18/772

    18 Chapter 1: Overview

    Alphabetic List of ENVI Routines ENVI Reference Guide

    Alphabetic List of ENVI RoutinesThe following is a list of all routines included in ENVI, listed alphabetically.

    Routine Name DescriptionADAPT_FILT_DOIT Perform Adaptive filtering

    AIRSAR_HEADER_DOIT Read AIRSAR Header

    AIRSAR_PED_HEIGHT_DOIT Calculate pedestal height imagesfrom AIRSAR compressedstoked matrix

    AIRSAR_PHASE_IMAGE_DOIT Calculate phase images fromAIRSAR compressed stokesmatrix

    AIRSAR_POLSIG_DOIT Calculate polarization signaturesfrom AIRSAR compressedstokes matrix

    AIRSAR_SCATTER_DOIT Calculate scatter classificationfor AIRSAR compressed stokesmatrix

    AIRSAR_SYNTH_DOIT Synthesize AIRSAR images

    ASPECT_DOIT Make aspect corrections toLandsat MSS image data

    AUTO_WID_MNG Automatically perform eventhandling for ENVI compoundwidgets

    BAD_DATA_DOIT Remove bad data lines

    CATCH Establish an error handler for the

    current procedureCF_DOIT Create an output file

    CLASS_CONFUSION_DOIT Compute classificationconfusion matrix

    Table 1-2: Alphabetic List of ENVI Routines

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    19/772

    Chapter 1: Overview 1

    ENVI Reference Guide Alphabetic List of ENVI Routines

    CLASS_CS_DOIT CLUMP and SIEVE aclassification image

    CLASS_DOIT Perform supervisedclassification

    CLASS_MAJORITY_DOIT Perform majority or minorityanalysis on a classificationimage

    CLASS_RULE_DOIT Classify Rule Images

    CLASS_STATS_DOIT Calculate class statistics

    COM_CLASS_DOIT Combine Classes

    CONTINUUM_REMOVE_DOIT Perform continuum removal

    CONV_DOIT Perform convolution filtering

    CONVERT_DOIT Convert interleave type (BSQ,BIL, BIP)

    CONVERT_INPLACE_DOIT Convert in place between storagetypes

    CROSS_TRACK_CORRECTION_DOIT Remove variation in the cross-

    track illumination of an imageDARK_SUB_DOIT Perform Dark Subtraction

    DECOR_DOIT Perform Saturation Stretch

    DEM_BAD_DATA_DOIT Correct bad data points in DEMs

    DESKEW_DOIT Deskew MSS

    DESTRIPE_DOIT Destripe image data

    DISP_GET_LOCATION Get x and y pixel locations in adisplay

    DISP_GOTO Move the current pixel in adisplay

    Routine Name Description

    Table 1-2: Alphabetic List of ENVI Routines (Continued)

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    20/772

    20 Chapter 1: Overview

    Alphabetic List of ENVI Routines ENVI Reference Guide

    DISP_OUT_IMG Output to Postscript

    ELINE_CAL_DOIT Perform Empirical LineCalibration

    EMITTANCE_CALC_DOIT Convert emissivity

    ENVI Restore base ENVI Save files forBatch mode.

    ENVI_ADD_PROJECTION Add a projection to ENVI

    ENVI_ASSIGN_HEADER_VALUE Set user defined header values

    ENVI_AUTO_TIE_POINTS_DOIT Automatically calculates tiepoints for two images, makingfully automatic imageregistration possible

    ENVI_AVHRR_CALIBRATE_DOIT Calibrate AVHRR data orcompute AVHRR Sea SurfaceTemperature (SST)

    ENVI_AVHRR_GEOMETRY_DOIT Compute the AVHRR geometry(latitude and longitude), solarzenith angles, and sensor zenith

    angles for each pixelENVI_AVHRR_WARP_DOIT Warp AVHRR data or resulting

    AVHRR data products

    ENVI_BANDMAX_SELECT_BANDS Perform the BandMaxbackground suppressionalgorithm to derive a subset ofsignificant bands using inputtarget and background spectra

    ENVI_BATCH_EXIT Exit ENVI from the non-menu“batch” mode

    ENVI_BATCH_INIT Initialize ENVI in the non-menu“batch” mode

    Routine Name Description

    Table 1-2: Alphabetic List of ENVI Routines (Continued)

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    21/772

    Chapter 1: Overview 2

    ENVI Reference Guide Alphabetic List of ENVI Routines

    ENVI_BATCH_STATUS_WINDOW Enable and disable the ENVIbatch status window

    ENVI_BUFFER_ZONE_DOIT Create a buffer zone image froma classification image

    ENVI_CAL_DOIT Spectrally calibrate images usingFlat Field or IARR

    ENVI_CENTER Return the centering offsets for awidget

    ENVI_CLOSE_DISPLAY Closes an ENVI display group

    ENVI_CLOVER_DOIT Overlay Classes

    ENVI_COLLECT_SPECTRA Perform endmember collection

    ENVI_COMPUTE_SUN_ANGLES Compute sun angles

    ENVI_CONVERT_FILE_COORDINATES Convert between map and pixelcoordinates

    ENVI_CONVERT_FILE_MAP_PROJECTION Convert a file from its currentmap projection to specifiedoutput projection

    ENVI_CONVERT_LIDAR_DATA_DOIT Read in a LAS standardformatted LIDAR data file andconvert it to either an ENVIimage file or an EVF file

    ENVI_CONVERT_PROJECTION_COORDINATES

    Convert map coordinatesbetween projections

    ENVI_CREATE_ROI Create a new ROI

    ENVI_CUBE_3D_DOIT Build a 3D Image Cube

    ENVI_DEFAULT_STRETCH_CREATE Return an ENVI default stretchstructure

    Routine Name Description

    Table 1-2: Alphabetic List of ENVI Routines (Continued)

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    22/772

    22 Chapter 1: Overview

    Alphabetic List of ENVI Routines ENVI Reference Guide

    ENVI_DEFINE_MENU_BUTTON Add buttons to the ENVI menusystem automatically from auser-defined routine in a .pro or

    .sav file within the save_add directory

    ENVI_DEFINE_ROI Add objects to an ROI

    ENVI_DELETE_ROIS Delete ROIs

    ENVI_DISP_QUERY Get display information

    ENVI_DISPLAY_BANDS Display grayscale or RGB imagein a display window

    ENVI_DOIT Interface for all of the ENVIprocessing routines (the _DOITroutines)

    ENVI_ENTER_DATA Enter image data into ENVI

    ENVI_ENVISAT_GEOREF_DOIT Georeference AATSR, ASAR,and MERIS format ENVISATdata

    ENVI_EVF_CLOSE Close an ENVI Vector File

    (EVF)ENVI_EVF_DEFINE_ADD_RECORD Add a record to a new ENVI

    Vector File (EVF)

    ENVI_EVF_DEFINE_CLOSE Close a new ENVI Vector File(EVF)

    ENVI_EVF_DEFINE_INIT Initialize a new ENVI VectorFile (EVF)

    ENVI_EVF_INFO Get general information about anENVI Vector File (EVF)

    ENVI_EVF_OPEN Open an existing ENVI VectorFile (EVF)

    Routine Name Description

    Table 1-2: Alphabetic List of ENVI Routines (Continued)

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    23/772

    Chapter 1: Overview 2

    ENVI Reference Guide Alphabetic List of ENVI Routines

    ENVI_EVF_READ_RECORD Retrieve records from an ENVIVector File (EVF)

    ENVI_EVF_TO_SHAPEFILE Creates output of ENVI vectorfiles (EVF) to ArcView shapefileformats

    ENVI_FILE_MNG Remove and delete ENVI files

    ENVI_FILE_QUERY Get information on ENVI files

    ENVI_FILE_TYPE File type description

    ENVI_FILTER_DOIT FFT Filter Building

    ENVI_GEOREF_FROM_GLT_DOIT Georeference an associatedimage with the GLT file outputfrom GLT_DOIT.

    ENVI_GET_CONFIGURATION_VALUES Get current setting for ENVIconfiguration items

    ENVI_GET_DATA Get spatial image data from a file

    ENVI_GET_DISPLAY_NUMBERS Get a list of display numbers

    ENVI_GET_FILE_IDS Get file ids for all open files

    ENVI_GET_HEADER_VALUE Retrieve user defined values

    ENVI_GET_IMAGE Get spatial image data from adisplay

    ENVI_GET_MAP_INFO Get map information from adisplay

    ENVI_GET_PATH Returns the path where thecurrent version of ENVI isinstalled

    ENVI_GET_PROJECTION Get the projection informationfor the specified file, display, ormap information handle

    Routine Name Description

    Table 1-2: Alphabetic List of ENVI Routines (Continued)

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    24/772

    24 Chapter 1: Overview

    Alphabetic List of ENVI Routines ENVI Reference Guide

    ENVI_GET_RGB_TRIPLETS Get RGB triplets for graphicscolor index

    ENVI_GET_ROI Get ROI addresses

    ENVI_GET_ROI_DATA Get the data associated with anROI

    ENVI_GET_ROI_DIMS_PTR Get DIMS pointer from ROI IDs

    ENVI_GET_ROI_IDS Get ROI IDs

    ENVI_GET_ROI_INFORMATION Get information associated withdefined ROIs.

    ENVI_GET_SLICE Get spectral slice of data from afile

    ENVI_GET_STATISTICS Get values from an ENVIstatistics file

    ENVI_GET_TILE Get tile data

    ENVI_GLT_DOIT Build a Geographic LookupTable (GLT) file from inputgeometry.

    ENVI_GRID_DOIT Convert irregularly griddedpoints to raster image

    ENVI_GS_SHARPEN_DOIT Perform Gram-Schmidt spectralsharpening.

    ENVI_INFO_WID Display text data in widget

    ENVI_INIT_TILE Initialize the tile processing

    ENVI_IO_ERROR Report Input/Output processingerrors

    ENVI_L7_CPF Retrieve Landsat 7 calibrationparameters from an RSI Webserver.

    Routine Name Description

    Table 1-2: Alphabetic List of ENVI Routines (Continued)

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    25/772

    Chapter 1: Overview 2

    ENVI Reference Guide Alphabetic List of ENVI Routines

    ENVI_LAYER_STACKING_DOIT Build a new multiband file fromgeoreferenced images of variouspixel sizes, extents, and

    projectionsENVI_MAP_INFO_CREATE Create map projections

    ENVI_MASK_APPLY_DOIT Apply a mask to a file

    ENVI_NEURAL_NET_DOIT Perform classification using aNeural Net method

    ENVI_OPEN_DATA_FILE Open a data file

    ENVI_OPEN_FILE Open an ENVI file

    ENVI_OUTPUT_TO_EXTERNAL_FORMAT Output image data to externalformats

    ENVI_PC_SHARPEN_DOIT Perform Principal Componentsspectral sharpening.

    ENVI_PICKFILE Pick a filename

    ENVI_PLOT_DATA Create an x,y plot

    ENVI_PROJ_CREATE Create an ENVI projection

    structureENVI_QUERY_VERSION Return the current version of

    ENVI

    ENVI_RADARSAT_GEOREF_DOIT Extracts embedded geolocationpoints from a processedRADARSAT file

    ENVI_READ_COLS Read ASCII column data

    ENVI_REGISTER_DOIT Warps image data

    ENVI_REPORT_ERROR Report error message stringsthrough the standard ENVI errorreporting mechanism.

    Routine Name Description

    Table 1-2: Alphabetic List of ENVI Routines (Continued)

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    26/772

    26 Chapter 1: Overview

    Alphabetic List of ENVI Routines ENVI Reference Guide

    ENVI_REPORT_INC Set the status report increment

    ENVI_REPORT_INIT Initialize the status report

    ENVI_REPORT_STAT Update status report percentcomplete

    ENVI_RESAMPLE_SPECTRA Spectrally resample individualspectra.

    ENVI_RESTORE_ROIS Restore saved ROI files

    ENVI_ROI_TO_IMAGE_DOIT Create a classification imagefrom ROIs

    ENVI_SAVE_ROIS Save ROIs

    ENVI_SEAWIFS_GEOMETRY_DOIT Calculate the geometry for HDFand CEOS format SeaWiFS data

    ENVI_SEAWIFS_GEOREF_DOIT Georeferences HDF and CEOSformat SeaWiFS data

    ENVI_SEGMENT_DOIT Segment a classification imageinto unique spatially contiguous“blobs”

    ENVI_SELECT Select an open ENVI file or bandENVI_SENSOR_TYPE Return sensor type description

    ENVI_SET_INHERITANCE Return the ENVI inheritancestructure

    ENVI_SETUP_HEAD Set and write ENVI headerinformation

    ENVI_SMACC_DOIT Perform sequential maximumangle convex cone (SMACC)processing on an input file

    ENVI_SPECTRAL_RESAMPLING_DOIT Spectrally resample image orspectral library files.

    Routine Name Description

    Table 1-2: Alphabetic List of ENVI Routines (Continued)

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    27/772

    Chapter 1: Overview 2

    ENVI Reference Guide Alphabetic List of ENVI Routines

    ENVI_STATS_DOIT Calculate statistics of a data file

    ENVI_SUM_DATA_DOIT Calculate a number of statisticalparameters on a set of bands

    ENVI_SYNTHETIC_COLOR_DOIT Calculate synthetic color image

    ENVI_THERMAL_CORRECT_DOIT Perform thermal infraredatmospheric compensation.

    ENVI_TILE_DONE Complete tile processing

    ENVI_TOGGLE_CATCH Toggle the ENVI error catchinghandling mechanism on and off

    ENVI_TRANSLATE_PROJECTION_NAME Convert projection names

    ENVI_TRANSLATE_PROJECTION_UNITS Translate projection units

    ENVI_USER_DEFINED_ANNOTATION Create an ENVI annotation fileor append items to an existingannotation file

    ENVI_VEG_INDEX_AVAILABLE_INDICES Determines the number ofvegetation indices that can becalculated on an input data file

    ENVI_VEG_INDEX_DOIT Calculates vegetation indicesfrom a spectral input image

    ENVI_WRITE_DBF_FILE Write a DBF attribute file for anENVI Vector File (EVF)

    ENVI_WRITE_ENVI_FILE Convert an IDL image array toan ENVI image

    ENVI_WRITE_FILE_HEADER Write/re-write an ENVI headerfile to preserve changes to user

    defined header values.ENVI_WRITE_STATISTICS Write an ENVI statistics file

    FFT_DOIT Perform Fast Fourier Transform(FFT) filtering

    Routine Name Description

    Table 1-2: Alphabetic List of ENVI Routines (Continued)

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    28/772

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    29/772

    Chapter 1: Overview 2

    ENVI Reference Guide Alphabetic List of ENVI Routines

    ON_IOERROR Specifies a statement to be jumped to if an Input/Outputerror occurs in the current

    procedurePC_ROTATE Calculate Principal Components

    Rotation

    PPI_DOIT Calculate Pixel Purity Index(PPI)

    RADAR_INC_ANGLE_DOIT Calculate incidence angle imagefrom radar

    RATIO_DOIT Calculate Band Ratios

    RESIZE_DOIT Spatially resize data

    RGB_GET_BANDS Display a dialog for selectingthree bands from the AvailableBands List

    RGB_ITRANS_DOIT Perform inverse color transform

    RGB_TRANS_DOIT Perform forward color transform

    ROC_CURVE_DOIT Compute Receiver OperatingCharacteristic (ROC) curves

    ROI_THRESH_DOIT Threshold ROI (Region ofInterest)

    ROTATE_DOIT Rotate images

    RTV_DOIT Perform raster to vectorconversion

    SAT_STRETCH_DOIT Perform Saturation Stretch

    SHARPEN_DOIT Perform Image Sharpening

    SIRC_HEADER_DOIT Read SIR-C Header

    SIRC_MULTILOOK_DOIT Multilook SIR-C Images

    Routine Name Description

    Table 1-2: Alphabetic List of ENVI Routines (Continued)

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    30/772

    30 Chapter 1: Overview

    Alphabetic List of ENVI Routines ENVI Reference Guide

    SIRC_PED_HEIGHT_DOIT Calculate pedestal height imagesfrom a SIR-C compressed dataproducts file

    SIRC_PHASE_IMAGE_DOIT Calculate phase images from aSIR-C compressed data productsfile

    SIRC_POLSIG_DOIT Calculate polarization signaturesfrom a SIR-C compressed dataproducts file

    SIRC_SYNTH_DOIT Synthesize SIR-C Images

    SLICE_DOIT Extract a spectral slice

    SLT2GND_DOIT Convert slant to ground range

    SPECTRAL_FEATURE_DOIT Perform Spectral Feature Fitting

    STRETCH_DOIT Perform Contrast Stretch ofimage data

    TASCAP_DOIT Create Tasseled Cap vegetationand soil indices

    TEXTURE_COOCCUR_DOIT Calculate Co-occurrence TextureMeasures

    TEXTURE_STATS_DOIT Calculate Occurrence TextureMeasures

    TIMS_CAL_DOIT Calibrate TIMS data to radiance

    TMCAL_DOIT Calibrate Landsat TM data toradiance or reflectance

    TOPO_DOIT Perform Topographic Modeling

    of DEMsTOPO_FEATURE_DOIT Create a topographic feature

    classification image

    Routine Name Description

    Table 1-2: Alphabetic List of ENVI Routines (Continued)

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    31/772

    Chapter 1: Overview 3

    ENVI Reference Guide Alphabetic List of ENVI Routines

    UNMIX_DOIT Perform Linear SpectralUnmixing

    VAX_IEEE_DOIT Perform VAX IEEE FloatingPoint Conversion

    WIDGET_AUTO_BASE Create top level base for auto-managed widgets

    WIDGET_BASE Create a base widget

    WIDGET_CONTROL Realize, manage, and destroywidgets

    WIDGET_EDIT Return the base ID of the edit list

    widgetWIDGET_GEO Return the base ID of the

    latitude/longitude specificationwidget

    WIDGET_MAP Return the base ID of the mapinformation input/edit widget

    WIDGET_MENU Return the base ID of the menuwidget

    WIDGET_MULTI Return the base ID of themultiple list selection widget

    WIDGET_OUTF Return the base ID of the outputfilename selection widget

    WIDGET_OUTFM Return the base ID of the outputfilename or memory selectionwidget

    WIDGET_PARAM Return the base ID of theparameter input widget

    WIDGET_PMENU Return the base ID of thepulldown menu widget

    Routine Name Description

    Table 1-2: Alphabetic List of ENVI Routines (Continued)

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    32/772

    32 Chapter 1: Overview

    Alphabetic List of ENVI Routines ENVI Reference Guide

    NoteAll of the batch processing function examples assume that the core ENVI save files

    have been restored. For more information on restoring the core ENVI save files see“Batch Mode ENVI” in Chapter 3 of the ENVI Programmer’s Guide manual .

    WIDGET_RGB Return the base ID of the colorvalue editing widget

    WIDGET_SLABEL Return the base ID of the displaystring widget

    WIDGET_SLIST Return the base ID of the listwidget

    WIDGET_SSLIDER Return the base ID of the sliderwidget

    WIDGET_STRING Return the base ID of the stringentry widget

    WIDGET_SUBSET Return the base ID of the imagesubset widget

    WIDGET_TOGGLE Return the base ID of the arrowtoggle selection widget

    Routine Name Description

    Table 1-2: Alphabetic List of ENVI Routines (Continued)

    http://progguid.pdf/http://progguid.pdf/http://progguid.pdf/http://progguid.pdf/http://progguid.pdf/

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    33/772

    Chapter 1: Overview 3

    ENVI Reference Guide Functional List of Basic ENVI Routines

    Functional List of Basic ENVI RoutinesThe following is a list of the most commonly used routines included in ENVI,categorized by functionality.

    Batch Mode

    File Input and Management

    Routine Name Usage

    ENVI Restores core ENVI save files when usedwith the RESTORE_BASE_SAVE_FILESkeyword

    ENVI_BATCH_EXIT Exits a batch mode sessionENVI_BATCH_INIT Initiates a batch mode session

    ENVI_BATCH_STATUS_WINDOW Enable and disable the batch statuswindow

    Table 1-3: Batch Mode Routines

    Routine Name Usage

    ENVI_GET_PATH Returns the path where the current versionof ENVI is installed

    ENVI_FILE_MNG Closes and/or deletes files

    ENVI_GET_FILE_IDS Returns all opened file IDs

    ENVI_OPEN_DATA_FILE Opens external (non-ENVI) image filesENVI_OPEN_FILE Opens a file from disk

    ENVI_PICKFILE Widget for selecting a filename from disk

    Table 1-4: File Input and Management Routines

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    34/772

    34 Chapter 1: Overview

    Functional List of Basic ENVI Routines ENVI Reference Guide

    File Information

    File Output

    ENVI_SELECT Widget for choosing an opened file

    Routine Name Usage

    ENVI_FILE_QUERY Returns info from an ENVI header file

    ENVI_FILE_TYPE Translates between file type codes anddescriptions

    ENVI_SENSOR_TYPE Translates between sensor type codes anddescriptions

    ENVI_SET_INHERITANCE Return the ENVI inheritance structure

    Table 1-5: File Information Routines

    Routine Name Usage

    CF_DOIT Creates a new ENVI image from existingFIDs

    ENVI_ENTER_DATA Enters an image into memory as an ENVIfile

    ENVI_OUTPUT_TO_

    EXTERNAL_FORMAT

    Outputs a file to an non-ENVI (external)

    formatENVI_SETUP_HEAD Writes an ENVI header file for an image

    file

    Table 1-6: File Output Routines

    Routine Name Usage

    Table 1-4: File Input and Management Routines (Continued)

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    35/772

    Chapter 1: Overview 3

    ENVI Reference Guide Functional List of Basic ENVI Routines

    Reading Image Data (Non-Tiled)

    ROI Processing

    SLICE_DOIT Outputs a vertical or horizontal data sliceto file

    Routine Name Usage

    ENVI_GET_DATA Returns spatial image data from file

    ENVI_GET_IMAGE Returns stretched data from a displaywindow

    ENVI_GET_SLICE Returns spectral image data from file

    Table 1-7: Reading Image Data (Non-Tiled) Routines

    Routine Name Usage

    ENVI_CREATE_ROI Returns a new ROI ID

    ENVI_DEFINE_ROI Adds pixels to an ROI

    ENVI_DELETE_ROIS Deletes ROI from the ENVI session

    ENVI_GET_ROI Returns ROI pixel addresses as 1-Dsubscripts

    ENVI_GET_ROI_DATA Returns image data associated with an ROI

    ENVI_GET_ROI_DIMS_PTR Returns ROI pointer for use with DIMSvariable

    ENVI_GET_ROI_IDS Returns available ROI Ids

    Table 1-8: ROI Processing Routines

    Routine Name Usage

    Table 1-6: File Output Routines (Continued)

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    36/772

    36 Chapter 1: Overview

    Functional List of Basic ENVI Routines ENVI Reference Guide

    Tiling

    Reporting

    ENVI_RESTORE_ROIS Restores ROIs from file

    ENVI_SAVE_ROIS Saves ROIs to disk

    Routine Name Usage

    ENVI_GET_TILE Returns one spatial or spectral tile of imagedata

    ENVI_INIT_TILE Initiates tiled processing and returns thetile ID

    ENVI_TILE_DONE Ends tiled processing

    Table 1-9: Tiling Routines

    Routine Name Usage

    ENVI_REPORT_INC Computes the status reporting increment

    ENVI_REPORT_INIT Both initializes and ends status reporting

    ENVI_REPORT_STAT Updates the status reporting widget dialog

    Table 1-10: Reporting Routines

    Routine Name Usage

    Table 1-8: ROI Processing Routines (Continued)

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    37/772

    Chapter 1: Overview 3

    ENVI Reference Guide Functional List of Basic ENVI Routines

    Map Information

    Routine Name Usage

    ENVI_AUTO_TIE_POINTS Automatically calculates tie points for twoimages, making fully automatic imageregistration possible

    ENVI_ADD_PROJECTION Adds a new projection to the ENVI session

    ENVI_CONVERT_FILE_COORDINATES

    Converts between file and map coordinates

    ENVI_CONVERT_FILE_MAP_PROJECTION

    Converts a georeferenced file into a newprojection

    ENVI_CONVERT_PROJECTION_COORDINATES

    Converts coordinates between mapprojections

    ENVI_GET_PROJECTION Returns an ENVI_PROJ_STRUCTvariable

    ENVI_MAP_INFO_CREATE Creates a new ENVI_MAP_STRUCTvariable

    ENVI_PROJ_CREATE Builds a projection’sENVI_PROJ_STRUCT

    ENVI_RADARSAT_GEOREF_DOIT

    Extracts embedded geolocation pointsfrom a processed RADARSAT file

    ENVI_TRANSLATE_PROJECTION_NAME

    Translates between projection type codes& names

    ENVI_TRANSLATE_PROJECTION_UNITS

    Translates between projection unit codes &names

    Table 1-11: Map Information Routines

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    38/772

    38 Chapter 1: Overview

    Functional List of Basic ENVI Routines ENVI Reference Guide

    Widgets

    Routine Name Usage

    AUTO_WID_MNG Returns user-inputted info from an ENVIGUI

    ENVI_CENTER Returns centering offsets for widgetpositioning

    ENVI_COLLECT_SPECTRA

    ENVI’s Endmember Collection dialog

    ENVI_DEFINE_MENU_BUTTON Adds buttons to the ENVI menu systemautomatically from a user-defined routinein a .pro or .sav file within thesave_add directory

    ENVI_INFO_WID Displays text in a non-modal ‘report’widget

    ENVI_PICKFILE ENVI’s standard pickfile widget

    ENVI_SELECT ENVI’s standard file selection dialog

    RGB_GET_BANDS ENVI’s Available Bands List dialog

    WIDGET_AUTO_BASE Creates a widget base for auto-managedevents

    WIDGET_EDIT Widget for editing items from a list

    WIDGET_GEO Widget for entering lat/lon data

    WIDGET_MAP Widget for editing map information

    WIDGET_MENU Widget for making radio and checkmarkbuttons

    WIDGET_MULTI Widget for selecting multiple items from alist

    WIDGET_OUTF Widget for saving a file to disk

    Table 1-12: Widget Routines

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    39/772

    Chapter 1: Overview 3

    ENVI Reference Guide Functional List of Basic ENVI Routines

    Image Displays

    WIDGET_OUTFM Widget for saving a file to memory or disk

    WIDGET_PARAM Widget for entering a numeric parameter

    WIDGET_PMENU Widget for making a pull-down menu

    WIDGET_RGB Widget for editing color values

    WIDGET_SLABEL Widget with scroll bars for displaying text

    WIDGET_SLIST Widget for creating items in a list

    WIDGET_SSLIDER Widget for defining a value with a slider

    WIDGET_STRING Widget for entering a string

    WIDGET_SUBSET ENVI’s standard Spatial Subset widgetsWIDGET_TOGGLE Creates an ENVI toggle button

    Routine Name Usage

    DISP_GET_LOCATION Returns the position of the selected pixel

    DISP_GOTO Moves the cursor to a specified location

    ENVI_CLOSE_DISPLAY Closes an ENVI display group

    ENVI_DISP_QUERY Returns display information

    ENVI_DISPLAY_BANDS Creates an ENVI Image Display Group

    ENVI_GET_DISPLAY_NUMBERS Returns all available ENVI display

    numbersENVI_GET_IMAGE Returns stretched data from a display

    window

    Table 1-13: Image Display Routines

    Routine Name Usage

    Table 1-12: Widget Routines (Continued)

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    40/772

    40 Chapter 1: Overview

    Functional List of Basic ENVI Routines ENVI Reference Guide

    Vector Processing

    Routine Name Usage

    ENVI_EVF_CLOSE Closes an EVF file

    ENVI_EVF_DEFINE_ADD_RECORD

    Adds records to an EVF file

    ENVI_EVF_DEFINE_CLOSE Closes an EVF ID for editing

    ENVI_EVF_DEFINE_INIT Creates a new EVF ID

    ENVI_EVF_INFO Returns info about an EVF file

    ENVI_EVF_OPEN Opens an EVF file and returns an EVF ID

    ENVI_EVF_READ_RECORD Reads EVF records into an IDL variable

    ENVI_EVF_TO_SHAPEFILE Creates output of ENVI vector files (EVF)to ArcView shapefile formats

    ENVI_WRITE_DBF_FILE Writes an EVF attribute file in DBF format

    Table 1-14: Vector Processing Routines

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    41/772

    Chapter 1: Overview 4

    ENVI Reference Guide Quick Reference of ENVI Library Function Variable Codes

    Quick Reference of ENVI Library FunctionVariable Codes

    Many of the ENVI library routines use integer values (or codes) to define the state ofvariables, data, or images. These codes are often encountered in routines such asENVI_FILE_QUERY, ENVI_SETUP_HEAD, ENVI_INIT_TILE, andENVI_PROJ_CREATE, although their definitions are the same in all library routines.The following tables provides a quick reference of the codes for many of the mostcommonly used variables, including the projection type code and data required fordefining a new projection in batch mode.

    Data Type

    Type Code Definition

    1 byte

    2 short integer (2 bytes)

    3 long integer (4 bytes)

    4 floating point

    5 double precision floating point6 complex floating point

    12 unsigned short integer

    13 unsigned long integer

    14 64-bit signed integer

    15 64-bit unsigned integer

    Table 1-15: Data Type Variable Codes

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    42/772

    42 Chapter 1: Overview

    Quick Reference of ENVI Library Function Variable Codes ENVI Reference Guide

    Interleave

    Default Stretch

    Byte Swap

    Type Code Definition

    0 BSQ

    1 BIL

    2 BIP

    Table 1-16: Interleave Variable Codes

    Type Code Definition

    0 no stretch

    1 percent linear

    2 linear range

    3 gaussian

    4 equalize5 square foot

    Table 1-17: Default Stretch Variable Codes

    Type Code Definition0 data file is same byte order as the current processor

    1 data file is different byte order than the currentprocessor

    Table 1-18: Byte Swap Variable Codes

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    43/772

    Chapter 1: Overview 4

    ENVI Reference Guide Quick Reference of ENVI Library Function Variable Codes

    Projection Units

    Projection Type

    Type Code Definition

    0 meters

    1 km

    2 feet

    3 yards

    4 miles

    5 nautical miles

    6 degrees

    7 minutes

    8 seconds

    9 radians

    10 acres

    11 hectares

    others Use ENVI_TRANSLATE_PROJECTION_UNITS

    Table 1-19: Projection Units Variable Codes

    Type Code Definition

    0 Arbitrary [no parameters required]

    1 Geographic lat/lon [no parameters required]

    2 UTM [zone number]

    3 Transverse Mercator [a, b, lat0, lon0, x0, y0, k0,]

    Table 1-20: Projection Types Variable Codes

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    44/772

    44 Chapter 1: Overview

    Quick Reference of ENVI Library Function Variable Codes ENVI Reference Guide

    4 Lambert Conformal Conic [a, b, lat0, lon0, x0, y0,sp1, sp2]

    5 Hotine Oblique Mercator A [a, b, lat0, lat1, lon1,lat2, lon2, x0, y0, k0]

    6 Hotine Oblique Mercator B [a, b, lat0, lon0,azimuth, x0, y0, k0]

    7 Stereographic (ellipsoid) [a, b, lat0, lon0, x0, y0, k0]

    8 State Plane [zone number]

    9 Albers Conical Equal Area [a, b, lat0, lon0, x0, y0,sp1, sp2]

    10 Polyconic [a, b, lat0, lon0, x0, y0]

    11 Lambert Azimuthal Equal Area [a, b, lat0, lon0, x0,y0]

    12 Azimuthal Equidistant [r, lat0, lon0, x0, y0]

    13 Gnomonic [r, lat0, lon0, x0, y0,]

    14 Orthographic [r, lat0, lon0, x0, y0]

    15 General Vertical Nearside Perspective [r, lat0, lon0,x0, y0, height]

    16 Sinusoidal [r, lon0, x0, y0]

    17 Equirectangular [r, lat0, lon0, x0, y0]

    18 Miller Cylindrical [r, lon0, x0, y0]

    19 Van der Griten [r, lat0, lon0, x0, y0]

    20 Mercator [a, b, lat0, lon0, x0, y0]

    21 Robinson [r, lon0, x0, y0]

    22 Space Oblique Mercator A [a, b, sat num, path num,path flag, x0, y0]

    23 Alaska Conformal [a, b, x0, y0]

    Type Code Definition

    Table 1-20: Projection Types Variable Codes (Continued)

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    45/772

    Chapter 1: Overview 4

    ENVI Reference Guide Quick Reference of ENVI Library Function Variable Codes

    24 Interrupted Goode [r]

    25 Mollweide [, lon0, x0, y0]

    26 Interrupted Mollweide [r]

    27 Hammer [r, lon0, x0, y0]

    28 Wagner IV [r, lon0, x0, y0]

    29 Wagner VII [r, lon0, x0, y0]

    30 Oblated Equal Area [r, lat0, lon0, x0, y0, shapem,shapen, angle]

    31 Polar Stereographic [a, b, lat0, lon0, x0, y0]

    32 Space Oblique Mercator B [a, b, sat num, path num,x0, y0]

    33 Equidistant Conic A [a, b, lat0, lon0, x0, y0, sp1]

    34 Equidistant Conic B [a, b, lat0, lon0, x0, y0, sp1,sp2]

    35 Stereographic (sphere) [r, lat0, lon0, x0, y0]

    36 Lambert Azimuthal Equal Area (sphere) [r, lat0,

    lon0, x0, y0]

    37 Space Oblique Mercator A [a, b, IncAng, AscLong,x0, y0, PsRev, LRat

    38 Integerized Sinusoidal [r, lon0,x0, y0,Dzone,Djustify

    99 User Defined [a, b, lat0, lon0, x0, y0, [additionalparameters] ]

    Type Code Definition

    Table 1-20: Projection Types Variable Codes (Continued)

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    46/772

    ENVI Reference Guide 4

    Chapter 2

    ENVI Routines

    This chapter describes the ENVI routines, in alphabetical order.

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    47/772

    Chapter 2: ENVI Routines 4

    ENVI Reference Guide ADAPT_FILT_DOIT

    ADAPT_FILT_DOITUse this program to perform adaptive filtering including Lee filter, localized sigmafilter and bit error removal.

    SyntaxENVI_DOIT, ‘ADAPT_FILT_DOIT’

    Keywords

    ADD_MEAN

    Use this keyword to specify a variable that will contain the additive noise mean.

    ADD_MEAN is a floating point number. This value is only used for the LEE filter,METHOD 0, and NOISE_TYPE 2.

    DAMP

    Use this keyword to specify the filter damping factor. DAMP is a floating pointnumber greater than or equal to zero. If DAMP is set to zero the filter performs likean averaging filter. This value is only used for the Frost filter, METHOD 3.

    DIMS

    Use this keyword to specify the spatial dimensions on which to perform theoperation. DIMS is a five-element array of long integers with the followingdefinitions:

    • DIMS[0]: Unused for this function, set to -1.

    • DIMS[1]: The starting X pixel. (The first pixel is number zero.)

    • DIMS[2]: The ending X pixel.

    • DIMS[3]: The starting Y pixel. (The first pixel is number zero.)

    • DIMS[4]: The ending Y pixel.

    FID

    Use this keyword to specify the file ID for the open file. This is the value returnedfrom the keyword R_FID in the ENVI_OPEN_FILE procedure. FID is a long integerwith a value greater than zero. An invalid file ID is specified as -1.

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    48/772

    48 Chapter 2: ENVI Routines

    ADAPT_FILT_DOIT ENVI Reference Guide

    IN_MEMORY

    Set this keyword to specify that output should be stored in memory. If IN_MEMORYis not set, output will be stored on disk.

    KX

    Use this keyword to specify a square kernel size. KX is an integer number greaterthan or equal to three.

    METHOD

    Use this keyword to specify the type of filter. Choose one of the following:

    • 0 - LEE

    • 1 - Bit Error Removal

    • 2 - Localized Sigma

    • 3 - Frost

    • 4 - Gamma

    • 5 - Kuan

    • 6 - Enhanced Lee

    • 7 - Enhanced Frost

    MULT_MEANUse this keyword to specify a variable that will contain the multiplicative noise mean.MULT_MEAN is a floating point number. This value is only used for the LEE filter,METHOD 0 and NOISE_TYPE 1 and 2.

    NLOOK

    Use this keyword to specify a variable that will contain the number of looks for thedata. NLOOK is an integer number. This value is only used for the GAMMA andKUAN filters, METHOD 4 and 5 respectively.

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    49/772

    Chapter 2: ENVI Routines 4

    ENVI Reference Guide ADAPT_FILT_DOIT

    NOISE_TYPE

    Use this keyword to specify a variable that will contain the type of noise to filter. Thetwo types of noise are multiplicative noise and additive noise. NOISE_TYPE is aninteger value ranging from 0 to 2.

    • 0 - Additive noise• 1 - Multiplicative noise

    • 2 - Both additive and multiplicative

    OUT_BNAME

    Use this keyword to specify a string array of output band names, if desired.

    OUT_NAME

    Use this keyword to specify an output file name for the resulting data. If the keywordIN_MEMORY is set, this keyword is not needed.

    POS

    Use this keyword to specify an array of band positions, indicating the band numberson which to perform the operation. POS is an array of long integers, ranging fromzero to the number of bands-1.

    R_FID

    Use this keyword to specify a named variable that will contain the file ID for theprocessed data. This file ID can be used to access the processed data.

    REPLACE

    Set this keyword to 1 to replace bit errors with the local average. Otherwise, set thiskeyword to zero. This keyword is only used for method 1.

    SIGMA

    Use this keyword to specify Sigma for method 0 or the Sigma Factor for methods 1and 2.

    TOL

    Use this keyword to specify the maximum standard deviation tolerance. Thiskeyword is only used for method 1.

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    50/772

    50 Chapter 2: ENVI Routines

    ADAPT_FILT_DOIT ENVI Reference Guide

    VMAX

    Use this keyword to specify the maximum value for valid data. This keyword is onlyused for method 1.

    VMIN

    Use this keyword to specify the minimum value for valid data. This keyword is onlyused for method 1.

    Examplepro example_adapt_filt_doit ;

    ; First restore all the base save files. ;

    envi, /restore_base_save_files ;; Initialize ENVI and send all errors

    ; and warnings to the file batch.txt ; envi_batch_init, log_file=’batch.txt’ ; ; Open the input file ; envi_open_file, ’bonnrsat.img’, r_fid=fid if (fid eq -1) then begin envi_batch_exit return endif ; ; Set the necessary variables ; envi_file_query, fid, ns=ns, nl=nl, nb=nb dims = [-1l, 0, ns-1, 0, nl-1] pos = lindgen(nb) kx = 5 sigma = .5 method = 0

    mult_mean = 1. noise_type = 1 out_name = ’testimg’ ; ; Call the "doit" ; envi_doit, ’adapt_filt_doit’, fid=fid, pos=pos, $ dims=dims, out_name=out_name, kx=kx, sigma=sigma, $

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    51/772

    Chapter 2: ENVI Routines 5

    ENVI Reference Guide ADAPT_FILT_DOIT

    noise_type=noise_type, mult_mean=mult_mean, $ method=method, in_memory=0 ; ; Exit ENVI ; envi_batch_exit

    end

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    52/772

    52 Chapter 2: ENVI Routines

    AIRSAR_HEADER_DOIT ENVI Reference Guide

    AIRSAR_HEADER_DOITUse this function to read the AIRSAR header information used by other AIRSARroutines. The function returns one if the specified file is an AIRSAR file. Otherwise,zero is returned. The desired AIRSAR information is returned using optionalkeywords.

    Syntax

    ENVI_DOIT, ’AIRSAR_HEADER_DOIT’

    Keywords

    BAND (optional)

    Use this keyword to specify a named variable that will contain the band number forthe file specified by Filename. BAND is set to 0, 1, or 2 to specify C, L, or Prespectively.

    FILENAME

    Set this keyword to specify the filename of the AIRSAR file.

    GENFAC (optional)

    Use this optional keyword to specify a named variable that will contain the COMPSCALE FACTOR for the band.

    NAME

    Use this keyword to specify an AIRSAR file name.

    NL (optional)

    Use this optional keyword to specify a named variable that will contain the number oflines in the AIRSAR image.

    NS (optional)

    Use this optional keyword to specify a named variable that will contain the number ofsamples per line in the AIRSAR image.

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    53/772

    Chapter 2: ENVI Routines 5

    ENVI Reference Guide AIRSAR_HEADER_DOIT

    OFFSET (optional)

    Use this optional keyword to specify a named variable that will contain the offset forthe file specified by Filename.

    Examplepro example_airsar_header_doit ;

    ; First restore all the base save files. ; envi, /restore_base_save_files ;

    ; Initialize ENVI and send all errors ; and warnings to the file batch.txt ; envi_batch_init, log_file=’batch.txt’ ; ; Set the keywords ; filename = ’indvc.dat’ ; ; Call the "doit" ; envi_doit, ’airsar_header_doit’, $ filename=filename, ns=ns, nl=nl, $ offset=offset, genfac=genfac, $ band=band

    ; ; Print the result ; print, ’ns = ’, ns print, ’nl = ’, nl print, ’offset = ’, offset print, ’genfac = ’, genfac print, ’band = ’, band ;

    ; Exit ENVI ; envi_batch_exitend

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    54/772

    54 Chapter 2: ENVI Routines

    AIRSAR_PED_HEIGHT_DOIT ENVI Reference Guide

    AIRSAR_PED_HEIGHT_DOITUse this program to calculate pedestal height images from an AIRSAR compressedstokes matrix.

    SyntaxENVI_DOIT, ’AIRSAR_PED_HEIGHT_DOIT’

    Keywords

    DIMS

    Use this keyword to specify the spatial dimensions on which to perform the

    operation. DIMS is a five-element array of long integers with the followingdefinitions:

    • DIMS[0]: Set to -1.

    • DIMS[1]: The starting X pixel. (The first pixel is number zero.)

    • DIMS[2]: The ending X pixel.

    • DIMS[3]: The starting Y pixel. (The first pixel is number zero.)

    • DIMS[4]: The ending Y pixel.

    FNAMEUse this keyword to specify a string array of compressed stokes matrix file names forC, L and/or P wavelengths respectively. If a file is not used, set the array elementto ’’ .

    FNS

    Use this keyword to specify the number of samples per line in the AIRSAR image.

    FNL

    Use this keyword to specify the number of lines in the AIRSAR image.

    GENFAC

    Use this keyword to specify an array of COMP SCALE FACTORS for each of thefiles specified by FNAME.

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    55/772

    Chapter 2: ENVI Routines 5

    ENVI Reference Guide AIRSAR_PED_HEIGHT_DOIT

    IN_MEMORY

    Set this keyword to specify that output should be stored in memory. If IN_MEMORYis not set, output will be stored on disk.

    OUT_BNAME

    Use this keyword to specify a string array of output band names, if desired.

    OUT_NAME

    Use this keyword to specify an output file name for the resulting data. If the keywordIN_MEMORY is set, this keyword is not needed.

    OFFSET

    Use this keyword to specify a long array of header offsets for each of the filesspecified by FNAME.

    R_FID

    Use this keyword to specify a named variable that will contain the file ID for theprocessed data. This file ID can be used to access the processed data.

    Examplepro example_airsar_ped_height_doit

    ;; First restore all the base save files. ; envi, /restore_base_save_files ;

    ; Initialize ENVI and send all errors ; and warnings to the file batch.txt ; envi_batch_init, log_file=’batch.txt’ ; ; Set the keywords ; fname = [’indvc.dat’, $ ’indvl.dat’, $ ’indvp.dat’]

    fns = 1024 fnl = 1224 out_type = 0 out_name = ’testimg’ offset = [30720, 30720, 30720]

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    56/772

    56 Chapter 2: ENVI Routines

    AIRSAR_PED_HEIGHT_DOIT ENVI Reference Guide

    genfac = [18.1776, 6.51427, 1.63261] dims = [-1, 0, fns-1, 0, fnl-1] ; ; Call the "doit" ; envi_doit, ’airsar_ped_height_doit’, $

    fname=fname, offset=offset, $ fns=fns, fnl=fnl, dims=dims, $ out_name=out_name, genfac=genfac, $ r_fid=r_fid ;

    ; Exit ENVI ; envi_batch_exitend

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    57/772

    Chapter 2: ENVI Routines 5

    ENVI Reference Guide AIRSAR_PHASE_IMAGE_DOIT

    AIRSAR_PHASE_IMAGE_DOITUse this program to calculate phase images from an AIRSAR compressed stokesmatrix.

    SyntaxENVI_DOIT, ’AIRSAR_PHASE_IMAGE_DOIT’

    Keywords

    DEGREES

    Set this optional keyword to output the phase images in degrees. Set this keyword to

    zero to output the phase image in radians.DIMS

    Use this keyword to specify the spatial dimensions on which to perform theoperation. DIMS is a five-element array of long integers with the followingdefinitions:

    • DIMS[0]: Set to -1.

    • DIMS[1]: The starting X pixel. (The first pixel is number zero.)

    • DIMS[2]: The ending X pixel.• DIMS[3]: The starting Y pixel. (The first pixel is number zero.)

    • DIMS[4]: The ending Y pixel.

    FNAME

    Use this keyword to specify a string array of compressed stokes matrix file names forC, L or P wavelengths. A phase image will be calculated for each element inFNAME.

    FNSUse this keyword to specify the number of samples per line in the AIRSAR image.

    FNL

    Use this keyword to specify the number of lines in the AIRSAR image.

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    58/772

    58 Chapter 2: ENVI Routines

    AIRSAR_PHASE_IMAGE_DOIT ENVI Reference Guide

    GENFAC

    Use this keyword to specify an array of COMP SCALE FACTORS for each of thefiles specified by FNAME.

    IN_MEMORY

    Set this keyword to specify that output should be stored in memory. If IN_MEMORYis not set, output will be stored on disk.

    OUT_BNAME

    Use this keyword to specify a string array of output band names, if desired.

    OUT_NAME

    Use this keyword to specify an output file name for the resulting data. If the keywordIN_MEMORY is set, this keyword is not needed.

    OFFSET

    Use this keyword to specify a long array of header offsets for each of the filesspecified by FNAME.

    R_FID

    Use this keyword to specify a named variable that will contain the file ID for theprocessed data. This file ID can be used to access the processed data.

    Examplepro example_airsar_phase_image_doit ;

    ; First restore all the base save files. ; envi, /restore_base_save_files ;

    ; Initialize ENVI and send all errors

    ; and warnings to the file batch.txt ; envi_batch_init, log_file=’batch.txt’ ; ; Set the input and output file names ; out_name = ’testimg’ fname = [’indvc.dat’, $ ’indvl.dat’, $

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    59/772

    Chapter 2: ENVI Routines 5

    ENVI Reference Guide AIRSAR_PHASE_IMAGE_DOIT

    ’indvp.dat’];

    ; Set the keywords ; fns = 1024 fnl = 1224

    dims = [-1, 0, fns-1, 0, fnl-1] out_type = 0 offset = [30720, 30720, 30720] genfac = [18.1776, 6.51427, 1.63261] out_bname = [’Phase:indvc.dat’, $ ’Phase:indvl.dat’, $ ’Phase:indvp.dat’] ; ; Call the "doit" ; envi_doit, ’airsar_phase_image_doit’, fname=fname, $ offset=offset, dims=dims, out_name=out_name, $ out_bname=out_bname, /degrees, genfac=genfac,$ in_memory=0, fns=fns, fnl=fnl, r_fid=r_fid ; ; Exit ENVI ; envi_batch_exitend

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    60/772

    60 Chapter 2: ENVI Routines

    AIRSAR_POLSIG_DOIT ENVI Reference Guide

    AIRSAR_POLSIG_DOITUse this program to calculate polarization signatures from an AIRSAR compressedstokes matrix.

    SyntaxENVI_DOIT, ’AIRSAR_POLSIG_DOIT’

    Keywords

    BANDS

    Use this keyword to specify a three-element array of ones and zeros, indicating

    whether the C, L and P wavelengths were used. A value of one indicates thewavelength was used. BANDS must be three elements long, regardless of the size ofFNAME.

    BFNAME

    Use this keyword to specify a three-element string array, where each elementspecifies C, L and P annotations for the header description. BFNAME must be threeelements long regardless of the size of FNAME.

    FNAME

    Use this keyword to specify a string array of compressed stokes matrix file names forC, L and/or P wavelengths, respectively. If a file is not used, set the array elementto ’’ .

    FNS

    Use this keyword to specify the number of samples per line in the AIRSAR image.

    FNL

    Use this keyword to specify the number of lines in the AIRSAR image.

    GENFAC

    Use this keyword to specify an array of COMP SCALE FACTORS for each of thefiles specified by FNAME.

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    61/772

    Chapter 2: ENVI Routines 6

    ENVI Reference Guide AIRSAR_POLSIG_DOIT

    IN_MEMORY

    Set this keyword to specify that output should be stored in memory. If IN_MEMORYis not set, output will be stored on disk.

    OUT_BNAME

    Use this keyword to specify a string array of output band names, if desired.

    OUT_NAME

    Use this keyword to specify an output file name for the resulting data. If the keywordIN_MEMORY is set, this keyword is not needed.

    OFFSET

    Use this keyword to specify a long array of header offsets for each of the filesspecified by FNAME.

    R_FID

    Use this keyword to specify a named variable that will contain the file ID for theprocessed data. This file ID can be used to access the processed data.

    ROI_ID

    Use this keyword to specify an array of ROI IDs returned from a call toENVI_GET_ROI_IDS. Each ID in the array will use the corresponding ROI tocalculate both a co-polarization and cross polarization image.

    Exampleforward_function envi_get_roi_ids

    pro example_airsar_polsig_doit ;

    ; First restore all the base save files. ;

    envi, /restore_base_save_files ;; Initialize ENVI and send all errors

    ; and warnings to the file batch.txt ; envi_batch_init, log_file=’batch.txt’ ; ; Set the keywords

  • 8/20/2019 IDL ENVI Reference Guide.pdf

    62/772

    62 Chapter 2: ENVI Routines

    AIRSAR_POLSIG_DOIT ENVI Reference Guide

    ; fname = [’indvc.dat’, $ ’indvl.dat’, $ ’indvp.dat’]

    fns = 1024 fnl = 1224

    out_type = 0 out_name = ’testimg’ offset = [30720, 30720, 30720] genfac = [18.1776, 6.51427, 1.63261] out_bname = [’CP:indvc.stk’, ’XP:indvc.stk’, $ ’CP:indvl.stk’, ’XP:indvl.stk’, $ ’CP:indvp.stk’, ’XP:indvp.stk’] ; ; Restore the presaved polsig ROI ; envi_restore_rois, ’indv.roi’ roi_id = envi_get_roi_ids(ns=fns, nl=fnl) roi_id = [roi_id, roi_id, roi_id] ; ; Call the "doit" ; envi_doit, ’airsar_polsig_doit’, fname=fname, $ offset=offset, roi_id=roi_id, $ out_name=out_name, out_bname=out_bname, $ genfac=genfac, in_memory=0, fns=fns, $ fnl=fnl, bands=[1,1,1], bfname=fname, $ out_type=ou