makeImage: Simple makeImage function.

Description Usage Arguments Value Author(s) Examples

Description

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

Usage

1
2
makeImage(imagesize, voxval = 0, spacing = c(NA), origin = c(NA),
  direction = c(NA), components = FALSE, 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

whether there are components per pixel or not

pixeltype

data type of image values

Value

antsImage is output

Author(s)

Avants BB

Examples

1
2
3
outimg<-makeImage( c(2,10) , 1)
outimg<-makeImage( outimg ,  c(2,10) )
testthat::expect_error(makeImage(outimg, c(2,10), components = 2))

muschellij2/atropos documentation built on May 4, 2019, 3:17 p.m.