imodjoin(1)                 General Commands Manual                imodjoin(1)



NAME
       imodjoin - Combine two or more IMOD models into one.

SYNOPSIS
       imodjoin [options] model_1 [-o list] model_2 [[-o list] model_3 ...]
       out_model

DESCRIPTION
       Combines the contents of two or more models, or a subset of the objects
       from them, into a single model.  With no options, the program will pro-
       duce a model with all of the objects from the first model, followed by
       all of the objects from the second model, then all of the objects from
       any additional models.

       The program will transform models if necessary to bring them to a com-
       mon coordinate system, using image reference information stored in the
       model.  The most common case requiring this is when the models have
       last been loaded on different subsets of the same image file.  The
       default assumption is that the models were loaded on either the same
       image file or image files with congruent coordinate systems.  For exam-
       ple, an image file produced by Trimvol or Rotatevol has its
       header entries adjusted so that its coordinate system is congruent with
       that of the original image file.  Squeezevol also produces a file
       with a congruent coordinate system.  When joining models coming from
       such files, the program will take all coordinate differences between
       the models into account: shifts, rotations, and scaling.  This is not
       always appropriate, so the -d option is available to indicate that mod-
       els came from different volumes.  Some examples of different or non-
       congruent volumes are tomograms from serial sections, single and dual-
       axis tomograms of the same specimen, and two files of the same volume
       in which Y and Z are flipped.  In such cases, the program will simply
       shift each model, if necessary, to undo the effects of being loaded
       onto a subset of its respective image file; it will also scale all mod-
       els to a common scale unless the -s option is given.  The resulting
       model will be given image reference information so that it will display
       correctly on the volume that the first model came from, unless a spe-
       cific image file is identified with the -i option, in which case the
       reference information will match that image.

       The program will give a warning when it does not find adequate image
       reference information in the models.  Despite these warnings, the join-
       ing should work as long as the models are based on the same image
       stack, or on image stacks with similar coordinate systems (e.g., iden-
       tical pixel spacings and origins).  The warnings could be avoided by
       loading the model together with a relevant image file into 3dmod and
       resaving the model.


OPTIONS
       All options except for -o must be entered before the first input model;
       -o may be entered before each input model.

       -o list of objects
              This option can be used before a model file to specify a list of
              objects that should be taken from that file.  Each list of
              objects can consist of comma-separated ranges of numbers, for
              example 1-3,6-9,13,15.

       -r list of objects
              This option can be used to replace the listed objects in the
              first model with objects from the second model.  In this case,
              the -o option cannot be used for the first model; the output
              model will have the same number and ordering of objects as the
              first model, with the specified ones replaced.  This option can
              be used only with two input models.  If no -o option is used for
              the second model, the objects in the list for the first model
              will be replaced by objects 1, 2, 3, etc. from the second model.
              If the -o option is used for the second model, then each of the
              objects in the replacement list for the first model will be
              replaced by the corresponding object in the list for the second
              model.

       -c     Change colors of the objects being added to the first model.  If
              objects are being added without replacement, then they will be
              changed to the colors automatically assigned to new objects.  If
              objects are replacing ones in the first model, then they will be
              given the same color as the respective objects that they are
              replacing.  Without this option, objects will retain their orig-
              inal colors, which is especially annoying when there are just
              one or two objects from each model.

       -d     Models are from different volumes rather than from the same vol-
              ume or volumes with congruent coordinate systems (see above).

       -i filename
              With this option, the header information in the given image file
              will be taken as the reference for all models, and the resulting
              model will display correctly on this image file.  Otherwise, the
              first model is taken as the reference.  This option implies -d.

       -s     Do not adjust for scale (pixel spacing) differences between mod-
              els from different volumes.  This option might be appropriate
              either if the pixel size differences in the image file headers
              do not accurately reflect different scalings between the images,
              or if the scale differences are being handled separately, such
              as by an alignment transformation.

       -f     Retain (or restore) the original Y-Z flipped state of each
              model.  Without this option, the program will put all models
              into the same flipped state before joining.  This option would
              be appropriate if one model was built on a tomogram that was not
              flipped (and thus is loaded into 3dmod with flipping) and
              another model was built on a flipped tomogram (no flipping
              needed in 3dmod).

       -n     Do not transform models at all.  This option will prevent all of
              the behavior described above.

AUTHORS
       Jim Kremer and David Mastronarde

SEE ALSO
       3dmod, imodextract

BUGS
       Email bug reports to mast at colorado dot edu.



IMOD                                4.12.61                        imodjoin(1)