Package 'niivuer'

Title: 'NiiVue' for R
Description: What the package does (one paragraph).
Authors: Zhengjia Wang [aut, cre]
Maintainer: Zhengjia Wang <[email protected]>
License: MIT + file LICENSE
Version: 0.0.1
Built: 2024-10-31 20:25:48 UTC
Source: https://github.com/dipterix/niivuer

Help Index


'NiiVue' for R

Description

Creates a widget that bridges 'NiiVue', a powerful 3D brain viewer and R-shiny

Usage

niivuer(
  volume_list = list(list(url = "https://niivue.github.io/niivue/images/mni152.nii.gz",
    colormap = "gray"), list(url = "https://niivue.github.io/niivue/images/hippo.nii.gz",
    colormap = "red")),
  mesh_list = list(list(url =
    "https://niivue.github.io/niivue/images/BrainMesh_ICBM152.lh.mz3")),
  viewer_settings = list(setMultiplanarLayout = 2, setSliceMM = TRUE, setSliceType = 4),
  controller_settings = list(),
  ...,
  width = NULL,
  height = NULL,
  elementId = NULL
)

Arguments

volume_list

list of items, each item is a volume file

mesh_list

list of items, each item is a mesh file

viewer_settings

initial call to set viewer status

controller_settings

initial controller settings

...

application settings

width, height

widget size

elementId

passed to createWidget.

Value

A 'niivuer' widget

Examples

if( interactive() ) {

  niivuer()

}

Shiny bindings for 'NiiVue'

Description

Output and render functions for using niivuer within Shiny applications and interactive Rmd documents.

Usage

niivuerOutput(outputId, width = "100%", height = "500px")

renderNiivuer(expr, env = parent.frame(), quoted = FALSE)

Arguments

outputId

output variable to read from

width, height

Must be a valid CSS unit (like '100%', '500px', 'auto') or a number, which will be coerced to a string and have 'px' appended.

expr

An expression that generates a niivuer

env

The environment in which to evaluate expr.

quoted

Is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable.