segmentShapeFromImage: convolution-based shape identification

Description Usage Arguments Value Author(s) Examples

View source: R/segmentShapeFromImage.R

Description

takes an image and a shape and relates the 2nd with the first to yield a feature image - the function is user modifiable but defaults to cor

Usage

1
2
segmentShapeFromImage(img, shape, mask = NA, rad = NA, scfun,
  maskZeroes = TRUE)

Arguments

img

antsImage

shape

to define features

mask

with values 1 or 0

rad

max radius ( optional, not recommended )

scfun

function to apply to create feature image (defaults to cor)

maskZeroes

if TRUE (default), zeroes will not influence the result

Value

feature image

Author(s)

Brian B. Avants

Examples

1
2
3
4
5
6
7
8
set.seed(123)
fi<-makeImage(c(20,20),rnorm(400,mean=1,sd=0.1))
mask<-getMask(fi,0.8,Inf,0)
segs<-kmeansSegmentation( fi ,3 , mask)$segmentation
segs[ segs != 1 ]<-0
shp<-labelClusters( segs,1)
shp[ shp != 1 ]<-0
fimg<-segmentShapeFromImage(fi,shp,mask)

neuroconductor-devel/ANTsR documentation built on March 8, 2019, 2:13 a.m.