imageFileNames2ImageList: Simple imageFileNames2ImageListing function.

View source: R/imageFileNames2ImageList.R

imageFileNames2ImageListR Documentation

Simple imageFileNames2ImageListing function.

Description

ImageFileNames2ImageLists converts the input list of file names to a list containing antsImages.

Usage

imageFileNames2ImageList(x)

Arguments

x

input file name list

Value

a list containing the images this : mylist<-list( img1, img2 , etcetera ) is the

Author(s)

Avants BB, Kandel BM

Examples

dir <- paste(tempdir(), .Platform$file.sep, sep = "")
img <- makeImage(c(4, 4))
for (ii in 1:6) {
  antsImageWrite(img, paste(dir, "image", ii, ".nii.gz", sep = ""))
}
imagenames <- list.files(dir, glob2rx("*.nii.gz"), full.names = TRUE)
images <- imageFileNames2ImageList(imagenames)


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