Compute the axis-aligned foreground bounding box of a 3D volume, i.e. the inner foreground area that must be retained if you want to remove all background from the corners of the volume. The foreground is determined by thresholding, such that all values greater than 0 are considered foreground. See vol.boundary.mask for details.
Arguments
- volume
a 3D image volume
- threshold
numerical, the threshold intensity used to separate background and foreground. All voxels with intensity values greater than this value will be considered
foregroundvoxels.- apply
logical, whether to directly apply the bounding box and return the resulting volume instead.
Value
named list with 2 entries: from is an integer vector of length 3, defining the minimal (x,y,z) foreground indices. to is an integer vector of length 3, defining the maximal (x,y,z) foreground indices.
See also
Other volume utility:
vol.imagestack(),
vol.merge(),
vol.overlay.colors.from.activation(),
vol.planes(),
vol.slice()