cleanStack | R Documentation |
Delete single pixels or isolated pixel islands from an image stack. The pixels are checked in 3D (voxels).
cleanStack(Stack, nvoxel = 0)
Stack |
a binary image stack object |
nvoxel |
maximum number of 3D pixels (voxels) considered as isolated islands |
cleanStack
uses the 'connected component' algorithm (using the function components
in the package 'mmand') to find isolated pixel islands in the 3D volume of the image stack. The islands are then deleted from the stack.
The function works on binary images, assuming that background pixels are of value '0'. cleanStack
checks the neighborhood of 3D pixels (voxels) to find clusters that are disconnected from other pixels. The 26 neighbors of each 3D pixels
are checked using a 'box' kernel defined within the function. The argument nvoxel
specifies the maximum number of 3D pixels that are considered an island: islands consisting of a number of 3D pixels lower or equal to nvoxel
are
deleted. When nvoxel
has value '0' (default) all but the largest pixel island are removed.
An array of the same dimension as Stack
with 3D pixel islands removed.
Alessio Veneziano
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.