eigSeg: Segmentation for eigenanatomy.

View source: R/eigSeg.R

eigSegR Documentation

Segmentation for eigenanatomy.

Description

Segment a mask into regions based on the max value in an image list. At a given voxel the segmentation label will contain the index to the image that has the largest value. If the 3rd image has the greatest value, the segmentation label will be 3 at that voxel.

Usage

eigSeg(
  mask = NULL,
  imgList = NA,
  applySegmentationToImages = FALSE,
  cthresh = 0,
  smooth = 1
)

Arguments

mask

D-dimensional mask > 0 defining segmentation region.

imgList

list containing antsImages or a matrix matching the mask.

applySegmentationToImages

boolean determines if original image list is modified by the segmentation.

cthresh

throw away isolated clusters smaller than this value

smooth

smooth the input data first by this value

Value

segmentation image.

Author(s)

Avants BB

Examples

mylist <- list(
  antsImageRead(getANTsRData("r16")),
  antsImageRead(getANTsRData("r27")),
  antsImageRead(getANTsRData("r85"))
)
mat <- imageListToMatrix(mylist, getMask(mylist[[1]]))
myseg <- eigSeg(getMask(mylist[[1]]), mat)


stnava/ANTsR documentation built on April 16, 2024, 12:17 a.m.