trimvol(1) trimvol(1)
NAME
trimvol - Trim a volume and scale it to bytes.
SYNOPSIS
trimvol [options] <input file> <output file>
DESCRIPTION
Trimvol provides a command-line interface to the programs Findcon-
trast(1) and Newstack, for copying a selected portion of an MRC
image volume into a new file, with automatic scaling to bytes. There
are options for specifying the volume to be extracted, and for control-
ling the scaling to bytes. There is also an option to scale floating
point numbers to integers. By default, coordinates are numbered from
1.
If you use the -sz or -s option, then Findcontrast will be run on
the specified sections. By default, regions within 10% of the lateral
borders of each section are omitted, but a different region can be set
with -sx and -sy. A scaling is chosen which saturates the intensities
of one pixel per slice, on average, at the dark and the light end. If
you use -sz then coordinates specified with these options will be
treated as coming from a flipped volume only if the -f option is
entered. If you use -s then coordinates will always be taken as coming
from a flipped volume.
By default, the origin of the output file will be adjusted so that a
model built on the input volume will display correctly on the output
file. This will even work for a volume rotated with -rx but not for
one flipped with -yz. This adjustment can be turned off with the -k
option.
Options
You can enter only one of -c, -s, -sz or -mm. Similarly, you cannot
enter both -x and -nx, both -y and -ny, or both -z and -nz. You can
also enter only one of -sz and -s and only one of -yz and -rx.
-x <X0,X1>
Copy pixels in X between X0 and X1, inclusive.
-y <Y0,Y1>
Copy pixels in Y between Y0 and Y1, inclusive.
-z <Z0,Z1>
Copy pixels in Z between Z0 and Z1, inclusive.
-nx <size>
Copy "size" pixels in the X dimension, centered on the middle in
X.
-ny <size>
Copy "size" pixels in the Y dimension, centered on the middle in
Y.
-nz <size>
Copy "size" pixels in the Z dimension, centered on the middle in
Z.
-sz <S0,S1>
Scale to bytes, determining the optimal scaling to bytes by ana-
lyzing intensities from sections S0 to S1, inclusive. Coordi-
nates are treated as coming from a flipped volume only if the -f
option is given. Slices are numbered from 1 regardless of
whether the -i option is used.
-s <S0,S1>
Scale to bytes, determining the optimal scaling to bytes by ana-
lyzing intensities from sections S0 to S1, inclusive, in a
flipped volume (legacy behavior).
-sx <X0,X1>
-sy <Y0,Y1>
Analyze the region from X0 to X1 in X, or from Y0 to Y1 in Y,
inclusive, in determining the scaling to bytes.
-c <black,white>
Scale to bytes, with relative intensities between "black" and
"white" (on a scale of 0 to 255) stretched to occupy the full
range of byte values.
-mm <min,max>
Scale to integers (mode 1), so that the current minimum and max-
imum of the file would be scaled to the given values of minimum
and maximum. Newstack is run with the -scale option and the
entered values. This option would be used to scale from mode 2
(floating point) to mode 1.
-yz Flip Y and Z in the output volume by first creating a temporary
trimmed volume with newstack then running "clip flipyz" on this
volume to create the final output file.
-rx Rotate the output volume by -90 degrees around the X axis, by
first creating a temporary trimmed volume with newstack then
running "clip rotx" on this volume to create the final output
file. The slices will look the same as with the -yz option but
rotating instead of flipping will preserve the handedness of
structures.
-i Interpret -x, -y, -z, -sx, and -sy entries as index coordinates
numbered from 0, rather than as 3dmod coordinates numbered from
1.
-f Interpret -y, -z, -ny, -nz, -sy, and -sz entries as referring to
a flipped volume, with Y and Z transposed.
-k Keep the origin the same in the output from Newstack instead
of passing it the -origin option to adjust the origin for the
location of the subvolume being created. This option can be
used to reproduce a volume created with earlier versions of
IMOD.
-P Output process ID.
FILES
If the output file already exists a backup image of the original is
created with the ~ extension.
AUTHOR
David Mastronarde <mast at colorado dot edu>
SEE ALSO
newstack, findcontrast
BL3DEMC 3.13.2 trimvol(1)