Learn R Programming

ANTsR (version 0.3.1)

splitChannels: split a multichannel antsImage

Description

split a multichannel antsImage into a list of scalar antsImages

Usage

splitChannels(image)

Arguments

image

a multichannel antsImage to split

Value

list of scalar antsImages

Examples

Run this code
# NOT RUN {
r <- floor( seq(1:(64*64)) / (64*64) * 255 )
 dim(r) <- c(64,64)
 r <- as.antsImage(r)
 g <- r*0
 b <- r*0
 rgbImage = mergeChannels( list(r,g,b) )
 imgList = splitChannels( rgbImage )
# }

Run the code above in your browser using DataLab