cleanStack: Clean Image Stack

View source: R/cleanStack.R

cleanStackR Documentation

Clean Image Stack

Description

Delete single pixels or isolated pixel islands from an image stack. The pixels are checked in 3D (voxels).

Usage

cleanStack(Stack, nvoxel = 0)

Arguments

Stack

a binary image stack object

nvoxel

maximum number of 3D pixels (voxels) considered as isolated islands

Details

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.

Value

An array of the same dimension as Stack with 3D pixel islands removed.

Author(s)

Alessio Veneziano


AlessioVeneziano/IndianaBones documentation built on Dec. 2, 2022, 7:35 a.m.