tiltxcorr(1)                General Commands Manual               tiltxcorr(1)



NAME
       tiltxcorr - to align a tilt series by cross-correlation

SYNOPSIS
       tiltxcorr  [options]  input_file  output_file

DESCRIPTION
       Tiltxcorr uses cross-correlation to find an initial translational
       alignment between successive images of a tilt series.  For a given pair
       of images, it stretches the image with the larger tilt angle perpendic-
       ular to the tilt axis, by an amount equal to the ratio of the cosines
       of the two tilt angles (cosine stretch).  The stretched image is corre-
       lated with the other image, and the position of the peak of the corre-
       lation indicates the relative shift between the images.  There are
       options to use only a subset of the image, to pad the image with a bor-
       der before correlating, and to taper the image intensities down to the
       average level over some boundary region.  The latter feature is partic-
       ularly important for getting reliable correlation peaks.  The program
       also has an option to correlate each image with the sum of already-
       aligned images at lower tilts, a method developed by Christian Renken.
       In addition, the program can be used to track the centers of multiple
       subareas through the tilt series and produce an IMOD model that can be
       used for fiducial alignment.  The program will reduce the size of
       images larger than 1250 pixels in one dimension by binning them down,
       i.e. by averaging the values in square sets of adjacent pixels (2x3, or
       3x3, etc), although reduction with antialias filtering can be specified
       instead.  Images are binned by the smallest factor needed to make them
       1250 or smaller up to a binning of 4, but there is option to set the
       binning directly.

       The program is also useful for cross-correlation alignment of untilted
       images such as serial sections and subframes recorded when acquiring an
       image from a direct electron detection camera.

       Some notes about some of the options:

       FILTERING: Some high pass filtering, using a small value of Sigma1 such
       as 0.03, may be needed to keep the program from being misled by very
       large scale features in the images.  If the images are noisy, some low
       pass filtering with Sigma2 and Radius2 is appropriate (e.g. 0.05 for
       Sigma2, 0.25 for Radius2).  If the images are binned, these values
       specify frequencies in the binned image, so a higher cutoff (less fil-
       tering) might be appropriate.  The filter functions produced by these
       options can be visualized with the program Filterplot; see that man
       page for a full description of their effects.

       SUBAREAS: Trimming some area off the edges of the images may be helpful
       if those areas are particularly out of focus or contain material with
       no useful features in it.  The area to be used for correlation can be
       offset from the center of the image by specifying starting and ending
       coordinates of the region to correlate instead of the amount to trim
       off.  The coordinates should be chosen from the zero-tilt image; the
       program will shift the specified box closer to the center of the image
       at higher tilts so that it will contain approximately the same fea-
       tures.  By default, the transformations will be adjusted to move the
       tilt axis back to the center of the whole image, but there is an option
       to leave the axis at the center of the correlated area instead.  Note
       that global rather than image-to-image transforms are output in this
       case; see below for details.

       PADDING: Padding is customarily done to reduce the contribution to the
       correlation from wrapped around features, which occurs when correlation
       is done with Fourier transforms.  Extensive padding does not help with
       typical biological specimens but may be needed for specimens with peri-
       odic structures, in which case one should pad each edge by half the
       image size.

       TAPERING: In contrast, tapering the images down to a mean intensity at
       their edges is very important.  Tapering over as few as 20 pixels may
       be adequate, but fewer artifacts will appear in the correlation with
       longer tapers (say, 50 to 100 pixels).

       CENTRAL PEAK EXCLUSION: The exclusion of a central peak may be helpful
       when there is fixed noise in the images due to inadequate gain normal-
       ization of CCD camera images.  Because one image is stretched, this
       spurious peak can actually occur anywhere in an elongated region per-
       pendicular to the tilt axis.  As of IMOD 4.6.31, this option has become
       much more reliable and effective, since a peak will be excluded only if
       certain conditions are met.  First, the program tests whether the peak
       center is within 0.3 pixels of the center line of the elongated region,
       whether this peak is narrower than the highest peak outside the exclu-
       sion region in at least one direction, and whether that highest eligi-
       ble peak is sufficiently stronger than the next-highest one.  If these
       tests are passed, the program computes a correlation between unbinned,
       unstretched images with no high-frequency filtering and measures the
       width of first and second peaks.  If the first peak is narrow enough,
       and sufficiently narrower than the second peak, then the highest eligi-
       ble peak position (in the original correlation) is used.

       CUMULATIVE CORRELATION: Tiltxcorr has an option to use a cumulative
       correlation method developed by Christian Renken at the National Center
       for the Visualization of Biological Complexity in Albany, N.Y.  With
       this option, the program will take the image at zero tilt as the first
       reference, and correlate it with the image at the next most negative
       tilt.  It will then add the aligned image to the first reference to
       make the reference for the next tilt.  At each tilt, the reference will
       be the sum of images that have already been aligned.  When the most
       negative tilt angle is reached, the procedure is repeated from the
       zero-tilt view to more positove tilt angles.  (If you specify a range
       of views to correlate that does not pass through zero tilt, then this
       procedure will start at the lowest tilt in the specified range.)  There
       are two options that can be used with this procedure.  By default,
       aligned images are not cosine-stretched before being added into the
       cumulative reference; but the "absstretch" option will add images that
       have been stretched by the inverse of the cosine of the tilt angle into
       the reference.  The "nostretch" option will disable the cosine stretch-
       ing that is used before correlating an image with the reference.

       180-DEGREE TILT SERIES: If the object being viewed is compact rather
       than slab-like and it is tilted close to 90 degrees, then the cosine
       stretching between views is not appropriate.  Use the "nostretch"
       option in this case.  With this option, the program will also not
       attempt to adjust the shifts between images to keep the tilt axis in
       the center, a procedure which fails close to 90 degrees.

       TRACKING PATCHES: In a completely different mode of operation, the pro-
       gram can track the center positions of multiple subareas (patches)
       through the tilt series and produce an IMOD model.  There is no feature
       detection involved here, so the alignment of patches from two succes-
       sive views is averaged over all the image features in the patch.  Patch
       tracking is invoked by entering the -size option to specify the size of
       the patches.  The positions of the patches are specified by entering
       the number of patches in X and Y, or by providing a model with scat-
       tered points indicating the positions of the patch centers.  In the
       latter case, the points may be on any view, but their positions will be
       transferred by cosine stretching to the view nearest to zero tilt, and
       the tracking will start at that view.  Note that patches smaller than
       1250 pixels will be correlated without binning by default, whereas the
       whole image will typically be binned for correlation.  As a result, the
       patch correlations may be noisier and may require either more high-fre-
       quency filtering or explicit binning.  If views are skipped, there will
       be no model points on those views and positions will be tracked between
       the views before and after a skipped view.  If the transforms used for
       preliminary alignment of the input stack are supplied, then the program
       will be able to detect when patches contain blank image area.  It will
       either skip a patch when it has too much blank area (more that 30%), or
       it will taper the image data down to the edge of the blank area to min-
       imize correlation artifacts.  When a patch is skipped on a view, the
       tracking will be resumed on the next view where the patch has usable
       image data, unless more than 5 views have been skipped.

       FINDING WARPING TRANSFORMATIONS: In a variation on patch tracking, the
       program can output the local patch displacements as a set of warping
       transformations that align each section to the previous one.  This fea-
       ture is not for tilt series but for other serial images that need to be
       aligned with warping.  With tilt series patch tracking, the tracking
       area moves through the views to follow a piece of image, whereas when
       finding warp transformations, the tracking area is in the same position
       on every section, either on a regular grid or as defined by a seed
       model.  The format of warping transformations is described in the docu-
       mentation for library libiwarp.

       BOUNDARY CONTOURS: Boundary contours may be used to constrain the
       region being correlated for alignment or the locations tracked by cor-
       relation.  When used with tilt series, contours may be drawn on any
       view but they will be stretched by 1/cosine of the tilt angle to deter-
       mine their position on the zero-tilt view.  When correlating whole
       images to obtain transforms, the boundary contours are used in two
       ways.  First, the minimum rectangular area containing the contours at
       zero tilt is determined; this area is limited by the -border, -xminmax
       and -yminmax options to define the area that will be used for correla-
       tion.  Second, on each view, the contours are contracted from their
       positions at zero tilt by the cosine of the tilt angle, and the area
       outside the contours is masked out by setting it to the image mean.
       The masked image is correlated with an unmasked image at the previous
       tilt.  Multiple contours may be drawn, and they may intersect.  If
       there is only one contour, the image intensity inside the unmasked
       region is tapered down to the mean at the edge over the course of 16
       pixels, equivalent to running Mrctaper on the image.  This tapering
       may help prevent artifacts due to sharp edges, but it is not done if
       there is more than one contour.  If tapering and the inclusion of sepa-
       rated areas are both important, use a single contour with a narrow con-
       nector between them, but take care that the contour does not cross
       itself.

       Boundary contours are used differently when correlating to track the
       centers of patches.  For a tilt series, the program determines the
       fraction of each patch that is within any of the contours (where all
       contours are projected onto the zero tilt view), and then eliminates
       patches whose fractions are less than 0.75.  There is no masking of the
       image regions that fall outside the boundaries in this case.  When
       finding warping transformations, the boundary contour used at a partic-
       ular section is taken from the nearest section with a boundary contour.
       Thus, it is useful to draw boundary contours at multiple sections in
       the stack, whenever the region suitable for tracking changes.  The
       patches are evaluated for inclusion separately on every section, using
       the contours appropriate for that section.

OPTIONS
       Tiltxcorr uses the PIP package for input (see the manual page for
       pip) and can still take sequential input interactively, to maintain
       compatibility with old command files.  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 parentheses.

       -input (-inp) OR -InputFile    File name
              Input file with images to correlate.  If this option is not
              entered, the first non-option argument will be used for this
              input file.

       -piece (-pi) OR -PieceListFile      File name
              Piece list file for reordering the Z values in the stack

       -output (-ou) OR -OutputFile   File name
              Output file for transformations or for patch tracking model.  If
              this option is not entered, the second non-option argument will
              be used for this input file.

       -rotation (-ro) OR -RotationAngle   Floating point
              Angle of rotation of the tilt axis in the images; specifically,
              the angle from the vertical to the tilt axis (counterclockwise
              positive).

       -first (-f) OR -FirstTiltAngle      Floating point
              Tilt angle of first view, in degrees.  Use this option together
              with TiltIncrement.

       -increment (-inc) OR -TiltIncrement      Floating point
              Increment between tilt angles, in degrees.  Use this option
              together with FirstTiltAngle.

       -tiltfile (-ti) OR -TiltFile   File name
              Use this option if tilt angles are in a file, one per line.

       -angles (-ang) OR -TiltAngles       Multiple floats
              Use this option to enter the tilt angles for each view individu-
              ally, in degrees.  (Successive entries accumulate)

       -offset (-of) OR -AngleOffset       Floating point
              Amount to add to all entered tilt angles.  If the specimen is
              significantly tilted at zero tilt, then the amount of cosine
              stretching become inaccurate at high tilt.  Sharper correlations
              can be obtained by adding this angle offset, which is the same
              as the offset needed in Tiltalign or Tilt to make the
              specimen flat in the reconstruction.

       -reverse (-rev) OR -ReverseOrder
              Reverse order of processing when all views have same tilt angle.
              Specifically, this will cause the program to start with the last
              view at minimum tilt instead of the first one.

       -radius1 OR -FilterRadius1     Floating point
              Low spatial frequencies in the cross-correlation will be attenu-
              ated by a Gaussian curve that is 1 at this cutoff radius and
              falls off below this radius with a standard deviation specified
              by FilterSigma2.  Spatial frequency units range from 0 to 0.5.
              Use FilterSigma1 instead of this entry for more predictable
              attenuation of low frequencies.

       -radius2 OR -FilterRadius2     Floating point
              High spatial frequencies in the cross-correlation will be atten-
              uated by a Gaussian curve that is 1 at this cutoff radius and
              falls off above this radius with a standard deviation specified
              by FilterSigma2.

       -sigma1 OR -FilterSigma1       Floating point
              Sigma value to filter low frequencies in the correlations with a
              curve that is an inverted Gaussian.  This filter is 0 at 0 fre-
              quency and decays up to 1 with the given sigma value.  However,
              if a negative value of radius1 is entered, this filter will be
              zero from 0 to |radius1| then decay up to 1.

       -sigma2 OR -FilterSigma2       Floating point
              Sigma value for the Gaussian rolloff below and above the cutoff
              frequencies specified by FilterRadius1 and FilterRadius2

       -exclude (-e) OR -ExcludeCentralPeak
              Exclude a central correlation peak caused by fixed pattern noise
              in the images.  In tilted images, these peaks can occur anywhere
              within an extended, narrow strip perpendicular to the tilt axis.
              A peak in this region will now be excluded only if conditions
              are met both by this peak and by the highest peak outside this
              region, as described above.

       -central (-ce) OR -CentralPeakExclusionCriteria    Three floats
              This option specifies three of the criteria applied when decid-
              ing whether to exclude a peak at (0, 0): the minimum ratio of
              the second to the third peak strength (default 3); the absolute
              width of the central peak in the unbinned, unstretched correla-
              tion (default 1.5); and the minimum ratio of the second to the
              first peak width (default 1.6).

       -shift (-sh) OR -ShiftLimitsXandY   Two integers
              Limits on distance in X and Y to search for correlation peak, in
              pixels before binning is applied internally.  This option can be
              used to prevent a spurious correlation peak outside these limits
              from giving a bad alignment.  As of IMOD 4.6.31, the peak must
              be located within an ellipse whose axes are defined by the lim-
              its in X and Y.  If the program does not find an actual peak,
              i.e. a pixel higher than all its neighbors, within these limits,
              then it will give a zero shift. If cumulative correlations are
              being used, the program will seek a peak within this distance of
              the peak for the previous view and assign that view's shift
              instead of zero if no peak is found.

       -rect (-rec) OR -RectangularLimits
              With this option, the -shift option works as it did before IMOD
              4.6.31, requiring a peak to be within the rectangle defined by
              the limits in X and Y.

       -ccc (-cc) OR -CorrelationCoefficient
              Compute a normalized cross-correlation coefficient at the 10
              highest correlation peaks and pick the peak with the highest
              coefficient.  This computation requires 5 Fourier transforms
              instead of 3, because filtered images must be used for computing
              the correlation coefficient.

       -border (-bor) OR -BordersInXandY   Two integers
              Number of pixels to trim off each edge in X and in Y (the
              default is to use the whole image).

       -xminmax (-x) OR -XMinAndMax   Two integers
              Starting and ending X coordinates of a region to correlate,
              based on the position of the region at zero tilt.  This entry
              will override an X border value entered with BordersInXandY.

       -yminmax (-y) OR -YMinAndMax   Two integers
              Starting and ending Y coordinates of a region to correlate.
              This entry will override a Y border value entered with Border-
              sInXandY.

       -boundary (-bou) OR -BoundaryModel       File name
              Model file with boundary contours around areas to correlate.
              When correlating whole images to obtain transforms, the area
              outside the contours is masked out; when tracking patches, only
              patches inside the contours will be tracked (see above for
              details).

       -objbound (-objb) OR -BoundaryObject     Integer
              The number of the object to use from the model with boundary
              contours.  The default is to use all the contours in closed-con-
              tour objects, but with this option only the given object will be
              used.

       -binning (-bi) OR -BinningToApply   Integer
              Binning or other reduction to apply to the trimmed, padded
              images.  Ordinary binning is used unless the -antialias option
              is given.  By default, a reduction will be selected that makes
              the maximum dimension of the trimmed, padded image be no more
              than 1250 pixels, up to a reduction of 4.  Reduction will be
              increased above 4 only to keep the reduced image within a size
              of about 4K, up to a reduction of 16.  This default behavior
              might result in more reduction than desired, and the reduction
              might change when the amount of trimming is changed.  This
              option allows direct control of the reduction instead and also
              allows a reduction up to 32.

       -antialias (-ant) OR -AntialiasFilter    Integer
              Type of antialiasing filter to use for image reduction instead
              of binning.  Antialiasing becomes important when the images con-
              tain a strong noise component at the high frequencies being
              eliminated by the image reduction.  Ordinary binning reduces
              aliasing, but not as much as these filters do.  As in New-
              stack(1), the available types here are:
                  2: Blackman - fast but not as good at antialiasing as slower
                                filters
                  3: Triangle - fast but smooths more than Blackman
                  4: Mitchell - good at antialiasing, smooths a bit
                  5: Lanczos 2 lobes - good at antialiasing, less smoothing
                                than Mitchell
                  6: Lanczos 3 lobes - slower, even less smoothing but more
                                risk of ringing

       -leaveaxis (-lea) OR -LeaveTiltAxisShifted
              Leave the tilt axis in the center of the region that was corre-
              lated; the default is to shift it back to the center of the
              whole image.  With this option, the program will output global
              transforms ready to use in Newstack, rather than the trans-
              forms relating one view to the next that would need to be con-
              verted to global transforms with Xftoxg.  The reason for this
              difference is that the transforms must contain a net shift away
              from the center of the image, which would be lost in Xftoxg.

       -pad OR -PadsInXandY      Two integers
              Number of pixels to pad images on each side in X and in Y,
              before binning.  With no padding, shifts greater than 50% of the
              image size will not be treated correctly.  Each 1% of padding
              allows proper treatment of shifts more than 50% by an additional
              2% of image size.  The default is 5% of images dimensions for
              patch tracking or finding warping, or 10% for regular correla-
              tions, allowing shifts up to 70% of the image size to be deter-
              mined.

       -taper (-ta) OR -TapersInXandY      Two integers
              Number of pixels to taper images in X and in Y.  The default is
              10% of the image dimensions.

       -views (-vi) OR -StartingEndingViews     Two integers
              Starting and ending view numbers, numbered from 1, for doing a
              subset of views.

       -skip (-sk) OR -SkipViews      List of integer ranges
              List of views to skip, while maintaining alignment across
              skipped views.  The program will not find the transform for
              aligning a listed view to the previous one.  When a view is
              skipped, the following view will be aligned to the last
              unskipped view and a unit transform will be output for the
              skipped view.  With patch tracking, no model points will be
              placed on the skipped views.  Comma-separated ranges of views
              (numbered from 1) can be entered.  The default is to use all of
              the views.

       -break (-br) OR -BreakAtViews       List of integer ranges
              List of views to break alignment at.  This option is like
              "-skip" in that no transform is found for aligning a listed view
              to the previous one and a unit transform is written for the
              listed view.  However, the following view will be aligned to the
              listed view, and nothing will be aligned to the previous view.
              This breaks the chain of alignment through the series of views.
              This option cannot be used with tilt series patch tracking, but
              can be used when finding warping.

       -cumulative (-cu) OR -CumulativeCorrelation
              Use this option to add up previously aligned pictures to get the
              reference for the next alignment.  Alignments will start at low
              tilt and work up to high tilt.

       -absstretch (-ab) OR -AbsoluteCosineStretch
              Stretch each image added into the cumulative sum by 1 over the
              cosine of its tilt angle.

       -nostretch (-no) OR -NoCosineStretch
              Do not do any cosine stretching for correlations or for accumu-
              lating into the reference (this option overrides Absolute-
              CosineStretch).

       -iterate (-it) OR -IterateCorrelations   Integer
              Number of iterations of the correlation.  After finding the
              pixel with the peak correlation, the program achieves subpixel
              accuracy by fitting a parabola to the correlation values in X or
              Y and interpolating from the parabola.  If the correlation is
              iterated, this subpixel shift is applied to the cosine-stretched
              image before the correlation, which tends to shift the peak to
              being exactly on a pixel.  As a result, the shift has slightly
              higher subpixel accuracy than when it is derived by parabolic
              interpolation.  The program will terminate the iterations if the
              remaining fractional shift is less than 0.02 pixel or if a lower
              correlation value is obtained than on the previous iteration.
              In the latter case it reverts to the shift that gave the highest
              correlation.  Two or three iterations are generally sufficient.
              Iteration is not programmed efficiently, so computation time
              will be proportional to the number of iterations.

       -search (-sea) OR -SearchMagChanges
              Search for the magnification factor that gives the highest cor-
              relation coefficient at one or more views.  This factor will be
              incorporated into the transformation for the respective view.
              If a maximum value of the correlation coefficient is not found
              within the allowed range (specified with the -mag option), a
              magnification of 1 is used.  This option cannot be used together
              with rotation scan, cumulative correlation, patch tracking, or
              when finding warping.

       -changes (-ch) OR -ViewsWithMagChanges   List of integer ranges
              List of views at which to search for magnification changes.
              Ranges are allowed.  The default is to do all views.

       -mag (-m) OR -MagnificationLimits   Two floats
              Lower and upper limits for size change when searching for magni-
              fication factors.  The default is 0.9,1.1.

       -scan (-sc) OR -ScanRotationMaxAndStep   Two floats
              Either the maximum angle and angular step size at which to apply
              rotation in order to estimate the best rotation; or a single
              rotation angle to apply and a 0 step size.  With a positive step
              size to estimate rotation, the program does a coarse scan just
              at the given interval from the negative to positive maximum
              angle, then estimates the best rotation by interpolation.  This
              is unlike the magnification search, which reduces its step size
              to refine the estimate.  The final correlation is done at the
              interpolated angle.  With a step size of 0, the angle given as
              the maximum (which can be negative) is applied before correlat-
              ing.  The resulting transformation incorporates the rotation in
              either case.  This option cannot be used together with magnifi-
              cation search, cumulative correlation, patch tracking, or when
              finding warping.

       -reference (-ref) OR -ReferenceFile      File name
              Input file containing an image to use as a reference.  Each view
              from the main input image file will be aligned with this refer-
              ence image, which will be assumed to be at zero tilt.  The out-
              put file will contain a linear transform for every view in the
              input file; if a subset of views is specified with -views or
              some views are skipped, unaligned views will be given a unit
              transform.  This option cannot be used with cumulative correla-
              tions, patch tracking, or when finding warping.

       -rview (-rv) OR -ReferenceView      Integer
              View number of image to use in reference file, numbered from 1.

       -second (-sec) OR -SecondPeakBoxSize     Two integers
              Report on the second peak position if it is within a box of the
              given length and width before binning, centered on the first
              peak and with its width along the tilt axis and its length per-
              pendicular to the tilt axis.

       -size (-siz) OR -SizeOfPatchesXandY      Two integers
              Size in X and Y of patches to track by correlation.  This option
              will cause the program to track a set of patches of the given
              size from the starting view to the high tilt view in each direc-
              tion, and to output the positions of the patch centers in an
              IMOD model.  By default, patches will overlap in each direction
              by the default value for the -overlap option (see below).  You
              can change the overlap with the -overlap option, specify the
              number of patches directly with the -number option, or enter a
              model of points to track with the -seed option, but you can
              enter only one of these options.  Patch tracking cannot be used
              with cumulative correlation.

       -number (-nu) OR -NumberOfPatchesXandY   Two integers
              Number of patches in X and Y to track by correlation.  The given
              number of patches will be regularly spaced apart and fill the X
              and Y ranges of the trimmed image area.

       -overlap (-ov) OR -OverlapOfPatchesXandY      Two integers
              Fractional overlap in X and Y between patches that are tracked
              by correlation.  These overlaps are used to determine the number
              of patches when -number is not entered.  The default, 0.33,
              0.33, which will make patches that overlap by one-third in each
              direction.  A value of 0 will result in no overlap, and values
              less than 0 will result in space between the patches.

       -seed (-see) OR -SeedModel     File name
              Input model file with center points to track by correlation.
              Only points whose patches fit entirely within the trimmed image
              area at zero degrees will be tracked.  See above for details.

       -objseed (-objs) OR -SeedObject     Integer
              Number of the object from the seed model with the points for
              tracking patches.  The default is to use all objects containing
              scattered points; with this option only the given object will be
              used.

       -length (-len) OR -LengthAndOverlap      Two integers
              When tracking patches by correlation, the default is to produce
              one contour per patch passing through the whole set of views.
              With this option, the contour will be broken into pieces of the
              given length, and overlapping by at least the given amount.  If
              the centers of the tracked areas wander enough to give a bad fit
              when the resulting model is used in Tiltalign, then breaking
              the contours into overlapping pieces might improve the fit.
              Some overlap is needed to use the model in Tiltalign (1).

       -prexf (-pr) OR -PrealignmentTransformFile    File name
              File with transformations applied to align the images being used
              for patch tracking.  With the shift information in these trans-
              forms, each patch is evaluated for whether it contains blank
              image area because of the shifting.  Patches that are more than
              30% blank will not be tracked further, and patches with some
              blank area less than this amount will be tapered down to the
              edge of the blank area.

       -imagebinned (-im) OR -ImagesAreBinned   Integer
              The current binning of the images relative to the unaligned
              stack.  This entry is needed to scale the transforms supplied
              with the -prexf option if the binning is not 1.

       -unali (-un) OR -UnalignedSizeXandY      Two integers
              The full size of the unaligned stack that was transformed to
              create the images being aligned with patch tracking.  This entry
              is needed if an output size was specified when creating the
              stack being aligned and if transforms are supplied with the
              -prexf option.

       -warp (-w) OR -FindWarpTransforms   Integer
              Use patch correlations to find and save warping transformations
              between successive images.  The output file will be a file with
              warp transforms, not a model.  Enter 1 for transforms with the
              linear component separated out, and -1 to not separate the lin-
              ear component.  Tilt angles cannot be entered with this option,
              nor can the -reverse option.  Unlike with tilt series patch
              tracking, you can break the alignment at views as well as skip
              views.  Limits in X and Y and a boundary model can be used to
              constrain patch locations, but there must be at least 3 patches
              in the area defined by all the boundary contours.

       -pair (-pai) OR -RawAndAlignedPair       Two integers
              After transforms relating each section to the previous have been
              obtained, this option can be used to find a warping alignment
              between a pair of sections, where the first is an unaligned
              image and the second is a section transformed into linear align-
              ment with it.  The option specifies the view number (numbered
              from 1, as usual) of the second view of the pair and the total
              number of sections.  If this option is entered, the file of sec-
              tion-to-section transforms must be entered with the -prexf
              option.  The input images must not be binned or resized from the
              ones on which those transforms are based.  This option is used
              by Xfalign.

       -append (-ap) OR -AppendToWarpFile
              When doing a raw and aligned pair, this option can be used to
              add the warp transform from the pair to an existing file.  The
              output file must be a valid warp transform file.

       -test (-te) OR -TestOutput     File name
              Specify a filename with this option to have two padded, tapered
              images and the cross-correlation saved for every pair of images
              that are correlated.

       -verbose (-ve) OR -VerboseOutput
              Output diagnostic information

       -param (-par) OR -ParameterFile     Parameter file
              Read parameter entries as keyword-value pairs from a parameter
              file.

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

       -StandardInput
              Read parameter entries from standard input.

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

       Image input file

       Piece list file for reordering the Z values in the stack, or Return if
       none

       Output file for F transforms

       -1 to enter individual tilt angle for each view, 1 to specify a start-
       ing and increment tilt, or 0 to read tilt angles from a file

       IF you entered 1, next enter the starting and incremental tilt angles
       IF you entered -1, enter the tilt angle of each view.
       IF you entered 0, enter name of file with tilt angles

       Angle of rotation of the tilt axis in the images; specifically, the
       angle from the vertical to the tilt axis (counterclockwise positive).

       Filter parameters to filter the correlation, or / for no filter (Enter
       values of Sigma1, Sigma2, Radius1, Radius2 just as for ENHANCE.)

       1 to exclude a central correlation peak due to fixed pattern noise in
       the images, or 0 not to

       Number of pixels to trim off each side in the X and Y dimensions, or /
       to use the whole image area

       Borders (in pixels) with which to pad images in the X and Y dimensions,
       or / for the default, which is 5% of the image dimensions up to 20 pix-
       els

       Distances in pixels over which to taper image intensities down to the
       mean at the edges, in the X and Y dimensions.  Enter / for the default,
       which is 10% of the image dimensions up to 100 pixels

       Starting and ending view #'s (first is 1), or / for all views

HISTORY
       Written by David Mastronarde 10/6/98

BUGS
       Email bug reports to mast at colorado dot edu.



IMOD                                 5.0.2                        tiltxcorr(1)