The mask command extracts a volume data subregion bounded by surfaces (details...). All kinds of surface models can be used, but not surfaces in VRML models. A new data set with values of zero in the masked-out areas will be generated, and can be saved to a file using Volume Viewer or the command volume. See also: vop, shape, segment, Segment Map, Fit to Segments, Icosahedron Surface, Volume Eraser, Volume Tracer
Volume-model can be the model number (preceded by #) of the input volume data set, or the word ones to indicate a map with all values set to 1. The spacing and border options only apply when the volume data is specified as ones.
Surf-models specifies the bounding surface(s) and can be one or more comma-separated model numbers (preceded by #) or the word sel to indicate the currently selected surfaces or surface pieces.
Projection axis vector (default is along the data Y axis: 0,1,0). This is relevant when the surfaces have holes. The region between surface layers is computed along the specified axis (see algorithm). Vector coordinates x,y,z are relative to the untransformed data. The vector can point in any direction (need not be parallel to the X, Y, or Z axis) and need not be of unit length.
fullmap true | false
Make the masked volume data set have the same dimensions as the original volume data set. The full size of the original volume data set is used even if only a subregion is being displayed. Otherwise, the bounds will be set as small as possible to enclose the surfaces, and the masked volume may be smaller. If the input volume is specified as ones (which has no defined dimensions), the border option applies instead.
Before computing the masked volume, move the surface by the specified distance along the surface normals. This allows extracting a larger or smaller region than is enclosed by the original surface. Positive or negative values can be used, and the units of length are the same as for the data (generally Å or nm).
slab width | d1,d2
Extract a slab of data around a surface layer. Two additional surfaces, displaced as specified from the existing surface and joined at their edges (if any), are computed but not displayed. Data for voxels between the computed surfaces are retained. If a single value (width) is supplied, the two computed surfaces are offset along the normals of the original surface by ±½(width). Alternatively, two values separated by a comma but no spaces can be used to specify the offsets of the two surfaces independently. Positive or negative values can be used, and the units of length are the same as for the data (generally Å or nm). The basic algorithm applies, except that the original surface is replaced by the pair of computed surfaces.
sandwich true | false
Include only volume voxels lying between two surface layers. Otherwise, the volume projected along the axis beyond a single surface layer will also be included (see algorithm).
fillOverlap true | false
When multiple surface pieces are specified, retain the union of the values from masking to each piece separately. For example, if two surface pieces are concentric spheres, fillOverlap true will return values for all grid points within the larger sphere, whereas fillOverlap false will return values for only those points in the shell between the two surfaces.
invertMask true | false
Include the opposite data, the spatial complement of what would otherwise be included.
spacing S | Sx,Sy,Sz
Grid spacing for the output map when the input volume is specified as ones (default 1% of the maximum of the X, Y, and Z dimensions of the bounding surfaces); otherwise, the spacing will be the same as for the input map. The spacing is specified in units of length, typically Å. If a single number is supplied, it is used in all three directions; if three numbers are supplied (separated by commas but not spaces), they are used in the X, Y, and Z directions, respectively.
How far out from the bounding surfaces in all six directions (±X, ±Y, ±Z) to place the edge of the output map when the input volume is specified as ones; otherwise, the bounds will be set as described for the fullmap option. The border distance B is specified in units of length, typically Å (default 0.0).
The masked volume is computed by looking at intercepts of lines parallel to the projection axis with the surfaces. 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 (unless multiple surface pieces are used and fillOverlap is set to true). The intercepts are computed for lines through points on a rectangular grid normal to the projection axis with 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 is an odd number of intercept points, then points beyond the final intercept are included in the masked volume unless the sandwich option is used. In the new data set, values outside the masked region are set to zero and those inside are set to the original volume values. The grid points of the calculated volume align exactly with those of the original volume. By default, the bounds are set to minimally enclose the surfaces (but see the fullmap and border options). The full size of the original volume data set is used even if only a subregion is being displayed.