antsTransformPhysicalPointToIndex: Get Index from Spatial Point

Description Usage Arguments Value Examples

View source: R/antsTransformPoints.R

Description

Get index from spatial point of an 'antsImage'.

Usage

1

Arguments

x

Image object of S4 class 'antsImage' to get values from.

point

image physical point

Value

array of pixel values

Examples

1
2
3
4
5
6
7
8
9
img<-makeImage(c(10,10),rnorm(100))
pt<-antsTransformPhysicalPointToIndex(img,c(2,2))
arr = as.array(img)
testthat::expect_error(
antsTransformPhysicalPointToIndex(arr,c(2,2)), "antsImage")
testthat::expect_error(
antsTransformPhysicalPointToIndex(img,c("2",2)), "point must be") 
testthat::expect_error(
antsTransformPhysicalPointToIndex(img,c(2,2,2)), "matrix must be of")

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