Level 2 Help for STRETCHF

INP

A standard Vicar input data set


OUT

A standard Vicar output file.


SIZE

  FOUR INTEGERS - A standard Vicar size field specifying starting line,
                  starting sample, number of lines, and number of samples.


SL

 INTEGER - Starting line


SS

 INTEGER - Starting sample


NL

 INTEGER - Number of lines


NS

 INTEGER - Number of samples


DNMIN

 INTEGER -      Specifies the minimum DN value of the input data. 
		The domain of the stretch function is DNMIN to DNMAX.


DNMAX

 INTEGER -	Specifies the maximum DN value of the input data.
		The domain of the stretch function is DNMIN to DNMAX.


LINEAR

 TWO INTEGERS - LINEAR=(min,max) performs the following transform:
		           a = (dnmax-dnmin)/(max-min)
		           DN(out) = a*(DN(in)-min) + dnmin   
                if DN(out) would be less than DNMIN:    DN(out) = DNMIN
                if DN(out) would be greater than DNMAX: DN(out) = DNMAX


CONTOUR

 INTEGER -	Input intensities which are a multiple of n are
		set to the value specified by the DNVALUE parameter.


ALARM

 N INTEGERS -	The input DN values specified are set the value
                specified by the DNVALUE parameter.


GAMMA

 This parameter causes a "gamma" stretch to be performed. The gamma
 stretch is defined by the following formula:
                            /                        \
          DN    = DNRANGE * | (DN  -DN   ) / DNRANGE | ** (1.0/gamma)
            out             |    in   min            |
                            \                        /
    where the user specifies the parameter, gamma.
 
 In all cases, the output DN is rounded to the nearest integer prior to
 output.


TABLE

 N PAIRS REALS - TABLE=(in1,out1,in2,out2,..,inN,outN) will set the
		 input DN values in1,in2,... to the DN values 
                 out1,out2,... and will linearly interpolate between
		 these points to compute the intervening DN values.
		 All DN values outside the range in1 to inN will 
		 remain unchanged unless the parameter BACKGND is 
		 also specified.  In that case, all DN values 
		 outside the range in1 to inN will be set to
                 the BACKGND value. The maximum number of pairs 
		 which may be specified is 100.  The values 
		 in1,in2,...,inN must be specified in increasing 
		 order.  


ITABLE

 N PAIRS INTEGERS - ITABLE=(in1,out1,in2,out2,...,inN,outN) will
		set the input DN values in1,in2,... to the DN values 
                out1,out2,... but will not do any interpolation.
		All DN values not explicitly specified, including
 		those outside the range in1 to inN will remain
 		unchanged unless the BACKGND parameter is also
		specified.  In that case, all DN values not
                explicitly specified, including those outside the
                range in1 to inN, will be set to the BACKGND value.
                The maximum number of pairs which may be specified 
		is 100. 


FUNCTION

 STRING - 	Allows the user to explicitly specify the transfer
		function as a FORTRAN type expression with the
		keyword DN as the independent variable.  This
                is similar to the VICAR program F2. For example,
		FUNCTION="2*DN+3" will multiply each input DN
		value by 2 and add 3.  This will then be the output
                DN value, provided it is in the range DNMIN to DNMAX.
		If it is less than DNMIN it is set to DNMIN or if it
                is greater than DNMAX it is set to DNMAX.


OTHER

 KEYWORD   There are two stretch options that are specified by a keyword.
           These two (COMP and PSTRETCH) options are lumped together here.

   COMP     - Causes intensity levels to be complemented. The actual transform 
              is:          DN(out) = DNMAX+DNMIN-DN(in)

   PSTRETCH - Specifies that a periodic stretch is to be performed.
              The transfer function is:

              DN(out)=AMPL/2*SIN[2*PI*FREQ*DN(in)/(DNMAX-DNMIN)+PHI]+DC

                  where PI = 3.14159
                  and AMPL,FREQ,PHI,DC are parameters which may be specified 
                  seperately by the user and which have the following defaults:
                                  AMPL= DNMAX-DNMIN
                                  FREQ= 1.0
                                  PHI = 0.0
                                  DC  = (DNMAX-DNMIN)/2


POST

 TWO INTEGERS - Specifies that a linear post stretch will be performed
                following the initial stretch. The initial stretch
	        will performed over the range DNMIN to DNMAX.
                Specifying a post stretch of POST=(LVAL,HVAL) will
                then take DN value DNMIN to LVAL and DN value DNMAX
                to HVAL. Actually only one stretch is performed;  
                the composite of the initial and post stretches.
                (Default is that no post-stretch is performed.)


DNVALUE

 INTEGER -      Specifies the DN value to use for the CONTOUR and
		ALARM stretches. The appropriate DN's will be set
		to this DN value.  (Default is DNVALUE=DNMAX)


BACKGND

 INTEGER -      Specifies a DN value to use as background for the
		TABLE and ITABLE stretches.  All DN values outside
		the range specified by TABLE, or all those not
		explicitly specified by ITABLE will be set to this 
		value.  (Default is to leave these DN's unchanged.)


FREQ

 REAL -         Specifies the frequency to be used in the case of
		the PSTRETCH (periodic) stretch.  (Default is
		FREQ=1.0)


AMPL

 REAL -         Specifies the amplitude to be used in the case of
		the PSTRETCH (periodic) stretch.  (Default is
		AMPL=DNMAX-DNMIN)


PHI

 REAL -         Specifies the phase to be used in the case of 
		the PSTRETCH (periodic) stretch.  (Default is
		PHI=0)


DC

 REAL -         Specifies the mean to be used in the case of 
		the PSTRETCH (periodic) stretch.  (Default is
		DC=(DNMAX-DNMIN)/2 )