ants_apply_transforms_to_points | R Documentation |
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.
ants_apply_transforms_to_points(
dim,
points,
transformlist,
whichtoinvert = NULL,
verbose = FALSE,
...
)
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 |
Transformed points in data frame (R object)
print(ants$apply_transforms_to_points)
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
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.