The goal of ggneuro
is to allow users to create plotting functions for nifti objects. The initial impetus was for plotting brain images
You can install the development version from GitHub with:
# install.packages("devtools")
devtools::install_github("muschellij2/ggneuro")
This is a basic example which shows you how to plot a T1-weighted image
library(kirby21.t1)
library(ggneuro)
library(neurobase)
#> Loading required package: oro.nifti
#> oro.nifti 0.9.4
t1_fname = readnii(get_t1_filenames()[1])
g = ggortho(t1_fname)
class(g)
#> [1] "gg" "ggplot"
print(g)
## basic example code
Not sure if plotly
will work with this well:
library(plotly)
ggplotly(g)