densmatch(1)                                                      densmatch(1)



NAME
       densmatch - Scale densities in one volume to match those in another

SYNOPSIS
       densmatch  [options]  Reference_file  File_to_scale  [Output_file]

DESCRIPTION
       Densmatch scales the density values in one volume so that its mean and
       standard deviation match that of another volume.  To determine the mean
       and S.D. for each volume, it samples up to 100000 pixels in the central
       eighth of each volume (central half in X, Y, and Z).  It can write the
       scaled values either to a new file or back into the file of the volume
       being scaled.  THE LATTER WILL DESTROY THE ORIGINAL VALUES IN THAT
       FILE.

OPTIONS
       Densmatch uses the PIP package for input (see the manual page for
       pip) and can still take sequential input interactively, but with no
       options.  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 -).  Options can be abbreviated to unique letters;
       the currently valid abbreviations for short names are shown in paren-
       theses.


       -reference (-ref) OR -ReferenceFile      File name
              Input file with reference volume (the one being matched to).
              This file can be entered on the command line as the first non-
              option argument.

       -scaled (-s) OR -ScaledFile    File name
              Input file with volume to be scaled to match.  This file can be
              entered on the command line as the second non-option argument.

       -output (-ou) OR -OutputFile   File name
              Output file for the scaled volume.  This file can be entered on
              the command line as the third non-option argument.  If this file
              is omitted, the program will write the scaled values back to the
              input file.

       -report (-rep) OR -ReportOnly
              Report scaling factors without writing scaled data to file.  The
              program will report two numbers, a factor to multiply by then a
              constant to add; these numbers can be supplied to the -multadd
              option of Newstack.

       -xminmax (-x) OR -XMinAndMax   Two integers
              Starting and ending X coordinates of region to analyze for mean
              and SD in reference volume.  The default is NX/4, 3*NX/4, where
              NX is the size of the reference volume in X.  X, Y, and Z coor-
              dinates are numbered from 0.

       -yminmax (-y) OR -YMinAndMax   Two integers
              Starting and ending Y coordinates of region to analyze in refer-
              ence volume.  The default is NY/4, 3*NY/4, where NY is the size
              of the reference volume in Y.

       -zminmax (-z) OR -ZMinAndMax   Two integers
              Starting and ending Z values of region to analyze in reference
              volume.  The default is NZ/4, 3*NZ/4, where NZ is the number of
              slices in the reference volume.

       -offset (-of) OR -OffsetRefToScaledXYZ   Three integers
              Displacement of the volume being scaled relative to the refer-
              ence volume in X, Y, and Z; namely, the amount to add to a pixel
              coordinate in the reference volume to obtain the coordinate of
              the corresponding pixel in the file being scaled.

       -help (-h) OR -usage
              Print help output

       -StandardInput
              Read parameter entries from standard input.


INTERACTIVE INPUT
       If there are no command-line arguments, Densmatch takes sequential
       input the old way, with the following entries:

       Name of the first volume, the one whose densities are being matched

       Name of the second volume, the one being scaled

       Name of an output file, or a blank line to have the scaled values writ-
       ten back into the second file.

HISTORY
       Written by David Mastronarde, November 1995
       Converted to PIP input, added reporting option, 8/23/04

BUGS
       Email bug reports to mast at colorado dot edu.



BL3DEMC                              4.7.3                        densmatch(1)