ants_apply_transforms_to_points {rpyANTs} | R Documentation |
Apply a transform list to map points from one domain to another
Description
See ants$apply_transforms_to_points
for more details. Please note
point mapping goes the opposite direction of image mapping (see
ants_apply_transforms
), for both reasons of convention and
engineering.
Usage
ants_apply_transforms_to_points(
dim,
points,
transformlist,
whichtoinvert = NULL,
verbose = FALSE,
...
)
Arguments
dim |
dimensions of the transformation |
points |
data frame containing columns |
transformlist |
list of strings (path to transforms) generated by
|
whichtoinvert |
either |
verbose |
whether to verbose application of transform |
... |
ignored |
Value
Transformed points in data frame (R object)
See Also
print(ants$apply_transforms_to_points)
Examples
if(interactive() && ants_available()) {
ants <- load_ants()
fixed <- as_ANTsImage( ants$get_ants_data('r16') )
moving <- as_ANTsImage( ants$get_ants_data('r27') )
reg <- ants_registration(
fixed = fixed, moving = moving,
type_of_transform = "antsRegistrationSyNRepro[a]")
pts <- data.frame(
x = c(128, 127),
y = c(101, 111)
)
ptsw = ants_apply_transforms_to_points(2, pts, reg$fwdtransforms)
ptsw
}
[Package rpyANTs version 0.0.3 Index]