antsImageRead: Image Read

Description Usage Arguments Value Author(s) See Also Examples

View source: R/antsImageRead.R

Description

Read an image file into an S4 object of class 'antsImage'.

Usage

1
antsImageRead(filename, dimension = NULL, pixeltype = "float")

Arguments

filename

Name of the file to read the image from.

dimension

Number of dimensions of the image read. This need not be the same as the dimensions of the image in the file. Allowed values: 2, 3, 4. If not provided, the dimension is obtained from the image file

pixeltype

C++ datatype to be used to represent the pixels read. This datatype need not be the same as the datatype used in the file. Allowed values: 'double', 'float' , 'unsigned int' , 'unsigned char'.

Value

S4 object of Class 'antsImage' – Success
1 – Failure

Author(s)

Shrinidhi KL

See Also

antsImageWrite

Examples

1
2
3
4
fn <- getANTsRData( "r16" )
fi <- antsImageRead( fn )
img <- antsImageRead( fn , dimension = 2  )
img <- antsImageRead( fn , dimension = 2 , 'double' )

muschellij2/atropos documentation built on Oct. 11, 2018, 12:24 a.m.