LABEL-ADD is used to add one or more label items to an image's history or property label, or to add one or more label elements to a currently existing label item. The items are given as a list in a quoted string, separated by either spaces or commas. Each item must be given in the form "keyword(element) = value-list", where "keyword" is the keyword of the label, "(element)" is the OPTIONAL starting element number, and "value-list" is a single value or a list of values enclosed in parentheses. If a value in "value-list" is a string, it should be contained in single quotes. If the value is an integer, real or double-precision value, it is given as is. If both an input and an output file are given, then the output file label is modified and the data is copied to it. If only an input file is given, then the input label is modified and no output file is created. .page Examples: LABEL-ADD infile outfile "SLOPE = 3, COMMENT='Hello' COORD=(32.5,59.96)" would add the integer keyword SLOPE with a value of 3, the string keyword COMMENT with the value contained in the single quotes, "Hello", and the real keyword COORD with the two values 32.5 and 59.96 to the current task label, the LABEL history subset. The input file is not modified. LABEL-ADD infile outfile "COUNT=2, TARGET='NEPTUNE'" PROPERTY=MYPROP would add the integer keyword COUNT with a value of 2 and the string keyword TARGET with the value "NEPTUNE" to the property label set named "MYPROP" (first instance). The input file is not modified. .page Examples (cont.): LABEL-ADD infile + ITEMS="DN = 255 COMMENT = 'All lines are black' LIST(2)=(37,42)" + TASK=INSERT INSTANCE=2 would add the integer keyword DN with a value of 255, and the string keyword COMMENT with the value 'All lines are black' to the second occurence of the INSERT history subset in the input file. If the keyword LIST existed previously in the label, then elements 2 and 3 would be added, with the values 37 and 42, respectively. The old element 2 would become element 4, i.e. the new elements are inserted into the item. If LIST did not exist previously, it would be created with two elements with values 37 and 42. Since no output file is given, the input file is modified, and no output file is produced.
LABEL-CONCAT is used to concatenate property and/or history label sets from input 1 into input 2. The resultant image has the data and labels of input 2, with selected property sets from label 1 added in. If OUT is specified, a new file is written, otherwise input 2 is modified in-place. The result is similar to LABEL-SWITCH except that history/property labels from input 2 survive the process. Either the entire history and/or property label from input 1, or a single property set or history task, may be transferred. Specifying TASK or PROPERTY will cause a single set to be transferred (in which case TYPE=BOTH is ignored); omitting both TASK and PROPERTY will transfer the entire history and/or property label, controlled by TYPE. In all cases, new history tasks or property sets are created; existing history/property sets in input 2 are not modified. The new label sets are always added after all existing ones; there is no facility to add sets into the middle or the beginning. To simulate adding sets to the beginning, add them in the other order, then use LABEL-SWITCH. (e.g. instead of adding A before B, add B's labels after A, then switch the data back). Examples: LABEL-CONCAT (file_1,file_2) would add all history and property sets from file_1 to the end of the history and property sections of file_2. LABEL-CONCAT (file_1,file_2) property="CAMERA_MODEL" would transfer the CAMERA_MODEL property (instance 1) to file_2. LABEL-CONCAT (file_1,file_2) outfile task="GEN" instance=1 would add history task GEN, instance 1, from file_1 to file_2's labels, writing the result in outfile. file_2 is not modified.
LABEL-CREATE takes a file with no label and, using the information given by the user, generates a system label for it. VICAR in some cases can attempt to determining the image size for you on a VMS machine if you don't specify it, but to avoid potential problems it is recommended that you give the input size with NL, NS, and NB when it is known. The image size cannot be automatically determined on a Unix machine. In addition, if the pixel format is not specified, byte format is assumed. If the file organization is not specified, BSQ (band sequential) is assumed. Unless you specify otherwise via the HOST label, the input file is assumed to be in the data format of the machine you are running on. If this is not the case (i.e. the file was created on a VAX and you are running on a Sun), then you need to specify HOST.
LABEL-DELETE can be used to delete all or part of the history or property label information in a given VICAR image file. The extent of deletion is controlled by the different parameters. For help on the operation of each parameter, type HELP parameter-name from tutor mode. If only an input file is given, the input file label is modified, and no output is produced. If an output file is given, then the input file is not modified and the output file is copied from the input. NOTE: The addition of Property instances is backwards compatible except for LABEL-DELETE. If INSTNCES is not specified, LABEL-DELETE will operate on *all* instances of the given properties (just like it works with history/tasks), rather than just the first property (which would be the backwards-compatible way). Examples: LABEL-DELETE A B The entire history label is deleted from A, and the result is written to B. Only the system and property labels remain. LABEL-DELETE A 'PROPERTY The entire property label is deleted from A. The system and history labels remain. LABEL-DELETE A KEYS=COMMENT Every occurrence of the item COMMENT is deleted from the history label of A, leaving the rest of the label intact. No output file is produced. Examples (cont.) LABEL-DELETE A KEYS=/ALL 'HISTORY Every keyword is deleted from each history task, leaving the history subsets themselves intact. LABEL-DELETE A B TASKS=(GEOMA,LABEL) Deletes every occurence of the history subsets created by the tasks GEOMA and LABEL (including the current task). LABEL-DELETE A B PROPERTY=MAP Deletes the entire MAP property (all instances), including the property header. LABEL-DELETE A B PROPERTY=MAP INSTNCES=1 Deletes the entire MAP property (first instance only), including the property header. Examples (cont.) LABEL-DELETE A B KEYS=(NAH,COMMENT) TASKS=(LABEL,GEOMA) INSTNCES=(1,2) Here let's assume that GEOMA was run on A once, and it wrote the item NAH. LABEL was run on the image twice previously (making the current task instance 3), writing the keyword COMMENT only once. The item NAH will then be deleted from the first (only) instance of GEOMA, and COMMENT will be deleted from the one instance of LABEL in which it is found. LABEL-DELETE A B KEYS=MANYVAL ELEMENT=3 NELEMENT=2 Elements 3 and 4 will be deleted from all occurrences of the item MANYVAL in the history label. If any occurrence of MANYVAL has 2 or less elements, nothing will be changed for that occurrence. If any occurrence of MANYVAL has 3 elements, only the third will be deleted. Examples (cont.) LABEL-DELETE A B KEYS=YOW TASK=FUNSTUF INSTNCES=2 ELEMENT=5 NELEMENT=1 Element 5 will be deleted from the item YOW found in the second instance of the task FUNSTUF. LABEL-DELETE A B KEYS=COORD PROPERTY=MINE ELEMENT=2 NELEMENT=2 Elements 2 and 3 will be deleted from the item COORD found in the property subset MINE. LABEL-DELETE A B KEYS=/ALL ELEMENT=2 NELEMENT=-1 Elements 2 through the end of the item will be deleted for every item in the history label. The result will be that all history label items in the file become single-valued.
LABEL-LIST is used to list out the contents of the label in various formats (specified by EXTENT). Up to 10 input files may be given. No processing is done on any of the files. Multi-valued items are listed enclosed in parentheses and separated by commas.
LABEL-REMOVE can be used to remove the the VICAR label, binary header, binary prefix, or all three (the default) from the input, and write the results with the data in an output file. If the output is a tape, the NOBLOCK keyword may be specified to prevent the tape from being blocked (useful for sending to external sites).
LABEL-REPLACE is used in the same fashion as LABEL-ADD, except 1) The item must already exist, and 2) The item may be in the system label as well as the history and property labels. If TASK is specified, TYPE=HISTORY is assumed and an error occurs if TYPE is different. Likewise, if PROPERTY is specified, TYPE=PROPERTY is assumed. To replace an item in the system label, the keyword SYSTEM must be given, and TASK and PROPERTY may not be specified. Great care should be given to replacing any system items, however, as it may affect how the data is read by the executive. In particular, NS, RECSIZE, BUFSIZE, and LBLSIZE should never be changed. The results would be unpredictable.
LABEL-SWITCH creates an output file containing the following: the history and property labels of the first input file the system label of the second input the data of the second input file INVOCATION: LABEL-SWITCH (A,B) C where A, B, and C are VICAR labeled files.