findcontrast(1)             General Commands Manual            findcontrast(1)



NAME
       findcontrast - Finds contrast settings for converting to bytes

SYNOPSIS
       findcontrastl  [options  input_file  output_file

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 val-
       ues 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 trunca-
       tion of the specified number of pixels, and the black and white con-
       trast settings that would give this amount of truncation.

OPTIONS
       Findcontrast uses the PIP package for input (see the manual page for
       pip) and can still take sequential input interactively.  The follow-
       ing options can be specified either as command line arguments (with the
       -) or one per line in a command file or parameter file (without the -).
       Options can be abbreviated to unique letters; the currently valid
       abbreviations for short names are shown in parentheses.

       -input (-i) OR -InputFile      File name
              Input image file to bin down in 3D

       -slices (-s) OR -SlicesMinAndMax    Two integers
              Starting and ending slices to analyze in Z, numbered from 1.
              The default is to do all slices.

       -xminmax (-x) 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 dimen-
              sion.

       -yminmax (-y) 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 dimen-
              sion.

       -flipyz (-f) OR -FlipYandZ
              Treat coordinates as coming from a volume that was read into
              3dmod with Y and Z sizes flipped with the -Y option.  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.  The program assumes that flipping occurred by rotating
              around the X axis, unless the "-old" option is given.

       -oldflip (-o) OR -OldFlipping
              Flipped coordinates are based on flipping by swapping X and Y
              axes, not by rotating around X.  This flipping occurred prior to
              IMOD 4.6.18.

       -truncate (-t) 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 (-h) OR -usage
              Print help output

       -StandardInput
              Read parameter entries from standard input.

INTERACTIVE INPUTS
       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 sec-
       tion #'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

BUGS
       Email bug reports to mast at colorado dot edu.



IMOD                                 5.0.2                     findcontrast(1)