resamplemod(1)                                                  resamplemod(1)

       resamplemod - Turn a model perpendicular to Z axis and resection

       resamplemod  [options]  input_file  output_file

       Resamplemod can be used to resample or resection a model of fiber tra-
       jectories after rotating it so that the fibers run parallel to the Z
       axis.  The program can find the mean trajectories of the fibers them-
       selves and then rotate the model to bring the mean trajectory parallel
       to the Z axis, or one can supply a special contour to indicate the axis
       that should be rotated to the vertical.  Contours will be resampled at
       single pixel intervals so that the model will have the correct dimen-
       sions when it has the same Z scale factor as the original model.

       Resamplemod uses the PIP package for input (see the manual page for
       pip) 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-

       -input (-i) OR -InputFile      File name
              Input model file.

       -output (-o) OR -OutputFile    File name
              Output model file.

       -exclude (-e) OR -ExcludeObjects    List of integer ranges
              Objects to exclude from resampling; for example, closed contour

       -direction (-d) OR -DirectionObjects     List of integer ranges
              Objects to use to determine mean direction of fibers.  The
              default is to use all of the objects; enter a list to use a sub-
              set of objects, or just a single object number if you have cre-
              ated a special object with a contour to indicate the direction.

       -main (-m) OR -MainAxis   Integer
              Dominant axis along which fibers run (1 = X, 2 = Y, or 3 = Z.)
              The default is the Z axis (3), which is appropriate for serial
              section models.  A different axis is generally needed for a
              model from a tomogram.  If the model was built on a tomogram
              loaded into 3dmod with flipping (-Y), enter a number that refers
              to the axis that was seen in 3dmod.

       -skip (-s) OR -SkipInversion   Integer
              Do not invert contours that go from high to low along the main
              axis.  The default is to reorder contours if necessary so that
              they go from low Z to high Z in the output model.  With an entry
              of 1, it will not invert contours in the output model, but it
              will still invert the ones being averaged when determining the
              mean direction of fibers so that they go in the same direction
              as the main axis. This means that the main axis will end up with
              a positive Z component no matter what direction the contours
              being averaged point.  To retain the direction in the contours
              being averaged and make the main axis end up with a negative Z
              component, enter a -1 so that the contours will not be inverted
              for averaging either.  If this option is used, it is essential
              that all the contours being averaged point in about the same
              direction, since any pointing in the opposite direction will not
              be fixed.

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

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

              Read parameter entries from standard input.

       Written by David Mastronarde, 2000; incorporated in IMOD 9/5/03

       Email bug reports to mast at colorado dot edu.

IMOD                                 4.9.3                      resamplemod(1)