dilate_mask_vol | R Documentation |
Dilate a volumetric mask by a certain number of voxel layers. For each layer, any out-of-mask voxel adjacent to at least one in-mask voxel is added to the mask.
dilate_mask_vol(vol, n_dilate = 1, out_of_mask_val = NA, new_val = 1)
vol |
The 3D array to dilate. The mask to dilate is defined by all
values not in |
n_dilate |
The number of layers to dilate the mask by. Default:
|
out_of_mask_val |
A voxel is not included in the mask if and only if its
value is in this vector. Default: |
new_val |
Value for voxels newly added to the mask. Default: |
Diagonal voxels are not considered adjacent, i.e. the voxel at (0,0,0) is not adjacent to the voxels at (1,1,0) or (1,1,1), although it is adjacent to (1,0,0).
The dilated vol
. It is the same as vol
, but dilated
voxels are replaced with new_val
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.