Landmark
Class LmsIni

java.lang.Object
  extended by Landmark.Lmsglb
      extended by Landmark.LmsIni

public class LmsIni
extends Lmsglb

The LmsIni initializes data structures for the Open2Dprot Landmark program.

Edited and refactored by Greg Thornwall, SAIC.

This code was derived and refactored other Open2Dprot Java programs and from GELLAB-II landmark C language files "Version November 9, 1999".

This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The Open2Dprot Mozilla and Legal files are available on http://Open2Dprot.sourceforge.net/.

Version:
$Date: 2005/09/12 21:12:30 $ $Revision: 1.14 $
Author:
P. Lemkin, NCI-Frederick, Frederick, MD, 21702
See Also:
Open2Dprot Home

Field Summary
 
Fields inherited from class Landmark.Lmsglb
acc, accDatabaseFile, accFile, accFormatMode, applicationName, argsV, banner, bannerTitle, baseImageFileNameRsample, baseImageFileNameSample, batchDir, cacheDir, commutativeLMSswitch, CONSOLE_FLAG, cs, data, DATE, dbLM, dbRsample, dbSample, DBUB_FREE_040000, DBUG_APPEND, DBUG_COMPUTE_RADII, DBUG_CONSOLE, DBUG_FREE_010, DBUG_FREE_0100, DBUG_FREE_01000, DBUG_FREE_010000, DBUG_FREE_0100000, DBUG_FREE_01000000, DBUG_FREE_020, DBUG_FREE_0200, DBUG_FREE_02000, DBUG_FREE_020000, DBUG_FREE_0200000, DBUG_FREE_02000000, DBUG_FREE_040, DBUG_FREE_0400, DBUG_FREE_04000, DBUG_FREE_0400000, DBUG_PRINT_AT, DBUG_SWITCH_ANALYSIS, DBUG_SWITCHES, dbugBitName, dBugBits, dbugBitsHelpStr, dbugBitValues, dBugLMnbr, debugSwitch, defaultSwitch, demoFileList, demoSwitch, docFileList, dtdSwitch, editRsampleLMSFlag, fileSeparator, fio, fourSqrtPi, ini, inPixFileRsample, inPixFileSample, inputFormatSwitch, jarFileList, jarLibrFileList, landmarkDatabaseFile, landmarkURL, legalImageFileExtens, lmsFile, lmsFormatMode, makeBkupCopyFlag, needToSaveLMSdataFlag, NEVER, nlmDB, nSwitches, OPTBKGROUND, osName, paramH, pix, pixFileExtn, ppxDir, pra, projDir, projDirSwitch, propertiesFile, propertiesFileSwitch, PUBLISH, rdbmsDir, REVISION, RSAMPLE, rsampleName, rsampleSwitch, SAMPLE, sampleName, sampleSwitch, separateFlickerWindowFlag, simplePixFileRsample, simplePixFileSample, sort, spfFormatMode, ssfCWX1, ssfCWX2, ssfCWY1, ssfCWY2, ssfFileRsample, ssfFileSample, ssfFormatMode, ssfInputEpilogueFileRsample, ssfInputEpilogueFileSample, ssfInputFileRsample, ssfInputFileSample, ssfInputPrefaceFileRsample, ssfInputPrefaceFileSample, startTime, sw, switchOptCBvalue, switchOptData, switchOptValue, timerSwitch, tmpDir, tryToSaveCurLMSflag, updateSwitch, usageSwitch, USE_DEMO_DATA, useAccFileSwitch, useLmsFileSwitch, userDir, useRsampleLMSFlag, util, VERSION, xmlDir
 
Constructor Summary
LmsIni()
          LmsIni() - Constructor
 
Method Summary
static void additionalInit()
          additionalInit() - initialize other parameters now that we have the computing window, image size, bits/pixel, OD calibration, etc.
static int initSwitchOptionsData()
          initSwitchOptionsData() - init the switchOptionsData[0:(3*nData)-1] data is used by the AccReportPopup that in turn may call OptionsPopup.
 boolean postProcessSwitches()
          postProcessSwitches() - post process switches
 void switchAnalysis(java.lang.String[] argv)
          switchAnalysis() - Analyze the command line.
 
Methods inherited from class Landmark.Lmsglb
initGlb, resetGlb, showReportStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LmsIni

public LmsIni()
LmsIni() - Constructor

Method Detail

switchAnalysis

public void switchAnalysis(java.lang.String[] argv)
switchAnalysis() - Analyze the command line. Then set corresponding switches,.. Then check it it is there. Do misc. stuff.

Parameters:
argv - is the list of command line args.

postProcessSwitches

public boolean postProcessSwitches()
postProcessSwitches() - post process switches

Returns:
true if succeed

additionalInit

public static void additionalInit()
additionalInit() - initialize other parameters now that we have the computing window, image size, bits/pixel, OD calibration, etc.


initSwitchOptionsData

public static int initSwitchOptionsData()
initSwitchOptionsData() - init the switchOptionsData[0:(3*nData)-1] data is used by the AccReportPopup that in turn may call OptionsPopup. The following is passed to OptionsPopup() and contains data triples of (optionPrompt, guiBuilderSpec, helpStr) . If the optionPrompt data has a "-", then make a CheckBox, else it is a Label with the optionPrompt data.
 If the guiBuilderSpec has a "#", then it is a file browser.
 If the guiBuilderSpec has a "$", then it is a directory browser.
 If the guiBuilderSpec has a
   "@1Text[min,max,scale,precision],@2Text[min,max,scale,precision],@3...", 
    then it is set of Sliders implemented on the right as Scrollbars
 If the guiBuilderSpec has a "{A|B|C...Z}1,{A|B|C...Z}2,...", 
    then it is set of Choices (i.e., between the {...} 
 If  guiBuilderSpec has a "*1,*2,..." entries in the list, 
    then get that data from the comma separated text area.
 If the user data is not null, then make a TextField with this
 user data on the right else make an empty Label.

 guiBuilderSpec syntax  to specify one or more in the command options
 e.g., 
 1. sliders 
      -t1Threshold:
  guiBuilderSpec is "@1Max SP distance[1,10,1.0,0]]"

 2. popup file browser
      "#Sample image file"
   guiBuilderSpec is "#"

 3. popup directory browser
      "@Project directory" 
   guiBuilderSpec is "@Project directory" 
  or
      -projDir:$Project directory$

 4. choice.
      -abc:{3 | 5 | B}
   guiBuilderSpec is "{3|5|B}1",

Returns:
size of the switch arrays