imodmop(1) imodmop(1)
NAME
imodmop - extract image data inside of IMOD model contours
SYNOPSIS
imodmop [options] <model_file> <image_file> <image_output_file>
DESCRIPTION
The "mop" in imodmop stands for MOdel Painter; the program can be used
to color in data inside of model contours. It will operate on all
modes of input data, included Fourier transforms and color images in an
MRC file. Its output file can be either the same mode as the input
data, or an RGB file where the pixels have been colored by the colors
of the model objects. In addition, the painted output can be directed
through Xyzproj to produce projections at a series of tilt angles
around one axis, an operation formerly done by a program called imodc-
mopp. Again, this output can be monochrome or color.
By default, the program operates only on closed contour objects, but
open and scattered point objects can also be used. For open contours,
it is possible to paint a cylinder of data around each contour by spec-
ifying the object number and a diameter for the cylinder. There are
options for painting either circles or spheres of scattered point
objects; if the points have individual sizes they will be used as the
radius for each area painted.
Contours in a closed contour object may be nested to any level, and
regions that are topologically inside the surface (odd nested levels)
will be painted, and enclosed regions that are topologically outside
(even nested levels) will be cleared (e.g., the holes will be excluded
from donuts). An object defined as having its front face inside
instead of outside will be treated in the reverse fashion, i.e., odd
levels will be cleared and even levels will be painted. The painting
is done in two passes, with outside-facing objects done first, then
inside facing-ones. This means that if you have one object inside
another and you want to paint the region between the two, then you need
to define the inner object as inside-facing. However, then you will
not be able to paint any other objects inside of that, since they will
be cleared by the painting of the inside-facing object.
The data need to be scaled for output in two different situations: when
a color volume is being produced, and when a projection series is being
produced. In the first case, scaling can be controlled with the -scale
option. In the second case, data are scaled to bytes after projection
regardless of whether monochrome or color projections are being made.
The scaling here can be controlled with the -bw option in either case.
In addition, the differential scaling through the series of angles by
Xyzproj is controlled with the -constant option. Some experimenta-
tion may be needed to get reasonable results.
If you are modeling in an FFT, you can load the FFT into 3dmod
either non-mirrored or mirrored. However, if you load it mirrored (the
default), then be sure to model only in the right half of the FFT.
Options
Imodmop 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 -):
-xminmax OR -XMinAndMax Two integers
Starting and ending X index coordinates to extract into the out-
put volume (numbered from 0). The default is to produce an out-
put volume the same size as the input. The X and Y range of the
output cannot be modified if the input is a Fourier transform.
-yminmax OR -YMinAndMax Two integers
Starting and ending Y index coordinates to extract into the out-
put volume (numbered from 0).
-zminmax OR -ZMinAndMax Two integers
Starting and ending Z slices to extract into the output volume
(numbered from 0).
-border OR -BorderAroundObjects Integer
Use this option to extract just the volume necessary to contain
all of the objects being painted, with the given border added in
X and Y. For tubular lines, the radius of the tube is taken
into account in determining the limits to extract in X and Y,
but the limits in Z are determined just from the points on the
contours. For scattered points, the radius of each point is
taken into account in determining limits to extract in all 3
dimensions. If Z limits are entered with the -zminmax option,
then they supercede the Z limits computed from the objects with
this option; this is the way to get extra slices in Z. This
option cannot be used with -xminmax or -yminmax.
-invert OR -InvertPaintedArea
Paint outside model contours instead of inside. This is accom-
plished by painting inside the contours, then subtracting the
painted volume from the original volume. This option cannot be
used when making colored data because the color is not defined
outside of model objects.
-reverse OR -ReverseContrast
Reverse the contrast by subtracting each value from the file
maximum before painting. The intensity range being operated on
thus ranges from 0 to the original max minus the min. For color
input data, each channel is subtracted from 255. FFT input data
may not be reversed.
-thresh OR -Threshold Floating point
Set values below the given threshold to zero. If contrast is
being reversed, the threshold will be converted to the appropri-
ate value to use after the reversal, so a value in the original
data can be used.
-fv OR -FillValue Floating point
Value with which to fill the background pixels that are not
painted with image data. This is a value on the same scale as
the values in the input volume, before any reversal of contrast.
If you enter a value and also select contrast reversal, the
value is subtracted from the file maximum before being tested
for whether it fits in the range for the data mode. The default
is 0.
-fc OR -FillColor Three floats
Relative values for scaling the value for background fill into a
red, green, and blue components for color output. The values
should be between 0 and 1. The default is 1,1,1.
-objects OR -ObjectsToDo List of integer ranges
Paint only for the given list of objects. The default is to do
all closed contour objects, all scattered point objects if
-2dscat or -3dscat is entered, and any open contour objects
listed with -tube.
-2dscat OR -2DScatteredPoints
Paint scattered point objects, but paint only a circle in the Z
plane of each point. This would be useful for 2D FFTs.
-3dscat OR -3DScatteredPoints
Paint scattered point objects with each point treated as a
sphere. Options -2dscat and -3dscat are mutually exclusive.
-tube OR -TubeObjects List of integer ranges
List of open contour objects for which to paint a cyclinder of a
particular diameter around each contour.
-diam OR -DiameterForTubes Floating point
Diameter for open contour objects being painted as tubes. Enter
either 1 value, or 1 value per listed object.
-planar OR -PlanarTubes
With this open, open contours identified as being painted as
tubes will be painted in 2D only. For each segment of the con-
tour that lies in one Z plane, pixels will be extracted in that
Z plane only.
-color OR -ColorOutput
Produce RGB output colored by model object colors. This option
is available only with byte, integer, or floating point input.
-scale OR -ScalingMinMax Two floats
Minimum and maximum values for scaling to bytes, when a color
volume is being produced. The default is to scale the min and
max of the file to 0 and 255 for input data modes other than
bytes, but to leave bytes unscaled. This entry should produce
the same scaling as the -s option to 3dmod.
-project OR -ProjectTiltSeries Three floats
Produce projection series with given starting, ending, and
increment angles. Projection is done with xyzproj, then data
are read back in and and scaled to bytes. When color output is
being produced, each painted color channel is output separately
and projected separately, then read back in and combined into
one RGB mode file. Only byte, integer, or real data may be pro-
jected.
-axis OR -AxisToTiltAround Text string
Axis to tilt around for projections (X, Y, or Z; default is Y)
-constant OR -ConstantScaling
When projecting with Xyzproj, scale all projections by the
same amount instead of dividing them by the number of pixels
along the projection ray at the particular angle. This will
give more even intensities through the projection series for
nearly spherical compact objects embedded in the black back-
ground.
-bw OR -BlackAndWhite Two integers
Black/white values for scaling projections to bytes. By
default, the projections are scaled so that their min and max
values map to 0 and 255. With this option, scaled values below
the black level are set to 0, ones above the white level are set
to 255, and values in between are remapped to 0 to 255. The
result is similar to reading the default scaled data into 3dmod
and setting the black and white sliders to these values.
-tempdir OR -TemporaryDirectory Text string
Directory for temporary files when projecting
-keep OR -KeepTempFiles
Keep intermediate files when projecting. 2 or 6 intermediate
files are produced, depending on whether color output is being
generated. The temporary volume files are named
imodmop.rec0.pid (and imodmop.rec1.pid and imodmop.rec2.pid for
green and blue channels of color output), where pid is the pro-
cess ID. The temporary projection files are named imod-
mop.xyz0.pid, etc.
-StandardInput
Read parameter entries from standard input
AUTHORS
David Mastronarde
Based on imodmop and imodcmopp by James Kremer.
SEE ALSO
3dmod, xyzproj
BUGS
Pixels inside closed contours are selected by converting to a scan con-
tour that is used to define the pixels to paint, instead of directly
testing whether each pixel is inside the contour. If this is not accu-
rate enough, then direct testing could be added, although this will be
much slower.
Email bug reports to mast at colorado dot edu.
BL3DEMC 3.13.2 imodmop(1)