makeImage.Rd
Make an image with given size and voxel value or given a mask and vector.
input image size or mask
input image value or vector, size of mask
image spatial resolution
image spatial origin
direction matrix to convert from index to physical space
whether there are components per pixel or not
data type of image values
antsImage is output
outimg <- makeImage(c(2, 10), 1)
outimg <- makeImage(outimg, c(2, 10))
#> Warning: Number of voxels not the same as the positive values
testthat::expect_error(makeImage(outimg, c(2, 10), components = 2))