DATAMANIP commands


PROGRAM NAME

kclipin - Clip Data Values Inside the Specified Range

DESCRIPTION

The Clip Inside operator (kclipin) performs clipping on the Input data object (i) within the range defined by the specified Lower and Upper Cutoff Values (uc, lc). Data values that are GREATER THAN the Lower Cutoff Value (uc), and LESS THAN the Upper Cutoff Value (lc) are are set to the Output Value (fval). All other data remain the same.

The following histogram defines the clipping operation.


                                |<-T->|<-F->|<-T->|
                                |     | :   | .   |
                                |    .:.:.  .:::  |
                                |:. .::::::.::::: |
                                |::::::::::::::::.|
                                ------|-----|------
                           Lower Cutoff     Upper Cutoff
                                   (uc)     (lc)
 
        if value <  Upper Cutoff AND value >  Lower Cutoff   output = fval
        if value >= Upper Cutoff OR  value <= Lower Cutoff   output = input

P "Data Type" 5 The data type of the output object is the same as the input object's data type. Internally, the data is processed using one of the following: unsigned byte, long, unsigned long, double, or double complex. Data will not be cast to a lower type for processing.

Map Data If the input object contains a map, then the operation is performed on the map data. If the input object does not have a map but has value data, then the operation is performed on the value data.

Validity Mask If there is a validity mask associated with the input object, the mask is transferred to the output object. To decrease processing time, the operation will still be performed on those data that have corresponding mask values equal to zero. If the data under the mask is genuinely fInotfP processable, such as NaN or infinity, the user can specify that a value be substituted in place of the original value when it is accessed. The masked data substitution attributes for a data object can be explicitly set and stored using the fISet AttributefP operator, DATAMANIP::ksetdattr.

Explicit Location and Time Data If the input object has time data or location data, it is transferred to the output object.

Failure Modes This program fails if the input object lacks both map data and value data.

Executing Clip Inside runs the program kclip with the -thresh option set to FALSE (-thresh 0).

NOTE: When running kclipin from the command line, the cutoff parameters, uc and lc, are opposite to what would seem logical (uc = lower cutoff and lc = upper cutoff). This is due to the logic in the parent program, kclip.

REQUIRED ARGUMENTS

-i
type: infile
desc: Input file
-o
type: outfile
desc: output file

OPTIONAL ARGUMENTS

-uc
type: double
desc: Lower cutoff value (this is a reverse logic operation)
default: 64
bounds: no range checking
-lc
type: double
desc: Upper cutoff value (this is a reverse logic operation)
default: 128
bounds: no range checking
-fval
type: double
desc: Value assigned to output when data is GREATER THAN uc, AND LESS THAN lc
default: 0
bounds: no range checking

EXAMPLES

SEE ALSO

DATAMANIP::kclipabove, DATAMANIP::kclipbelow, DATAMANIP::kclipout, DATAMANIP::kmegaclip, DATAMANIP::kclip

RESTRICTIONS

REFERENCES

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.