-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
97 lines (76 loc) · 2.62 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
fig.width = 6,
out.width = "100%",
fig.retina = 3
)
```
# ggsegJHU <img src='man/figures/logo.png' align="right" height="138.5" />
<!-- badges: start -->
[![DOI](https://zenodo.org/badge/250280074.svg)](https://zenodo.org/badge/latestdoi/250280074)
[![Codecov test coverage](https://codecov.io/gh/LCBC-UiO/ggsegJHU/branch/master/graph/badge.svg)](https://codecov.io/gh/LCBC-UiO/ggsegJHU?branch=master)
[![R build status](https://github.com/LCBC-UiO/ggsegJHU/workflows/R-CMD-check/badge.svg)](https://github.com/LCBC-UiO/ggsegJHU/actions)
<!-- badges: end -->
Contains data for ggseg and ggseg3d for the JHU white matter segmentation.
Hua et al. (2008) NeuroImage, 39(1):336-347 [pubmed](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2724595/)
## Installation
We recommend installing the ggseg-atlases through the ggseg [r-universe](https://ggseg.r-universe.dev/ui#builds):
```{r eval = FALSE}
# Enable this universe
options(repos = c(
ggseg = 'https://ggseg.r-universe.dev',
CRAN = 'https://cloud.r-project.org'))
# Install some packages
install.packages('ggsegJHU')
```
You can install the development version from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("LCBC-UiO/ggsegJHU")
```
## Example
This is a basic example which shows you how to solve a common problem:
```{r}
library(ggsegJHU)
```
```{r, fig.height=6}
library(ggseg)
library(ggplot2)
plot(jhu) +
theme(legend.position = "bottom",
legend.text = element_text(size = 7)) +
guides(fill = guide_legend(ncol = 2))
```
```{r "noneval", eval=FALSE}
library(ggseg3d)
library(dplyr)
ggseg3d(atlas = jhu_3d) %>%
add_glassbrain("left") %>%
pan_camera("right lateral")
```
```{r "orca", include=FALSE}
library(ggseg3d)
library(dplyr)
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")
```
```{r "incl", echo=FALSE}
knitr::include_graphics("man/figures/README-3d-plot.png")
```
Please note that the 'ggsegJHU' project is released with a
[Contributor Code of Conduct](CODE_OF_CONDUCT.md).
By contributing to this project, you agree to abide by its terms.