rot3d is a command-line application that can reorient an input image arbitrarily in 3D. It can also resample the data to a finer or coarser grid. Quadratic interpolation is used to determine the output values.
rot3d does have a graphical interface, rot3d_i, to aid in building the command file. For a fully interactive application with capabilities similar to rot3d, use Rotate3D.
For rot3d and rot3d_i, certain operations such as selecting a region to process and starting processing from the graphical interface, are described in BatchRegion.html since several applications use the same mechanism for those operations.
Overview | Angle | Pixel size | Output dimensions | Rotation center | Translation | Fill value | Rolloff distance
Batch processing | Rotate3D | Flip | Resample2D | Priism
rot3d takes as an input three angles which are the rotations to be applied to the x'', y', and z coordinate axes. The angles are assumed to be in degrees. The sign convention is:
When only rotating about the z axis, this sign convention is opposite of that used in Resample2D.
The point which remains fixed during the rotation is set by the rotation center. By default, it is the geometric center of the selected input region.
The rotation angles are specified on the command line with
-ang=xrot:yrot:zrot
where zrot is the rotation about the z axis and is applied first;
yrot is the rotation about the rotated y axis and is applied
second, and xrot is the rotation about the rotated x axis and is
applied last. When the -ang option is not supplied, the rotation
angles are assumed to be zero.
In rot3d_i, the angles are specified in the Rotation angles(x,y,z) field where xrot is the first value, yrot is the second, and zrot is the last.
Overview | Angle | Pixel size | Output dimensions | Rotation center | Translation | Fill value | Rolloff distance
For rot3d, the pixel spacing in the output is set by
-delo=xdel:ydel:zdel.
The units on the spacings are the same as for the input file. When the
-delo option is not supplied the output file has the same
pixel spacing as the input file.
In rot3d_i the output pixel spacings are set in the Output pixel size (x,y,z) field. Each time a new input file is loaded, the values are reset so they are the same as the new input spacings.
Overview | Angle | Pixel size | Output dimensions | Rotation center | Translation | Fill value | Rolloff distance
The x, y, and z sizes (in pixels) of the output file are set by the
-out=nx:ny:nz
option to rot3d. When nx is zero or the -out
option is not supplied, rot3d will choose an output volume which contains
the entire input volume.
In rot3d_i, the output dimensions are set from the Special Parameters dialog. When the Autosize toggle is on, the output volume is sized so that it contains the entire input volume; otherwise, the three values in the field below the toggle set the x, y, and z sizes in pixels.
Overview | Angle | Pixel size | Output dimensions | Rotation center | Translation | Fill value | Rolloff distance
The rotation center is the point which remains fixed during the rotation, and, unless a non-zero translation is applied, it is the point at the center of the output volume.
If the input region has only one wavelength and one time point, you
have the option to use the center of intensity of the input volume as
the center for rotation. To have this done, supply the -cofi
option to rot3d or turn on the toggle labeled Use center of intensity
in the Special Parameters dialog of rot3d_i.
When the option to rotate about the center of intensity is not used,
the center of rotation is set by the
-cenxyz=xcen:ycen:zcen
option to rot3d or, for rot3d_i, the three values shown in the field just
below the toggle labeled Use center of intensity. By default,
the point used as the center of rotation is the geometric center of the
selected input region. As a word of caution, rot3d_i and rot3d use
different conventions for specifying the center of rotation. In rot3d_i,
as in Rotate3D, the center is specified in
pixel coordinates relative to the entire input file and not just the
region selected for processing (i.e. (0, 0, 0) is the lower lefhand corner
of the bottommost z stack in the input file and (nx,ny,nz) where nx, ny, nz
are the full sizes of the input file is the upper righthand corner of the
topmost z stack in the input file). rot3d uses the pixel coordinates
relative to the selected input region. The conversion between the two
is straighforward, to convert the center as specified in rot3d_i or
Rotate3D to the center used by rot3d, simply subtract the coordinates for
the starting point of the innput region processed.
In rot3d_i, the values in the center of rotation field are reset to the center of the input region each time a new input file is loaded or a new region is selected.
Overview | Angle | Pixel size | Output dimensions | Rotation center | Translation | Fill value | Rolloff distance
Both rot3d and rot3d_i have the option to displace the geometric center
of the output volume from the rotation center. For rot3d, the displacements
is specified with the option, -tran=xoff:yoff:zoff.
For rot3d_i, the displacements are set from the Translation (x,y,z)
field in the Special Parameters dialog. For both, the displacements
are measured in units of output pixels and the default displacements are zero
in each direction.
Overview | Angle | Pixel size | Output dimensions | Rotation center | Translation | Fill value | Rolloff distance
In the output volume, points which map to back to points outside of the
input and more than the rolloff distance from
the input volume's edges, are filled with a fixed value. This value
is either an average of the pixels on the edge of the input volume
(when the option -perim is supplied to rot3d or, for rot3d_i,
when the toggle in the Special Parameters dialog labeled
Use perimeter average is on) or it is a value supplied by the
user. The user-supplied value is set with the rot3d option
-fill=real_part:imag_part
or, in rot3d_i, the values below the toggle for using the perimeter average.
In both cases, the option to use the perimeter average always overrides the
user-specified fill value and the imaginary part of the fill value is only
used when the output data is complex.
Overview | Angle | Pixel size | Output dimensions | Rotation center | Translation | Fill value | Rolloff distance
In the output volume, points which map back to points that are outside of the input volume but which are within the rolloff distance of the input volume's edges have their values calculated from a linearly weighting of the fill value and the value interpolated at the closest point which maps back to a point in the input volume.
The rolloff distance is measured in the same units as are used for the input data's pixel spacing. The interpolation algorithm employed is more efficient (~25%) when the rolloff distance is zero.
On the command line for rot3d, the rolloff distance is set with
-roll_dist=r.
Overview | Angle | Pixel size | Output dimensions | Rotation center | Translation | Fill value | Rolloff distance