Mask Command

The mask command extracts a volume subregion bounded by surfaces and creates a new volume data set.

  mask <volume-id> <surface-id> [axis <x,y,z>] [fullmap] [pad <distance>] [sandwich]

Example

  mask #0 #1,2 axis 0,1,0 fullmap pad 5.0 sandwich

Arguments and Options

Algorithm

The masked volume is computed by looking at intercepts of a line parallel to the projection axis (default z-axis) with the surfaces. If there are N intercept points for a given line, the volume data between the 1st and 2nd, 3rd and 4th, 5th and 6th, ... intercepts are included in the masked volume while those between the 2nd and 3rd, 4th and 5th, ... are excluded. The intercepts are computed for lines through grid points on a rectangular grid perpendicular to the projection axis with grid spacing equal to the minimum grid plane spacing of the volume data set. For each volume voxel the intercepts of the closest grid line are used to determine inclusion in the masked volume. If there are an odd number N of intercept points then points beyond the final intercept are included in the masked volume unless the "sandwich" option is used. The computed volume is a minimal subregion of the original volume containing the surfaces with values set to zero outside the masked region and to the original volume values inside the region. The grid points of the calculated volume align exactly with those of the original volume.

This command currently uses the full size of the original volume data set even if only a subregion is being displayed.

History

October 25, 2007 - Developed for Jeff Triffo to extract layers of EM tomograms between surfaces traced in IMOD.