knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  fig.width = 6,
  out.width = "100%"
)
devtools::load_all(".")

ggsegJHU

Travis build status AppVeyor build status Codecov test coverage

Contains data for ggseg and ggseg3d for the JHU white matter segmentation.

Hua et al. (2008) NeuroImage, 39(1):336-347 pubmed

Installation

You can install the released version of ggsegJHU from CRAN with:

install.packages("ggsegJHU")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("LCBC-UiO/ggsegJHU")

Example

This is a basic example which shows you how to solve a common problem:

library(ggsegJHU)
library(ggseg)

ggseg(atlas = jhu, mapping = aes(fill = region)) +
  scale_fill_brain("jhu", package = "ggsegJHU") +
  theme(legend.position = "bottom",
        legend.text = element_text(size = 7)) +
  guides(fill = guide_legend(ncol = 2))
library(ggseg3d)

ggseg3d(atlas = jhu_3d) %>% 
  add_glassbrain("left") %>% 
  pan_camera("right lateral")
library(ggseg3d)

p <- ggseg3d(atlas = jhu_3d) %>%
  add_glassbrain("left") %>% 
  pan_camera("right lateral") %>%
  plotly::add_annotations( text="Screen capture",
                  legendtitle=TRUE, showarrow=FALSE,
                  font = list(color = "#000000b4",
                              family = 'sans serif',
                              size = 50))
plotly::orca(p, "man/figures/README-3d-plot.png")
knitr::include_graphics("man/figures/README-3d-plot.png")

Please note that the 'ggsegJHU' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.



neuroconductor-releases/ggsegJHU documentation built on Jan. 1, 2021, 11:39 a.m.