Skip to content

incf-nidash/nidmresults-spm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NIDM-Results for SPM

Export mass-univariate neuroimaging results computed in SPM as NIDM-Results packs.

A NIDM-Results pack is a compressed file containing a NIDM-Results serialization and some or all of the referenced image data files in compliance with NIDM-Results specification.

Usage

  1. In Matlab, open SPM

    spm fmri
    
  2. Open the Batch Editor by clicking on the Batch button in the SPM12 Menu window

  3. Open the menu SPM > Stats > Results Report (Fig. 1.)

  4. In the batch window (Fig. 2.)

  • Fill in information about the results you are interested in (in particular SPM.mat file, contrast number, threshold, etc.)
  • In Export results, selected New: NIDM (Neuroimaging Data Model)
  • Fill in information about your analysis (Modality, Reference space, Groupsetc.``)
Fig. 1. Results report Fig. 2. NIDM export

Requirements

Install

  • The latest version of the NIDM exporter in available in the last SPM release (v. xx)

How to run the tests?

Copy test data

Test data is available at https://github.com/incf-nidash/nidmresults-examples/, you will need a local copy of this repository stored with git lfs:

cd test/data
git clone https://github.com/incf-nidash/nidmresults-examples.git
git lfs install

Run the tests

To run the tests, you will need to install docker.

Then from the top folder of this repository, run:

did=$(docker run -it -d --rm -v `pwd`/test:/test -v `pwd`/exporter:/exporter cmaumet/octave-spm)
docker exec -it $did octave --no-window-system --eval "addpath('/exporter'); addpath('/test'); nidm_export_all('/test/data/nidmresults-examples', '/test/spmexport')"
python test/TestSPMResultDataModel.py