get_plane: Define a plane given slope, rotation, and intercept

Description Usage Arguments Details Value Examples

View source: R/utils.R

Description

This is a special-purpose utility function for translating "user friendly" input values from Shiny app into a rotation+translation matrix. The function accounts for the ideosyncratic definition of slope (which is defined relative to a 2D plane where x=z and y=y in atlas space), rotation (which is specifically around the Inferior-Superior axis), and intercept (which is where the plane crosses the Anterior-Posterior axis when x=z=0) when creating this matrix.

Usage

1
get_plane(slope, rotation, intercept)

Arguments

slope

Slope parameter from the Shiny interface

rotation

Rotation parameter from the Shiny interface (degrees)

intercept

Intercept parameter from the Shiny interface (point along AP axis)

Details

The function returns a list containing the normal and origin of the plane as 3D vectors.

Value

Atlas with roi_boundary_x,y,z columns defining the plane.

Examples

1
2
3
4
5
## Not run: 
input <- list(slope=1,rotation=45, intercept=10)
get_plane(input$slope, input$rotation, input$intercept)

## End(Not run)

crcox/ShinyATLROI documentation built on May 14, 2019, 11:33 a.m.