Rendering Images

Commands used for rendering images are as follows:

BLock
arguments: min,max x pixels (integers)
           min,max y pixels (integers)
Cuts (blocks) the image at the specified locations, such that pixels outside of those bounds are set to 0 (black).

Color Bar
arguments: width (integer)
Constructs a bar of given width in the center of the image, for use in displaying a bar of color (or gray-scale) values. The bar extends from x-position 257-(width/2) to 256+(width/2) and from y-position 129 to 384. If a mixed gray-scale is being used and only the non-color values are to be used in the bar, then only the y-range 145 to 384 should be displayed. The bar is surrounded by a black background, and a portion of that background can be used to construct a black border around the color bar.

CRoss-section options: /c
arguments: coords (x1,y1,x2,y2) (integers)
if option=c:  min, max pixels (integers)
Puts a line on an image between the specified coords, and rewrites the data array with the corresponding surface heights along this line cut. If the /c option is not used, the line will extend across the entire image. If the /c option is used, the line extends only between the min,max pixels specified. Note that the increment used along the cross-section corresponds to the x-axis pixel spacing if the line is closer to horizontal than vertical, otherwise the y-axis pixel spacing is used.

DRift
arguments: xdrift,ydrift,odrift,hdrift,x2drift (reals)
Performs drift correction on the image array using the specified parameters. Pixels locations (i',j') in the ddrift corrected array are related to those location (i,j) in the original array by:
i'-1 = (i-1) + (j-1+odrift)xdrift + (j-1+odrift)2x2drfit + hdrift
j'-1 = (j-1) + (j-1+odrift)ydrift
In addition, the new image is shifted to approximately fall in the center of the 512x512 image frame. The parameters xdrift and x2drfit refer to the linear and quadratic terms in the x-direction, and ydrift refers to the linear term in the y-direction. The parameters odrift and hdrift are rarely used; they refer to origin_drift and hysterisis_drift, which are relevant to correcting pairs of images acquired with subsequent in opposite (e.g. right and left) directions.

GRAy or GREy or TOp (these commands are identical) options: /g /m
arguments: expansion factor (integer)
           shade (0=height->1=local height,2=curv,3=deriv,4=polar,5=d-filt,6=variance) (integer)
if shade=0->1:  average size x,y (#pixels) (integers) 
if shade=2:     average size (#pixels) (integer) 
if shade=3:     average size (#pixels) (integer) 
                viewing vector (x,y,z) (reals)
                power (real)
if shade=4:     average size (#pixels) (integer) 
                correction factor for y calibration (real)
if shade=5:     average size (#pixels) (integer) 
                correction factor for y calibration (real)
                no. filters (integer)
                center position x,y (integers) | repeat no. filter times
                radius (integer)               |
if shade=6:     average size x,y (#pixels) (integers) 
                discriminator level (-1 for no discriminator) (real)
for all values of shade:
           grey-scale cut response (y/n) (character)
if response=n:  window min,max (integers)
Constructs an image from the data array. The data is expanded from its original array size using bilinear interpolation, according to the value of expansion factor. The type of image depends on the value of shade: Option /g constructs the plot using the logarithm of the data values. Option /m uses a "mixed" gray-scale plus color form for the image shading, with the gray-scale image values employed for shade values 16 through 255 and values 0-15 reserved for the default VP color values.

GRId
arguments: wavevector 1 (real)
           phase 1 (real)
           wavevector 2 (real)
           phase 2 (real)
           xshift, yshift (integers)
Puts a grid of points on an image, with locations corresponding to the specified wavevectors and phases. This grid can be shifted using xshift, yshift.

HIsto
arguments: contrast (0=min -> 1=max) (real)
Performs histogram equalization on the grey levels in an image. This procedure constructs a nonlinear relationship between the grey levels and the topographic height, such that the histogram of grey levels is more uniformly filled. For example, for an image containing two terraces at different heights, and with corrugation on each terrace, performing this equalization would result in more of the grey-scale range being devoted to the corrugation on the terrace, and less to the difference between the terrace heights. Some moderate amount of equalization is often useful to produce images with a more viewable grey-scale.

MArk
arguments: coords (x1,y1,x2,y2) (integers)
Puts a line on an image between the specified coords. No changes to the data array are made.

PAste options: /f
arguments: action (1=initialize, 2=paste, 3=transfer) (integer)
if action=2: position (x,y) (integers)
Pastes the image array in and out of a temporary storage array. This command is used for pasting several image together, as well as for other specialized applications. The effect of the command depends on the value of action:

PErspective
arguments: angles (in-plane,tilt down,twist) (reals)
           z magnification (real)
           x offset, y offset, xyscale (reals)
           z perspective (0=none -> 1=max) (real)
Constructs a 3-dimensional prespective view of the image array. The image array is rotated by the specified angles, have a magnification factor applied to the z height, is shifted and scaled by the specified amounts, and has a perspective transformation applied to it.

ReVerse option: /m
Reverse gray-scale range in an image (useful e.g. for displaying diffraction patterns). Use /m option when using mixed gray-scale and color scheme.

ROtate
arguments: angle (real)
           x offset, y offset, xyscale (reals)
Performs a simple rotation, shifting, and expansion of the image.

SPot options: /g /h
arguments: col,row (integers)
if option=/g:   delta x, delta y (spacing of the spots) (integers)
if option=/h:   filename of first spectrum (w/o extension) (string)
                extension (integer)
                number of spectra (integer)
Puts a "cross" spot at a specified location in an image corresponding to the col,row location of the data array. This is generally used to mark the location of a position where a spectrum was recorded. The option /g is used to mark the locations of a grid of positions, and the option /h is used to mark the locations of a sequence of "hot key" type of spectra.

STatistics
arguments: rescale response (y/n) (string)
if rescale response=y: window (min,max) (reals)
Plots the histogram of grey-scale values in an image, and prompts the user to see if rescaling is desired. If so, the specified min and max values are used for the new lower and upper bounds on the grey-scales, and the grey levels in the image are recomputed accordingly. NOTE: the grey levels run from 0 to 255, with the value of 0 being reserved for the unused space around an image (i.e. the actual grey levels in the image are in the range 1 to 255).

STatistics/s
arguments: min, max (integers)
Plots the histogram of grey-scale values in an image, and prompts the user to supply values for summing values on the interval (min,max) of that histogram.

Surface Normal
arguments: col,row (integers)
Computes and outputs the surface normal of a specified col,row of the data array, the marks the image array at the corresponding location.