points2LabelImage: create a label image from landmark coordinates

Description Usage Arguments Value Author(s) Examples

View source: R/points2LabelImage.r

Description

create a label image from landmark coordinates

Usage

1
2
3
points2LabelImage(pts, neighbours = 16, spacing = rep(1, ncol(pts)),
  margin = 0.1, labelcolors = seq_len(nrow(pts)), RAS2IJK = NULL,
  refimage = NULL)

Arguments

pts

k x 2 or k x 3 matrix containing landmark coordinates

neighbours

integer: number of closest points in the image grid to label

spacing

spacing of the output image

margin

margin around the landmarks (determined by the extend of the bounding box) to be part of the image

labelcolors

vector of length nrow(pts) with a color for each landmark label

RAS2IJK

RAS2IJK 4x4 (3D) or 3x3 (2D) matrix with transform from RAS to IJK space (e.g. when landmarks are placed with Slicer).

refimage

optional: project the point label image into the image domain defined by refimage.

Value

returns an antsImage

Author(s)

Schlager S

Examples

1
2
3
4
load(system.file("extdata/landmarks.RData",package="ANTsR"))
fi <- antsImageRead(getANTsRData("r16") ,2)
li <- points2LabelImage(fiLM,refimage=fi,RAS2IJK=diag(c(-1,-1,1)))
plot(fi,list(li),alpha=0.3,add=T)

zarquon42b/RANTs documentation built on Aug. 2, 2019, 6:46 p.m.