Boulder Laboratory for 3-Dimensional Electron Microscopy of Cells FINDCONTRAST(1) FINDCONTRAST(1) NAME findcontrast - Finds contrast settings for converting to bytes SYNOPSIS findcontrast DESCRIPTION FINDCONTRAST finds the black and white contrast settings that are used when converting an image file to bytes with newstack or mrcbyte. It computes a histogram of pixel values within a selected volume, which it uses to determine the contrast settings that would truncate the values of a specified, small number of pixels in the volume. The program reports the absolute minimum and maximum pixel values within the selected volume, the minimum and maximum values with truncation of the specified number of pixels, and the black and white contrast settings that would give this amount of truncation. Findcontrast uses the PIP package for input (see the manual page for pip) and can still take sequential input interactively. The following options can be specified either as command line arguments (with the -) or one per line in a command file or parameter file (without the -): -input OR -InputFile File name Input image file to bin down in 3D -slices OR -SlicesMinAndMax Two integers Starting and ending slices to analyze in Z, numbered from 1. The default is to do all slices. -xminmax OR -XMinAndMax Two integers Starting and ending coordinates to analyze in X, numbered from 0. The default is to omit borders equal to 10% of the X dimension. -yminmax OR -YMinAndMax Two integers Starting and ending coordinates to analyze in Y, numbered from 0. The default is to omit borders equal to 10% of the Y dimension. -flipyz OR -FlipYandZ Treat coordinates as coming from a volume that was read into 3dmod with Y and Z flipped. Thus, for a newly created tomogram loaded into 3dmod flipped, you can use this option to enter X, Y, and Z coordinates read out from 3dmod. -truncate OR -TruncateBlackAndWhite Two integers Number of pixels to truncate as black and white in the analyzed volume. The default is one pixel per slice or one pixel per million, whichever is greater. -help OR -usage Print help output -StandardInput Read parameter entries from standard input. If there are no command-line arguments, Findcontrast takes sequential input the old way. The program was originally designed to be used with newly-created tomograms, so coordinates in this case are always entered as they would be observed in a flipped volume, with Y and Z transposed. Inputs to the program are: Name of image file First and last slice to include in the volume to be analyzed. The first slice is numbered 1, so the numbers entered can be the 3dmod section #'s in a flipped volume. Lower and upper X coordinates, and lower and upper Y coordinates, of the volume to analyze, as viewed in a flipped volume. Enter / for the default, which omits a 10% border on each side. Maximum number of pixels to truncate (saturate) at black and at white within the analyzed volume. Enter / for the default, which is one pixel per slice or one pixel per million, whichever is greater. HISTORY Written by David Mastronarde, January 2000