BOXIMAGE
By Vinzenz Unger and Anchi Cheng
This program boxes a polygonal area from an input image. The selected area is written out as a new copy of the image without floating, i.e. the image dimensions remain the same and the position of the selected area within the boxed image is unaltered compared to the original. To avoid spikes in the calculated transforms of boxed images, the background is set to the average density around the perimeter of the selected area.
Currently, program dimensions allow up to 17 vertices which are calculated from the (x,y) coordinates of the corners of the polygon. The latter need to be explicitly listed as input parameter. By convention the origin of the image (coordinates (0,0)) is assumed to be the left bottom corner. This setting should not be changed as it makes later calculations more difficult and harder to follow. BOXIMAGE is used to excise the reference area for the cross-correlation and for boxing the best part of the image at the end of each processing cycle. The script for the first pass of unbending (“JOBA”) is set up so that the corner coordinates for the reference area are automatically calculated from the centre coordinates of the autocorrelation and the chosen size of the reference area. The size of the reference should be ~1/10th - 1/20th of the size of the (pixel-averaged where applicable) image. In our experience ~1/10th is the optimal choice for the first pass. Finding a “uniform” area of suitable size can be difficult if the “traditional” approach is followed where the reference for the first pass is boxed from the loosely filtered image. This applies especially for specimen that are less ordered. If the reference was not sufficiently uniform then this will show up in the cross-correlation map. In these cases good correlation is observed only for the region of the reference area. We therefore prefer to generate the reference from a tightly filtered image (as suggested in the explicit protocol) where in our experience this has not yet surfaced.
XIMDISP provides a fast way to identify the best area of the image suitable for boxing at the end of each processing cycle by scrutinizing the cross-correlation map (“cor$image.cor”). For example, if the maximum density in the cross-correlation map was 1000, then displaying the map on a scale from 700.0 to 700.1 will show white pixel for cross-correlation peaks above 70% similarity while all peaks with lower values will appear black. The corner coordinates for an area with at least 70% similarity to the reference can now be obtained by simply clicking on the map positions that together enclose the largest possible part of this area and to write these coordinates into an output file. In most cases, the size of the cross-correlation map will be larger then what can be displayed on the screen. More recent versions of XIMDISP allow compression of the map to a suitable size. Since this only affects the display, the map-coordinates that are written out still refer to the size of the input file. Note, that a scaling factor must still be applied later to adjust them for boxing of the original image if the coordinates were obtained from the cross-correlation map of a pixel-averaged image. For this purpose and to modify the postscript plotfile showing the cross-correlation map we use a “jiffy” program called “PREPBOXPS”. This utility program will write out properly scaled corner coordinates ready to be cut and pasted into the BOXIMAGE script as well as add the borders of the boxed area to the postscript plotfile to give a permanent, graphic record of the selected area. This program and an appropriate script can be obtained from Frankfurt.
Note, boxing of the best area of an image based on the appearance of the cross-correlation map is only possible for the images of crystals up to moderate specimen tilts (~40˚). At higher specimen tilts, the height of the cross-correlation peaks depends primarily on the amount of underfocus in the corresponding part of the image and, hence, it not a good measure to decide if only part of the image should be used to generate the final list of data (see also TTBOX).