Learn R Programming

ANTsR (version 0.3.3)

makeImage: Simple makeImage function.

Description

Make an image with given size and voxel value or given a mask and vector.

Usage

makeImage(imagesize, voxval = 0, spacing = c(NA), origin = c(NA), direction = c(NA), components = 1, pixeltype = "float")

Arguments

imagesize
input image size or mask
voxval
input image value or vector, size of mask
spacing
image spatial resolution
origin
image spatial origin
direction
direction matrix to convert from index to physical space
components
components per pixel
pixeltype
data type of image values

Value

antsImage is output

Examples

Run this code

outimg<-makeImage( c(2,10) , 1)
outimg<-makeImage( outimg ,  c(2,10) )

Run the code above in your browser using DataLab