braincog
Before we can install braincog
we have to install SimpleITK
, an R wrapper for ITK. ITK provides the latest and robust medical image processing tools for d
-dimensional images.
Pre-compiled on macOS Sierra 10.12.6. To install SimpleITK
package:
git clone https://github.com/ChristofSeiler/SimpleITK_Binaries.git
cd SimpleITK_Binaries
unzip SimpleITK.zip
R CMD INSTALL SimpleITK
This can take a few minutes because we need to compile it from scratch. Here is a step-by-step guide for macOS:
xcode-select --install
cmake
installed and in your system path. We can download from here. After we succesfully installed cmake
we need to make it available from the command line:sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install
SimpleITK
building documentation:git clone https://itk.org/SimpleITK.git
mkdir SimpleITK-build
cd SimpleITK-build
cmake \
-D BUILD_EXAMPLES=OFF \
-D BUILD_TESTING=OFF \
-D WRAP_PYTHON=OFF \
-D WRAP_RUBY=OFF \
-D WRAP_TCL=OFF \
-D WRAP_R=ON \
../SimpleITK/SuperBuild
make -j4
R
:cd SimpleITK-build/Wrapping/R/Packaging
R CMD INSTALL SimpleITK
braincog
:install.packages("devtools")
devtools::install_github("ChristofSeiler/braincog")
The input is morphometry
data from registration algorithms such as ANTs. We encode group labels using a factor fac
variable with two levels.
# fac: (n x 1) factor with two levels
# morphometry: (n x num_voxels) matrix
# cognition: (n x num_tests) matrix
# gray_matter: binary image
res = braincog(fac = group,
morphometry = morphometry,
cognition = cognition,
gray_matter = gray_matter)
summary(res)
plot(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.