point2model(1)              General Commands Manual             point2model(1)



NAME
       point2model - Convert point listing to IMOD model file

SYNOPSIS
       point2model  [options]  point_file  model_file

DESCRIPTION
       Point2model will convert a text file with a simple list of 3D point
       coordinates, one per line, to an IMOD model.  The file can be in one of
       four forms: each line consisting of X and Y coordinates, where a Z of 0
       will be assumed; each line consisting of X, Y, and Z coordinates; each
       line having a contour number followed by the X, Y, Z coordinates; or
       each line having an object number and a contour number followed by the
       X, Y, Z coordinates.  The objects and contours can be numbered from
       either 1 or 0.  The last three forms correspond to the different forms
       that can be output by the companion program, Model2point.  In each
       of these three cases, a general value can be present after the coordi-
       nates for every point or for the first point in a contour.  When con-
       tour numbers are not contained in the file, there are options to place
       points into different contours based on the number of points or their Z
       values.

       In addition to options for processing the coordinates, there are sev-
       eral options for setting properties of the model or objects.  These are
       provided to save having to edit a model in 3dmod, a convenience that
       becomes significant when models are produced repeatedly at the command
       line or by a script.  Other such options could be added easily.

       If you intend to take the model directly into a processing program like
       Tiltalign, Beadtrack, or Ccderaser, without resaving it from
       3dmod, you need to use the -image option so that coordinates will be
       treated correctly.

OPTIONS
       Point2model uses the PIP package for input (see the manual page for
       pip).  Options can be specified either as command line arguments
       (with the -) or one per line in a command file (without the -).
       Options can be abbreviated to unique letters; the currently valid
       abbreviations for short names are shown in parentheses.

       -input (-in) OR -InputFile     File name
              Input text file with points.  If this option is not entered, the
              first non-option argument will be used for the input file.

       -output (-ou) OR -OutputFile   File name
              Output file for model.  If this option is not entered, the sec-
              ond non-option argument will be used for the output file.

       -open (-op) OR -OpenContours
              The default is to make all objects be closed contour type.  This
              option and -scat can be used to make all objects be open or
              scattered, respectively.

       -scat (-sc) OR -ScatteredPoints
              Make objects be scattered point type

       -number (-nu) OR -PointsPerContour       Integer
              Maximum number of points per contour.  The default is to put all
              points into one contour.  This option is not allowed if the
              point file has contour numbers.

       -planar (-pl) OR -PlanarContours
              Start a new contour at each new Z value encountered when reading
              sequentially through the lines of input.  This option is not
              allowed if the point file has contour numbers.

       -zero (-ze) OR -NumberedFromZero
              Objects and contours are numbered from 0 instead of 1

       -zcoord (-zc) OR -ZCoordinatesFromZero
              Z coordinates of points are 0 instead of -0.5 at the bottom of
              the volume.  In IMOD models, integer Z values are defined as
              being located in the middle of a pixel in Z, which makes model
              coordinates range from -0.5 to NZ - 0.5 for a volume of NZ
              slices.  Use this option if the point coordinates range from 0
              to NZ instead, i.e., if the fractional part of a Z coordinate
              corresponds to its fractional position within a pixel in Z.

       -sizes (-si) OR -PointSizes
              Each line has an individual point size (radius) after the Z
              coordinate.  Values and sizes can both be present.

       -default (-d) OR -SetAsDefaultSize
              If individual point sizes are present and the size for a point
              matches the default size for the object entered with the -sphere
              option, store a size of -1 so that it will continue to have the
              default size if that is later changed.  Otherwise, the value
              itself will be stored for the point.

       -values (-va) OR -ValuesInLastColumn     Integer
              Use this option to indicate that lines have a general value at
              the end, after the Z coordinate.   Enter 1 to have the value
              stored as a point value, or -1 to have the value stored as a
              contour value.  With point values, a value must appear on every
              line.  With contour values, the first point in each contour must
              have a value, and values on later points in a contour will be
              ignored and need not be present.  Note that if a file has values
              and this option is not given, the coordinates will NOT be read
              correctly unless the file has both object and contour numbers,
              because the program will think that the X coordinate is a con-
              tour number.

       -flags (-f) OR -DisplayFlags   Integer
              This entry is a sum of flags controlling display options, cur-
              rently including just 1 to turn on the option to "Show stored
              values" in the Model View Edit Objects Values panel, and 2 to
              turn on the option for false color.

       -times (-ti) OR -TimesForContours
              Use this option to indicate that contours have time indexes.
              These indexes should appear after point sizes, if any, just for
              the first point in a contour.  If there are point or contour
              values, the time should be before the value.

       -circle (-ci) OR -CircleSize   Integer
              Turn on display of circles of this size (radius) at each point.
              If the points form open contours that progress through Z, this
              option will let you see them in the Zap window of 3dmod without
              having to edit the object.

       -sphere (-sp) OR -SphereRadius      Integer
              Turn on display of spheres of this radius at each point.  Use
              this option to see scattered points in 3dmod without having to
              edit the object.

       -width (-w) OR -LineWidthIn2D       Integer
              Line width for the object in 2D displays like the Zap window.
              This sets the same line width as in the 3dmod Edit Object Type
              dialog.

       -thick (-th) OR -LineThicknessIn3D       Integer
              Line width for the object in the Model View display.  This sets
              the same value as the 3D line width in the Line panel of the
              3dmod Model View Edit Objects dialog.

       -color (-co) OR -ColorOfObject      Three integers
              Color to make an object; enter red, green, and blue values rang-
              ing from 0 to 255.  To assign colors to multiple objects, enter
              this option multiple times.  (Successive entries accumulate)

       -name (-na) OR -NameOfObject   Text string
              Name to give an object; enter a text string, enclosed in quotes
              if it contains spaces.  To assign names to multiple objects,
              enter this option multiple times.  (Successive entries accumu-
              late)

       -image (-im) OR -ImageForCoordinates     File name
              Make the model's coordinate system match this image file.  This
              is not needed for loading the model onto this image in 3dmod,
              but will allow the model to be used together with this image
              file in various programs (e.g., Beadtrack) without having to
              load it into 3dmod and save it.  As of IMOD 4.10.30, this entry
              also sets the pixel size in the model header.

       -volume (-vo) OR -VolumeSizeXYZ     Three integers
              Size of a volume in X, Y, and Z to store in the "max" fields of
              the model header.  Correct max values are needed for some opera-
              tions such as rotation in Imodtrans.  By default, the program
              stores max values that are a few pixels past the actual data, or
              the size of an image file if one is entered with -image.  This
              entry overrides a size from such an image file.

       -pixel (-pi) OR -PixelSpacingOfImage     Three floats
              Set the reference scaling information of the model to the given
              X, Y, and Z scale factors, which would correspond to the pixel
              spacing in an image file header.  The entry together with -ori-
              gin provides an alternative to the -image option, so -image can-
              not be used together with -pixel or -origin.  Like -image, these
              entries are not needed for loading the model into 3dmod together
              with an image file of the same scaling, but would be useful for
              loading into 3dmod with an image at a different binning, or for
              use in other programs that require the scaling to be correct.
              As of IMOD 4.10.30, this entry also sets the pixel size in the
              model header.

       -origin (-or) OR -OriginOfImage     Three floats
              Set the reference information of the model to the given X, Y,
              and Z translations, which would correspond to the origin in an
              image file header.

       -modpix (-m) OR -ModelPixelSize     Floating point
              Pixel size to assign to model header, in nanometers.  This
              option can be entered along with -image or -pixel and overrides
              the pixel size in the image file header or entered with -pixel,
              respectively.

       -zscale (-zs) OR -ZScaleOfModel     Floating point
              Z scale to assign to the model, corresponding to the value set
              in the 3dmod Model Header and Model View Edir Controls dialogs.
              This Z-scale is separate from the pixel spacing in Z and is used
              for display, quantitative measurements, and determination of the
              normals to the surface.

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

       -StandardInput
              Read parameter entries from standard input


AUTHOR
       David Mastronarde  (mast at colorado dot edu)

SEE ALSO
       model2point



IMOD                                 5.0.2                      point2model(1)