|
<< Click to Display Table of Contents >> IDL Scripting Examples - Import Fsar |
![]() ![]()
|
Purpose
This example shows how to create a graphic interface as well as how to import a generic data in order to be used in SARscape.
Technical Note
The use of this functionality foresees the knowledge of the IDL programming language. Please refer to the IDL help for information about the management of widgets used for GUI.
The IDL script must be structured as shown in the example_sarscape_import_fsar_gui.pro example file, this file contains the instruction for the graphic interface (panel) and the call to the read Fsar function. The Fsar import functions are developed in the following .pro: read_fsar.pro and rrat.pro. Before starting the example, the 3 .pro files mentioned have to be opened and compiled (the files are found in the following zip folder: "C:\Program Files\SARMAP SA\SARscape\examples\example_sarscape_import_f-sar.zip"). The content of the IDL example script (example_sarscape_import_fsar_gui.pro) is synthetically described here below:
| 1) | SARscape batch initialization and temporary directory setting |
The SARscape extension file is restored from the original repository folder.
Create panel structure
The main structure of the panes il created.
The banner at the top of the panel is created using a bitmap image.
Example:

| 3) | Catalog reading procedure |
This procedure is necessary in order to read information in the catalog.
Example:
PrimaryTitle = SARscape_SingleLangCatQuery('sars:UI:panel:import_fsar_slc',(FILE_DIRNAME(myResult.PATH) +PATH_SEP()+'example_catalog_eng.cat'))
This string is looking for the 'sars:UI:panel:import_fsar_slc' inside the 'example_catalog_eng.cat'
'example_catalog_eng.cat':
?xml version='1.0' encoding='UTF-8'?>
<IDLffLangCat APPLICATION="envi sarscape ui" VERSION="1.0" AUTHOR="ENVI">
<!-- English - Use ISO 639-3 three-character language Names -->
<LANGUAGE NAME='eng'>
<!-- COMMON NAME -->
<KEY NAME='sars:UI:panel:import_fsar_slc'>IMPORT FSAR SLC</KEY>
<KEY NAME='sars:UI:panel:start'>Start</KEY>
<KEY NAME='sars:UI:panel:cancel'>Cancel</KEY>
<KEY NAME='sars:UI:tab:output_file'>Output File</KEY>
<KEY NAME='sars:UI:tab:input_file'>Input File</KEY>
<KEY NAME='sars:UI:param:input_file'>Input File</KEY>
<KEY NAME='sars:UI:param:parameter_file'>Parameter File</KEY>
<KEY NAME='sars:UI:param:orbit_file'>Orbit File</KEY>
<KEY NAME='sars:UI:param:output_file'>Output File</KEY>
</LANGUAGE>
</IDLffLangCat>
| 4) | Window dimension |
The dimension of the window panel (in pixel) is set.
| 5) | Parameter structure declaration and initialization |
| 6) | Add banner to the panel |
The banner created at step 2 is insert to the panel.
| 7) | Widget inputs/output/start/cancel |
The widgets needed for fields and buttons are created at this step.
| 8) | Save the parameters structure |
In this step, all the elements created in the previous steps are saved.
| 9) | Event handler |
This section of the code handles the events (e.g. insert of data, change of output name or buttons functions)
Pro example_sarmap_import_sar_airborne_fsar_gui_event,event
| 9a) | Set parameters |
| 9b) | Import Fsar function call |
Here the function of the Fsar import is called.
aret= read_fsar(input_data_file,input_par_file,input_orb_file,output_file)
Section Content
Refer to the IDL help documentation.
Input Parameter(s)
Refer to the Technical Note.
General Functions
Refer to the IDL help documentation.
Specific Function(s)
Refer to the IDL help documentation.
References
None.