papaya.RdWraps a widget for the Papaya JavaScript library
papaya(
img = NULL,
elementId = NULL,
width = NULL,
height = NULL,
options = NULL,
sync_view = FALSE,
hide_toolbar = FALSE,
hide_controls = FALSE,
orthogonal = TRUE,
interpolation = TRUE,
title = NULL
)Vector of character file names or list of nifti images
ID for the element in the DOM
Width of the widget
height of the widget
to pass to papaya widget. Should be a list with
the same number of elements as images passed in. Options can
be generated using papayaOptions
should the view be synced to other Papaya viewers?
Hide the toolbar for this viewer?
Hide the controls (increment) for this viewer?
Should an orthogonal view be displayed (TRUE)
versus just a slice (FALSE).
Should smoothing/interpolation be done in the viewer?
This can be overridden if individual image options set interpolation
as well
the title for the overlay itself
papaya(interpolation = TRUE)
papaya(interpolation = FALSE)
img = kirby21.t1::get_t1_filenames()[1]
papaya(img, options = papayaOptions(min = 0, max = 8e5))
papaya(c(img, img),
options = list(papayaOptions(alpha = 0.5),
papayaOptions(alpha = 0.5, lut = "Red Overlay"))
)
if (FALSE) { # \dontrun{
papaya(img, options = papayaOptions(min = 0, max = 8e5))
papaya(c(img, img),
options = list(papayaOptions(alpha = 0.5),
papayaOptions(alpha = 0.5, lut = "Red Overlay"))
)
nii = neurobase::readnii(img)
nii = nii < 3e5 & nii > 1e5
papaya(list(img, nii), options = list(list(), papayaOptions(interpolation = FALSE)))
} # }