Package: threeBrain 1.2.0.9000

Zhengjia Wang

threeBrain: Your Advanced 3D Brain Visualization

A fast, interactive cross-platform, and easy to share 'WebGL'-based 3D brain viewer that visualizes 'FreeSurfer' and/or 'AFNI/SUMA' surfaces. The viewer widget can be either standalone or embedded into 'R-shiny' applications. The standalone version only require a web browser with 'WebGL2' support (for example, 'Chrome', 'Firefox', 'Safari'), and can be inserted into any websites. The 'R-shiny' support allows the 3D viewer to be dynamically generated from reactive user inputs. Please check the publication by Wang, Magnotti, Zhang, and Beauchamp (2023, <doi:10.1523/ENEURO.0328-23.2023>) for electrode localization. This viewer has been fully adopted by 'RAVE' <https://openwetware.org/wiki/RAVE>, an interactive toolbox to analyze 'iEEG' data by Magnotti, Wang, and Beauchamp (2020, <doi:10.1016/j.neuroimage.2020.117341>). Please check 'citation("threeBrain")' for details.

Authors:Zhengjia Wang [aut, cre, cph], John Magnotti [ctb, res], Xiang Zhang [ctb, res], Brian Metzger [res], Elizabeth Nesbitt [res], Meng Li [ths], Michael Beauchamp [ths, ctb, dtc]

threeBrain_1.2.0.9000.tar.gz
threeBrain_1.2.0.9000.zip(r-4.5)threeBrain_1.2.0.9000.zip(r-4.4)threeBrain_1.2.0.9000.zip(r-4.3)
threeBrain_1.2.0.9000.tgz(r-4.4-any)threeBrain_1.2.0.9000.tgz(r-4.3-any)
threeBrain_1.2.0.9000.tar.gz(r-4.5-noble)threeBrain_1.2.0.9000.tar.gz(r-4.4-noble)
threeBrain_1.2.0.9000.tgz(r-4.4-emscripten)threeBrain_1.2.0.9000.tgz(r-4.3-emscripten)
threeBrain.pdf |threeBrain.html
threeBrain/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/dipterix/threebrain/issues

On CRAN:

brainecogelectroencephalographyieeglocalizationmri-brainneuroimagingtemplate-brains

8.19 score 42 stars 1 packages 37 scripts 468 downloads 76 exports 65 dependencies

Last updated 6 days agofrom:fa452b72b2. Checks:OK: 7. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 19 2024
R-4.5-winOKNov 19 2024
R-4.5-linuxOKNov 19 2024
R-4.4-winOKNov 19 2024
R-4.4-macOKNov 19 2024
R-4.3-winOKNov 19 2024
R-4.3-macOKNov 19 2024

Exports:AbstractGeomadd_niftiadd_voxel_cubeavailable_templatesBlankGeombrain_proxybrain_setupcalculate_rotationcheck_freesurfer_pathconform_volumecreate_colormapcreate_groupcreate_voxel_cubecross_prodDataCubeGeomDataCubeGeom2default_template_directorydownload_N27download_template_subjectFreeGeomfreeserfer_colormapfreesurfer_brainfreesurfer_brain2freesurfer_lutgenerate_smooth_envelopegenerate_subcortical_surfacegeom_freemeshgeom_sphereGeomGroupget_ijk2rasimport_from_freesurferimport_fsimport_sumaLineSegmentsGeomlist_electrode_prototypesload_colormapload_prototypelocalization_modulemerge_brainnew_electrode_prototypeplot_slicesread_fs_ascread_fs_m3zread_gii2read_mgzread_volumeread.fs.annotread.fs.curvread.fs.labelread.fs.mghread.fs.morphread.fs.surfaceread.fs.transformread.fs.volumeread.fs.weightread.nifti1.dataread.nifti1.headerread.nifti2.dataread.nifti2.headerrenderBrainsave_brainsave_colormapseeg_prototypeset_default_templateSphereGeomSpriteGeomthreeBrainthreebrain_finalize_installationthreejs_brainthreejsBrainOutputTubeGeomvideo_contentvolume_to_surfwrite.fs.surfacewrite.nifti1write.nifti2

Dependencies:abindbase64encbitopsbslibcachemclicodetoolscommonmarkcrayoncurldigestdipsausdownloaderevaluatefastmapfontawesomefreesurferformatsfsfuturefuture.applygiftiglobalsgluehighrhtmltoolshtmlwidgetshttpuvjquerylibjsonliteknitrlaterlifecyclelistenvmagrittrmemoisemimeoro.niftiparallellypkgfilecachepngprogressrpromisesR.methodsS3R.ooR.utilsR6rappdirsRcpprlangrmarkdownRNiftirstudioapisassservrshinysourcetoolsstringistringrtinytexvctrswithrxfunxml2xtableyaml

Data Visualization (Electrodes)

Rendered fromB-data-visualization.Rmdusingknitr::rmarkdownon Nov 19 2024.

Last update: 2024-05-03
Started: 2023-06-03

Getting Started

Rendered fromA-getting-started.Rmdusingknitr::rmarkdownon Nov 19 2024.

Last update: 2024-05-03
Started: 2021-08-14

Readme and manuals

Help Manual

Help pageTopics
R6 Class - Abstract Class of GeometriesAbstractGeom
A geometry that renders nothingBlankGeom
Shiny Proxy for Viewerbrain_proxy
Setup Package, Install Environmentbrain_setup
Calculate rotation matrix from non-zero vectorscalculate_rotation
Function to check whether `FreeSurfer` folder has everything we needcheck_freesurfer_path
Conform imaging data in ''FreeSurfer'' wayconform_volume
Create a geometry group containing multiple geometriescreate_group
Calculate cross-product of two vectors in '3D'cross_prod
R6 Class - Generate Data Cube GeometryDataCubeGeom
R6 Class - Generate Data Cube Geometry via 3D Volume TextureDataCubeGeom2
Default Directory to Store Template Braindefault_template_directory
R6 Class - Generate Geometry from Vertices and Face IndicesFreeGeom
Read `FreeSurfer` surface and volume filesfreesurfer_brain freesurfer_brain2
Query the 'FreeSurfer' labelsfreesurfer_lut
Generate smooth envelope around surfacegenerate_smooth_envelope
Approximate 'sub-cortical' surfaces from 'parcellation'generate_subcortical_surface
Creates any mesh geometry given vertices and face indicesgeom_freemesh
Create sphere geometrygeom_sphere
R6 Class - Generate Group of GeometriesGeomGroup
Function to read digest headerget_digest_header
Get 'voxel' to world matrixget_ijk2ras
Import from `FreeSurfer` and create `JSON` cache for 3D viewerimport_from_freesurfer
Import 'FreeSurfer' or 'SUMA' files into the viewer structureimport-fs-suma import_fs import_suma
R6 Class - Generate Line SegmentsLineSegmentsGeom
List or load all electrode prototypeslist_electrode_prototypes load_prototype
Launch a 'shiny' application to localize electrodeslocalization_module
Create Multi-subject Templatemerge_brain
Create or load new electrode prototype from existing configurationsnew_electrode_prototype
Plot slices of volumeplot_slices
Read `FreeSurfer` ascii fileread_fs_asc
Read FreeSurfer Annotationsread_fs_labels
Read `FreeSurfer` m3z fileread_fs_m3z
Read `FreeSurfer` `mgz/mgh` fileread_fs_mgh_mgz
Function to load surface data from `Gifti` filesread_gii2
Function to load `FreeSurfer` `mgz/mgh` fileread_mgz
Read volume file in ''MGH'' or ''Nifti'' formatsread_volume
Shiny Renderer for threeBrain WidgetsrenderBrain
Function to reshape data to `RAS` orderreorient_volume
Save threeBrain widgets to local file systemsave_brain
Create ''sEEG'' shaft geometry prototypeseeg_prototype
R6 Class - Generate Sphere GeometrySphereGeom
R6 Class - Generate Sphere GeometrySpriteGeom
Download and Manage Template Subjectsavailable_templates download_N27 download_template_subject N27 set_default_template template_subject threebrain_finalize_installation
Create a brain objectthreeBrain
Create a Threejs Brain and View it in Browsersthreejs_brain
Shiny Output for threeBrain WidgetsthreejsBrainOutput
R6 Class - Generate Tube GeometryTubeGeom
Add video content to the viewervideo_content
Generate surface file from ''nii'' or ''mgz'' volume filesvolume_to_surf
Color maps for volume or surface datacreate_colormap freeserfer_colormap load_colormap save_colormap voxel_colormap
Generate volume data from 'MNI' coordinatesadd_nifti add_voxel_cube create_voxel_cube voxel_cube