A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/bbuchsbaum/neuroim2 below:

bbuchsbaum/neuroim2: R data structures and function for fMRI-focused neuroimaging analysis

The neuroim2 package is currently in development. The goal of the project is to to provide basic functionality for working with neuroimaging data in R. neuroim2 It is an effort to modify and upgrade the neuroim package (https://github.com/bbuchsbaum/neuroim).

You can install the development version of neuroim2 (v. 0.1.0) from Github with:

# install.packages("devtools")
devtools::install_github("bbuchsbaum/neuroim2")

To read in a volumetric NIFTI formatted image, use the read_vol function:

## Loading required package: Matrix
fname <- system.file("extdata", "global_mask_v4.nii", package="neuroim2")
vol <- read_vol(fname)

Now, vol can be treated as a three-dimensional array:

v1 <- vol[1,1,1]
vol2 <- vol + vol
vol3 <- vol2 - vol
all(vol == vol3)

We can create a 4D image, by concatenating several 3D volumes:

vec <- concat(vol, vol, vol2)
series1 <- vec[1,1,1,]
length(series1)

See examples of use of neuroim2 in the vignettes.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4