Skip to content

Commit

Permalink
Sync with 2024.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
serban-seeq committed Dec 9, 2024
1 parent ab279ac commit d2b661b
Show file tree
Hide file tree
Showing 5 changed files with 133 additions and 112 deletions.
22 changes: 13 additions & 9 deletions examples/impaseg/impaseg.grc
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
//
//-----------------------------------------------------------------------------
RESOURCE,FORM,IMPASEGForm,"Import GDF",-1
FEDIT,,,24,"ASEG-GDF DEFN File",,OLD,,,*.dfn
FEDIT,,,24,"ASEG-GDF Data File",,OLD,,,*.dat
FEDIT,,,24,"ASEG-GDF Description File(optional)",,OLD,,,*.txt;*.des
EDIT,,,24,"Flight Line Channel name",,,"FLTLINE"
FEDIT,,,24,"Template",,OLD,,,*.i4
FEDIT,,,24,"ASEG-GDF Projection File (optional)",,,,,*.prj;*.met
EDIT,,,24,"X Channel to associate with projection"
EDIT,,,24,"Y Channel to associate with projection"
FEDIT,,,24,"ASEG-GDF2 DEFN file",,OLD,,,*.dfn
FEDIT,,,24,"ASEG-GDF2 data file",,OLD,,,*.dat
FEDIT,,,24,"ASEG-GDF2 description file(optional)",,OLD,,,*.txt;*.des
EDIT,,,24,"Flight line channel name",,,"FLTLINE"
FEDIT,,,24,"ASEG-GDF2 template file",,OLD,,,*.i4
FEDIT,,,24,"ASEG-GDF2 projection file (optional)",,,,,*.prj;*.met
EDIT,,,24,"X channel to associate with projection"
EDIT,,,24,"Y channel to associate with projection"
LEDIT,,,24,"Use fiducial channel",R,FORCE,"No",FIDUCIAL
EBUT,&OK,0
EBUT,&Cancel,1,CANCEL
HBUT,&Help,help
Expand All @@ -20,7 +21,10 @@ EBUT,&OK,0
EBUT,&Cancel,-1,CANCEL
HBUT,&Help,help


RESOURCE,HELP,help,nogx.hlp

RESOURCE,LIST,CHAN

RESOURCE,LIST,FIDUCIAL
ITEM,"No" ,"No"
ITEM,"Yes" ,"Yes"
21 changes: 18 additions & 3 deletions examples/impaseg/impaseg.gxc
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ Import ASEG-GDF data.
.PROJ : Input Projection file name (optional)
.XCH : Channel pair to associate with projection
.YCH : Channel pair to associate with projection
.FIDUCIAL : Fiducial selection
"

TRANSLATIONDOMAIN = "core"
TRANSLATIONFRIENDLYPATH = "GX/Database/Import/ASEG-GDF"

// Revision History:
// v2024.2: Allow user to select fiducial.
// v5.1.8: Set current X and Y channels only if these values are defined.
// v5.1.7: Delete line 0, channel loading should be done in script mode, too.
// v5.1.3: Added projection setting if enabled.
Expand Down Expand Up @@ -48,7 +50,8 @@ int i; // Utility
int iLines;
int iChannels;
int iBlobs;
int iErase;
int iErase;
int iFiducial;

string(STR_FILE) sDefn, sFile, sDB;
string(STR_DEFAULT_LONG) sPr;
Expand All @@ -57,6 +60,7 @@ string(STR_FILE) sFLC;
string(STR_FILE) sTemplate;
string(STR_DEFAULT_SHORT) sExt;
string(STR_DB_SYMBOL) sXCh,sYCh;
string(STR_FILE) sFID;

//===========================================================================
// CODE
Expand Down Expand Up @@ -102,7 +106,8 @@ string(STR_DB_SYMBOL) sXCh,sYCh;
GetString_SYS("IMPASEG","TEMPLATE",sFile);
if(!iStrlen_STR(sFile) && iStrlen_STR(sTemplate))
SetString_SYS("IMPASEG","TEMPLATE",sTemplate);

DefaultInt_SYS("IMPASEG", "FIDUCIAL", 0);

// --- Set any Defaults ---

SetInfoSYS_DGW(Diag,_IMPASEGFORM_0,DGW_FILEPATH,"IMPASEG","DEFN");
Expand All @@ -113,6 +118,8 @@ string(STR_DB_SYMBOL) sXCh,sYCh;
SetInfoSYS_DGW(Diag,_IMPASEGFORM_5,DGW_FILEPATH,"IMPASEG","PROJ");
SetInfoSYS_DGW(Diag,_IMPASEGFORM_6,DGW_TEXT,"IMPASEG","XCH");
SetInfoSYS_DGW(Diag,_IMPASEGFORM_7,DGW_TEXT,"IMPASEG","YCH");
SetInfoSYS_DGW(Diag,_IMPASEGFORM_8,DGW_LISTALIAS,"IMPASEG","FIDUCIAL");


// --- Run the Dialogue ---

Expand All @@ -130,6 +137,7 @@ string(STR_DB_SYMBOL) sXCh,sYCh;
GetInfoSYS_DGW(Diag,_IMPASEGFORM_5,DGW_FILEPATH,"IMPASEG","PROJ");
GetInfoSYS_DGW(Diag,_IMPASEGFORM_6,DGW_TEXT,"IMPASEG","XCH");
GetInfoSYS_DGW(Diag,_IMPASEGFORM_7,DGW_TEXT,"IMPASEG","YCH");
GetInfoSYS_DGW(Diag,_IMPASEGFORM_8,DGW_LISTALIAS,"IMPASEG","FIDUCIAL");

// --- Destroy the Dialogue ---

Expand All @@ -149,6 +157,13 @@ string(STR_DB_SYMBOL) sXCh,sYCh;
GetString_SYS("IMPASEG","PROJ",sProj);
GetString_SYS("IMPASEG","XCH", sXCh);
GetString_SYS("IMPASEG","YCH", sYCh);

GetString_SYS("IMPASEG","FIDUCIAL", sFID);

if (iChar_STR(sFID) == iChar_STR("No"))
iFiducial = 0;
else if (iChar_STR(sFID) == iChar_STR("Yes"))
iFiducial = 1;

// --- At least one of Data, Defn or Template file names is necessary ---

Expand Down Expand Up @@ -270,7 +285,7 @@ string(STR_DB_SYMBOL) sXCh,sYCh;

// --- import ---

ImportAsegProj_DU(Data,sTemplate,sDefn,sData,sFLC,64,sProj,sXCh,sYCh);
ImportAsegProj_DU(Data,sTemplate,sDefn,sData,sFLC,64,sProj,sXCh,sYCh,iFiducial);


// --- Set the X and Y channels as current ---
Expand Down
3 changes: 2 additions & 1 deletion include/du.gxh
Original file line number Diff line number Diff line change
Expand Up @@ -2139,7 +2139,8 @@
int, // Number of channels to import at one time
string, // Projection file name
string, // Channel pair to associate projection
string); // Channel pair to associate projection
string, // Channel pair to associate projection
int); // Fiducial selection



Expand Down
Loading

0 comments on commit d2b661b

Please sign in to comment.