subtom_shape
Creates a simple shape of a user-specified type that can be used for masking purposes.
This utility script uses one MATLAB compiled scripts below:
Options
Directories
- scratch_dir
Absolute path to the folder with the input to be processed. Other paths are relative to this one.
- mcr_cache_dir
Absolute path to MCR directory for the processing.
- exec_dir
Directory for executables
Variables
- shape_exec
Shape executable
File Options
- output_fn
Relative path and name of the output volume to write.
- ref_fn
Relative path and name of a reference to apply the mask to, which can be useful for checking. If you want to skip this check just leave it set to “”.
Shape Options
- shape
- The shape to place into the volume. The available options are:
sphere,
sphere_shell
ellipsoid
ellipsoid_shell
cylinder
tube
elliptic_cylinder
elliptic_tube
cuboid
- box_size
Size of the volume in pixels. The volume will be a cube with this side length.
- radius
- For the shapes:
sphere
cylinder
Defines the radius of the shape. If you are not creating one of the listed shapes leave this set to “”.
- inner_radius
- For the shapes:
sphere_shell
tube
Defines the inner radius of the shape. If you are not creating one of the listed shapes leave this set to “”.
- outer_radius
- For the shapes:
sphere_shell
tube
Defines the outer radius of the shape. If you are not creating one of the listed shapes leave this set to “”.
- radius_x
- For the shapes:
ellipsoid
elliptic_cylinder
Defines the radius of the shape about the X-axis. If you are not creating one of the listed shapes leave this set to “”.
- radius_y
- For the shapes:
ellipsoid
elliptic_cylinder
Defines the radius of the shape about the Y-axis. If you are not creating one of the listed shapes leave this set to “”.
- radius_z
- For the shapes:
ellipsoid
elliptic_cylinder
Defines the radius of the shape about the Z-axis. If you are not creating one of the listed shapes leave this set to “”.
- inner_radius_x
- For the shapes:
ellipsoid_shell
elliptic_tube
Defines the inner radius of the shape about the X-axis. If you are not creating one of the listed shapes leave this set to “”.
- inner_radius_y
- For the shapes:
ellipsoid_shell
elliptic_tube
Defines the inner radius of the shape about the Y-axis. If you are not creating one of the listed shapes leave this set to “”.
- inner_radius_z
- For the shapes:
ellipsoid_shell
elliptic_tube
Defines the inner radius of the shape about the Z-axis. If you are not creating one of the listed shapes leave this set to “”.
- outer_radius_x
- For the shapes:
ellipsoid_shell
elliptic_tube
Defines the outer radius of the shape about the X-axis. If you are not creating one of the listed shapes leave this set to “”.
- outer_radius_y
- For the shapes:
ellipsoid_shell
elliptic_tube
Defines the outer radius of the shape about the Y-axis. If you are not creating one of the listed shapes leave this set to “”.
- outer_radius_z
- For the shapes:
ellipsoid_shell
elliptic_tube
Defines the outer radius of the shape about the Z-axis. If you are not creating one of the listed shapes leave this set to “”.
- length_x
- For the shape:
cuboid
Defines the length of the cuboid about the X-axis. If you are not creating one of the listed shapes leave this set to “”.
- length_y
- For the shape:
cuboid
Defines the length of the cuboid about the Y-axis. If you are not creating one of the listed shapes leave this set to “”.
- length_z
- For the shape:
cuboid
Defines the length of the cuboid about the Z-axis. If you are not creating one of the listed shapes leave this set to “”.
- height
- For the shape:
cylinder
tube
elliptic_cylinder
elliptic_tube
Defines the height of the shape. If you are not creating one of the listed shapes leave this set to “”.
- center_x
For all shapes. Defines the X-coordinate of the center of the shape. The default center is defined as:
center_x = floor(box_size / 2) + 1;
If you do not want to modify the default value leave this set to “”.
- center_y
For all shapes. Defines the Y-coordinate of the center of the shape. The default center is defined as:
center_y = floor(box_size / 2) + 1;
If you do not want to modify the default value leave this set to “”.
- center_z
For all shapes. Defines the Z-coordinate of the center of the shape. The default center is defined as:
center_z = floor(box_size / 2) + 1;
If you do not want to modify the default value leave this set to “”.
- shift_x
For all shapes. Defines a shift along the X-axis after any given rotations. This shift is part of an affine transformation about the given center that is applied to the coordinates before the shape is determined. If you do not want to modify the default value leave this set to “”.
- shift_y
For all shapes. Defines a shift along the Y-axis after any given rotations. This shift is part of an affine transformation about the given center that is applied to the coordinates before the shape is determined. If you do not want to modify the default value leave this set to “”.
- shift_z
For all shapes. Defines a shift along the Z-axis after any given rotations. This shift is part of an affine transformation about the given center that is applied to the coordinates before the shape is determined. If you do not want to modify the default value leave this set to “”.
- rotate_phi
For all shapes. Defines an inplane rotation about the Z-axis. This rotation is part of an affine transformation about the given center that is applied to the coordinates before the shape is determined. If you do not want to modify the default value leave this set to “”.
- rotate_psi
For all shapes. Defines an azimuthal rotation about the Z-axis. This rotation is part of an affine transformation about the given center that is applied to the coordinates before the shape is determined. If you do not want to modify the default value leave this set to “”.
- rotate_theta
For all shapes. Defines a zenithal rotation about the X-axis. This rotation is part of an affine transformation about the given center that is applied to the coordinates before the shape is determined. If you do not want to modify the default value leave this set to “”.
- sigma
For all shapes. Defines the sigma of a Gaussian falloff away from the hard edges of the shape. If you do not want to modify the default value leave this set to “”.
Example
scratch_dir="${PWD}"
mcr_cache_dir="${scratch_dir}/mcr"
exec_dir="/net/dstore2/teraraid/dmorado/software/subTOM/bin"
shape_exec="${exec_dir}/utils/subtom_shape"
output_fn="otherinputs/mask.em"
ref_fn="ref/ref_1.em"
shape="sphere"
box_size="128"
radius="32"
inner_radius=""
outer_radius=""
radius_x=""
radius_y=""
radius_z=""
inner_radius_x=""
inner_radius_y=""
inner_radius_z=""
outer_radius_x=""
outer_radius_y=""
outer_radius_z=""
length_x=""
length_y=""
length_z=""
height=""
center_x=""
center_y=""
center_z=""
shift_x=""
shift_y=""
shift_z=""
rotate_phi=""
rotate_psi=""
rotate_theta=""
sigma="3"