Package: ggbrain 0.8.1

ggbrain: Create Images of Volumetric Brain Data in NIfTI Format Using 'ggplot2' Syntax

A 'ggplot2'-consistent approach to generating 2D displays of volumetric brain imaging data. Display data from multiple NIfTI images using standard 'ggplot2' conventions such scales, limits, and themes to control the appearance of displays. The resulting plots are returned as 'patchwork' objects, inheriting from 'ggplot', allowing for any standard modifications of display aesthetics supported by 'ggplot2'.

Authors:Michael Hallquist [aut, cre]

ggbrain_0.8.1.tar.gz
ggbrain_0.8.1.zip(r-4.5)ggbrain_0.8.1.zip(r-4.4)ggbrain_0.8.1.zip(r-4.3)
ggbrain_0.8.1.tgz(r-4.4-x86_64)ggbrain_0.8.1.tgz(r-4.4-arm64)ggbrain_0.8.1.tgz(r-4.3-arm64)ggbrain_0.8.1.tgz(r-4.3-x86_64)
ggbrain_0.8.1.tar.gz(r-4.5-noble)ggbrain_0.8.1.tar.gz(r-4.4-noble)
ggbrain.pdf |ggbrain.html
ggbrain/json (API)
NEWS

# Install 'ggbrain' in R:
install.packages('ggbrain', repos = c('https://michaelhallquist.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/michaelhallquist/ggbrain/issues

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

25 exports 2 stars 0.85 score 54 dependencies 14 scripts 338 downloads

Last updated 1 years agofrom:3e85fdf43b. Checks:OK: 9. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 08 2024
R-4.5-win-x86_64OKSep 08 2024
R-4.5-linux-x86_64OKSep 08 2024
R-4.4-win-x86_64OKSep 08 2024
R-4.4-mac-x86_64OKSep 08 2024
R-4.4-mac-aarch64OKAug 09 2024
R-4.3-win-x86_64OKSep 08 2024
R-4.3-mac-aarch64OKSep 08 2024
R-4.3-mac-x86_64OKAug 09 2024

Exports:annotate_coordinatesannotate_paneldefinegeom_braingeom_outlinegeom_region_labelgeom_region_label_repelgeom_region_textgeom_region_text_repelggbrainggbrain_imagesggbrain_labelggbrain_layerggbrain_layer_brainggbrain_layer_outlineggbrain_panelggbrain_plotimagesinteger_breaksmontagenn_imputerange_breaksrenderscale_fill_bisidedslices

Dependencies:backportsbmpcheckmateclicolorspacecpp11data.tabledigestdownloaderdplyrfansifarvergenericsggnewscaleggplot2ggrepelgluegtableigraphimagerisobandjpeglabelinglatticelifecyclemagrittrMASSMatrixmgcvmunsellnlmepatchworkpillarpkgconfigpngpurrrR6RColorBrewerRcppRcppArmadilloreadbitmaprlangRNiftiscalesstringistringrtibbletidyrtidyselecttiffutf8vctrsviridisLitewithr

Aesthetic refinements of ggbrain plots

Rendered fromggbrain_aesthetics.Rmdusingknitr::rmarkdownon Sep 08 2024.

Last update: 2022-10-19
Started: 2022-10-12

Introduction to ggbrain

Rendered fromggbrain_introduction.Rmdusingknitr::rmarkdownon Sep 08 2024.

Last update: 2023-02-16
Started: 2022-07-28

Working with annotations and labels in ggbrain

Rendered fromggbrain_labels.Rmdusingknitr::rmarkdownon Sep 08 2024.

Last update: 2023-06-22
Started: 2023-06-16

Readme and manuals

Help Manual

Help pageTopics
addition operator for ggb object to support ggplot-like syntax+.ggb
addition operator for combining ggbrain_images objects+.ggbrain_images
Adds the coordinate labels to each panel based on the location of the slice along the slicing axis (e.g., z = 15)annotate_coordinates
Adds custom annotations to a single panel on the ggbrain plotannotate_panel
This function counts the number of neighboring/touching pixels in a 2D binary imagecount_neighbors
Adds contrast definitions to the ggbrain plotdefine
This function finds holes by flood filling TRUE into a 2D binary image, starting from the edgefill_from_edge
This function finds 'threads' hanging off of the edges of blobs in an image, allowing the user to trim themfind_threads
This function flood fills a binary image with TRUE for any value of FALSEflood_fill
Adds a raster layer to the ggbrain plot, displaying pixels from the specified layer definitiongeom_brain
Adds an outline layer to the ggbrain plot, displaying outlines from the non-missing pixels in the specified layer definitiongeom_outline
Variant of geom_label used for plotting region labels on slicesgeom_region_label
Variant of geom_label_repel used for plotting region labels on slices with separation from other labelsgeom_region_label_repel
Variant of geom_text used for plotting region labels on slicesgeom_region_text
Variant of geom_text_repel used for plotting region labels on slices with separation from other labelsgeom_region_text_repel
create ggb container object for a given plotggbrain
R6 class for compiling images to render in ggplotggbrain_images
R6 class for adding labels to a ggbrain_panelggbrain_label
R6 class for a single layer of a ggbrain panelggbrain_layer
R6 class for a single layer of a ggbrain panel using fill geomggbrain_layer_brain
R6 class for a single layer of a ggbrain panel using outline geomggbrain_layer_outline
R6 class for a single panel of a ggbrain imageggbrain_panel
An R6 class for constructing a ggbrain plot from a ggbrain_slices objectggbrain_plot
S3 method to support adding ggbrain_label objects to an existing ggplot objectggplot_add.ggbrain_label
S3 method to support adding ggbrain_layer objects to an existing ggplot objectggplot_add.ggbrain_layer
S3 method to support adding ggbrain_layer objects to an existing ggplot objectggplot_add.ggbrain_panel
Add images to a ggbrain objectimages
breaks function to encourage integer-valued breaks, based on input from prettyinteger_breaks
Convenience function to add many slices in a montage along one of the 3D planesmontage
Imputes missing values in a 2D matrix based on the nearest non-missing neighbors in a given radiusnn_impute
S3 method to allow for plot() syntax with ggbrain (ggb) objectsplot.ggb
S3 method to allow for plot() syntax with ggbrain_panel objectsplot.ggbrain_panel
S3 method to allow for plot() syntax with ggbrain_panel objectsplot.ggbrain_plot
breaks function for including min + max with labels, and a few unlabeled ticks in betweenrange_breaks
Function to convert 'ggb' object to ggplot/patchwork objectrender
scale for plotting separate color gradients for positive and negative valuesscale_fill_bisided
Adds slices to the ggbrain plot, including additional panel aestheticsslices