Sovereign 8s.is mirror of standardgalactic/RMINC
  • R 77.4%
  • C 13.8%
  • C++ 5.6%
  • M4 2.3%
  • Go Template 0.5%
  • Other 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-06-17 15:41:19 +00:00
.github/workflows [DOC] Fix broken GitHub Pages build (Jekyll/Liquid error) 2026-06-17 11:35:14 -04:00
docs docs: regenerate pkgdown site [skip ci] 2026-06-17 15:41:19 +00:00
etc Auto format with air 2025-09-24 00:24:56 -04:00
inst Update libminc build to b01ba22 2026-04-04 20:03:27 +00:00
man Preserve input class and attributes in EffectSize functions 2026-05-06 14:19:40 -04:00
R Merge pull request #347 from Mouse-Imaging-Centre/fix/issue-22-error-index 2026-05-22 13:30:18 -04:00
src Replace std::bind1st with lambda for C++17 compatibility 2026-06-08 12:48:23 -04:00
tests Update all dependency versions to latest releases and fix TFCE test skipping 2026-04-23 15:03:52 -04:00
tools Move config.guess and config.sub into tools/ for R CMD build compatibility 2026-04-04 16:44:20 -04:00
.dockerignore Add Docker-based test infrastructure with mounted source 2026-04-23 08:40:45 -04:00
.git-blame-ignore-revs Add ignoring of bulk formatting 2025-09-24 00:25:16 -04:00
.gitattributes Add gitattributes and ignore html in lang 2017-12-13 10:57:08 -05:00
.gitignore Add Docker-based test infrastructure with mounted source 2026-04-23 08:40:45 -04:00
.Rbuildignore Update documentation: README, INSTALL, NEWS, index.Rmd, AGENTS.md; remove .travis.yml 2026-04-24 17:58:17 -04:00
_config.yml More edits to github page 2017-07-06 17:30:53 -04:00
_pkgdown.yml [DOC] Fix broken GitHub Pages build (Jekyll/Liquid error) 2026-06-17 11:35:14 -04:00
AGENTS.md Fix stale roxygen2 version in AGENTS.md (7.2.3 → 7.3.3) 2026-05-06 10:30:07 -04:00
ChangeLog * added some news about the latest RMINC version, update the ChangeLog noting that it's not maintained anymore, and added a warning message to mincLme indicating that it's deprecated and that mincLmer should be used 2014-08-22 16:25:59 -04:00
cleanup Fix cleanup 2016-05-04 17:05:21 -04:00
configure Move config.guess and config.sub into tools/ for R CMD build compatibility 2026-04-04 16:44:20 -04:00
configure.ac [DOC] Update news, description, and configure for v2.0.0.0 release (Wilks) 2026-06-12 13:48:17 -04:00
DESCRIPTION [DOC] Update news, description, and configure for v2.0.0.0 release (Wilks) 2026-06-12 13:48:17 -04:00
Dockerfile Add Docker-based test infrastructure with mounted source 2026-04-23 08:40:45 -04:00
Gemfile More changes and gives ability to local preview page 2017-07-06 15:39:13 -04:00
index.Rmd [DOC] Modernize pkgdown documentation site 2026-06-16 18:33:38 -04:00
INSTALL Update INSTALL 2026-05-04 15:15:07 -04:00
LICENSE Update license 2016-05-03 16:10:13 -04:00
Makefile Seed of a github page for RMINC documentation 2017-07-06 14:59:49 -04:00
NAMESPACE Export print.mincVoxel S3 method for proper dispatch 2026-04-24 22:45:14 -04:00
NEWS [DOC] Update news, description, and configure for v2.0.0.0 release (Wilks) 2026-06-12 13:48:17 -04:00
README.md [DOC] Rewrite README as README.md 2026-06-16 18:33:32 -04:00
RMINC.Rproj Roxygen documentation update. 2023-06-15 02:27:17 -04:00
run-tests.sh Add Docker-based test infrastructure with mounted source 2026-04-23 08:40:45 -04:00

RMINC

Statistical Tools for Medical Imaging NetCDF (MINC) Files

R Tests License: BSD-3-Clause R >= 4.0 Unix

Tools for reading, writing, analyzing, and visualizing MINC neuroimaging files with R. Supports voxel-wise linear models, mixed-effects models, correlations, ANOVA, FDR correction, TFCE, ROI-based anatomy analysis, surface-based vertex statistics, and parallel execution.

Unix only (Linux, macOS). Requires R >= 4.0. No native Windows support (WSL may work — see INSTALL).


Table of Contents

Features

Capability Key functions
Voxel-wise linear models mincLm, mincAnova, mincTtest, mincWilcoxon
Correlations & summaries mincCorrelation, mincMean, mincSummary
Mixed-effects models mincLmer, mincLmerEstimateDF, mincLogLikRatio
Surface / vertex statistics vertexLm, vertexLmer, vertexTFCE
ROI / anatomy analysis anatLm, anatLmer, hanatLm (hierarchical atlases)
Multiple comparisons mincFDR, mincTFCE, mincRandomize
I/O mincGetVolume, mincWriteVolume, mincArray
Visualization mincPlotSliceSeries, mincTriplanarSlicePlot (2D), rgl (3D), hanatView
Parallel execution pMincApply, qMincApply, mincLm(parallel = ...)

Installation

The easiest way to install is with devtools from the develop branch:

devtools::install_github(
  "Mouse-Imaging-Centre/RMINC@develop",
  upgrade_dependencies = FALSE
)

System Requirements

RMINC depends on the MINC C library. You have two options:

  1. minc-toolkit-v2 (recommended): Download binary installers from http://bic-mni.github.io/ or build from source at https://github.com/BIC-MNI/minc-toolkit-v2. This provides the MINC library plus command-line tools.

  2. libminc from source: If the toolkit is not found, RMINC's configure will attempt to build libminc for you. This requires CMake (> 2.6), git, and the HDF5 development headers.

Debian / Ubuntu:

sudo apt-get install libhdf5-dev cmake git lsof autoconf automake libtool

macOS (Homebrew):

brew install hdf5 cmake autoconf automake libtool

macOS note: RMINC's compiled backend needs a Fortran compiler. Apple's default clang does not include one — install gcc via Homebrew (brew install gcc libssh2 libgit2 libomp zlib) or gfortran directly, and point R at it via ~/.R/Makevars. See the INSTALL file for the exact FLIBS/LDFLAGS setup and detailed instructions.

Troubleshooting

If configure cannot find MINC, set the install prefix via an environment variable:

export MINC_TOOLKIT=/opt/minc/1.9.18

Or pass the path at install time from R:

devtools::install_github(
  "Mouse-Imaging-Centre/RMINC@develop",
  args = "--configure-args='--with-build-path=/opt/minc/1.9.18'",
  upgrade_dependencies = FALSE
)

Quick Example

Fit a voxel-wise linear model across a set of MINC volumes. The response column in data holds MINC file paths; the model is fit independently at every voxel:

library(RMINC)

# `gf` is a data frame whose `volumes` column holds MINC file paths
fit <- mincLm(volumes ~ group, data = gf)

# Output columns: "F-statistic", "R-squared", beta coefficients,
# t-statistics, "logLik". Write the whole-model F-statistic (column 1):
mincWriteVolume(fit, output.filename = "group_Fstat.mnc", column = 1)

Function-level documentation is available in R via ?mincLm, ?mincLmer, ?vertexLm, ?anatLm, etc.

Dockerized Testing

Build the test image:

docker build -t rminc-test .

Run checks and tests (mount the source directory):

docker run -v $(pwd):/RMINC rminc-test              # check + tests (default)
docker run -v $(pwd):/RMINC rminc-test check          # R CMD check --as-cran only
docker run -v $(pwd):/RMINC rminc-test test            # tests only
docker run -v $(pwd):/RMINC rminc-test test mincLm     # filtered tests
docker run -v $(pwd):/RMINC rminc-test shell           # interactive bash shell

Tutorials

Getting Help

Function documentation is available through R's ? interface (e.g. ?mincLm). The MICePUB wiki has additional background and usage notes. Report bugs or request features at the issues page.

Development

The develop branch is where active development happens; the master branch may lag behind. Contributions via pull requests to develop are welcome.

The C/C++ backend is built with Rcpp and autoconf — src/Makevars is generated from src/Makevars.in, and RcppExports.{R,cpp} are auto-generated by Rcpp. Do not edit these files directly.

After editing R source containing roxygen comments, regenerate documentation and the NAMESPACE with:

roxygen2::roxygenise()

License

RMINC is released under the BSD 3-Clause License.