Help for GETLAB

PURPOSE: This PDF will get a requested label item from any part
         of a VICAR label and assign it to a local variable. This local
         variable must be previously defined using the intrinsic command:
 
                     VICAR>LOCAL variable_name variable_type
 
          where variable_type must match ITM_TYPE.

        Note: GETLAB only works on single-valued variables. Multi-valued
        variables are not yet supported.  However, the ELEMENT keyword can
        be used to select one element from a multi-valued keyword.
OPERATION:
          There is one mode of "system label" operation:
                SYSTEM
SYSTEM:   This mode retrieves the label item matching LAB_ITEM in the system
          section of the VICAR label
 
          There are three modes of "history label" operation:
                EARLIEST, LATEST, INSTANCE.
 
EARLIEST: This mode retrieves the earliest history label item matching LAB_ITEM.
LATEST:   This mode retrieves the latest history label item matching LAB_ITEM.
INSTANCE: This mode retrieves a specific instance of a history label item.
          When using the INSTANCE mode, the ITM_TASK and ITM_INST parameters
          must be supplied. ITM_TASK specifies the name of the task to
          be searched for the label item, and ITM_INST specifies which
          instance of ITM_TASK should be searched, since the task ITM_TASK
          may appear multiple times in the history label.
EXAMPLES:
 
The following examples use the label listed below.
        ************  File A ************
                3 dimensional IMAGE file
                File organization is BSQ
                Pixels are in BYTE format
                1 bands
                10 lines per band
                10 samples per line
---- Task: TASK1 -- User: XXX000 -- Mon Jan 0 00:00:00 0000 ----
IVAL=0.0
SINC=1.0
LINC=1.0
BINC=1.0
MODULO=0.0
TEST1='FIRST TEST STRING'
TEST2=123
TEST3=4.56
---- Task: TASK2 -- User: XXX000 -- Mon Jan 1 00:00:00 0000 ----
TEST1='MIDDLE TEST STRING'
---- Task: TASK3 -- User: XXX000 -- Mon Jan 2 00:00:00 0000 ----
TEST1='LAST TEST STRING'
 
In order to retrieve label values, local variables of the appropriate type
must be declared first:
        LOCAL T1 STRING
        LOCAL T2 INT
        LOCAL T3 REAL
 
To receive SYSTEM label information:
GETLAB A FORMAT T1 STRING 'SYSTEM       !'T1' would equal 'BYTE'
GETLAB A NL T2 INT 'SYSTEM              !'T2' would equal '10'
 
To receive lastest HISTORY label information:
GETLAB A TEST1 T1 STRING                !'T1' should equal 'LAST TEST STRING'
GETLAB A TEST2 T2 INT                   !'T2' should equal '123'
GETLAB A TEST3 T3 REAL                  !'T3' should equal '4.56'
 
To receive earliest HISTORY label information:
GETLAB A TEST1 T1 STRING 'EARLIEST      !'T1' should equal 'FIRST TEST STRING'
 
To receive specific HISTORY label information:
GETLAB A TEST1 T1 STRING TASK2 1 'INSTANCE
                                        !'T1' would equal 'MIDDLE TEST STRING'
 
AUTHOR:   C. C. Meisl
COGNIZANT PROGRAMMER:  C. C. Meisl
Unix port: Bob Deen, 4-92
REVISION:  2
REVISION HISTORY:
 
   18 March 97 ...T.Huang... Ported from VAX to UNIX.  This version has
                             an added keyword parameter "PROPERTY" to handle
                             retrieval of property label info.
      June 2008   rgd        Added ELEMENT keyword


PARAMETERS:


INP

Name of file containing label to be accessed

LAB_ITEM

Name of label item to be accessed

ITM_NAME

Name of local variable in which to store value of label item LAB_ITEM

ITM_TYPE

Type of label item to be accessed. ITM_NAME must be of same type

LAB_TYPE

This parameter specifices the type of vicar label to be retrive from.

ITM_TASK

Task name for task specific access of label, i.e INSTANCE access

ITM_INST

Instance number of task for task specific access of label, i.e. INSTANCE access

MODE

Type of label access

ELEMENT

Which element to pick.

See Examples:


Cognizant Programmer: