Skip to content
/ prepNFB Public

This is a Matlab based toolbox to prepare for and coregister between OpenNFT Neurofeedback session(s)

Notifications You must be signed in to change notification settings

lucp88/prepNFB

Repository files navigation

Note!

The protocol manager needs to be updated to match the latest developments of OpenNFT

prepNFB

This is a Matlab based toolbox to prepare for and coregister between OpenNFT Neurofeedback session(s).

The prepNFB toolbox aims to simplify and automatize (some of) the pre NFB steps needed to setup an OpenNFT based neurofeedback session. The architecture is such that the different modules are launched from one main user interface which is fully adaptable to accomodate any NFB experiment individually. When properly setup, one can run and analyze a functional localizer task within the same scanning session as the first neurofeedback training. As such, regions of interest can be delineated and prepared while the participant is waiting in the scanner for the first NFB run. Furthermore, it allows the user to coregister the ROIs between NFB sessions and to project the coregistration results onto the relevant EPI or structural images for visual quality assessment. It is a combination of my own code as well as a few adapted SPM functions.
As it's a work in progress more functionalities are planned for the future. If you have ideas, would like to contribute or have any questions about the toolbox or how to set it up, please contact me at:

lucaspeek@live.nl

For more information on OpenNFT please visit:


If you publish the results of a NFB project for which you used this toolbox please refer to this gitHub page. Thanks!

prepNFB toolbox

Several modules are are currently implemented:

  1. Region of interest tool
    • Automated and flexible analyses of functional localizer data
    • ROI delineation tool based on SPM contrasts with visualizations
  2. Automated Motion Correction template creation based on for instance resting state acquisition
  3. Automated OpenNFT settings file (.ini) creation
  4. Running PTB experiments and creating experiments parameters
  5. Session to session coregistration with visualization
    • based on structural scans
    • based on epi scans
  6. OpenNFT protocol tool that allows for:
    • Flexible creation and visualization of a NFB protocol that the user can then save as a .json file
    • Loading and subsequent eddititing of pre-exisiting .json protocol file

Dependencies: SPM12, JSONLab

Works best on Windows (some small adjustments have to be implemented to make in macOS compatible)

The GUI is build with guide from matlab. While guide generated code can apear messy, changing and adding elements and routines to the interface is more efficient and accesible. For all SPM based computations the generic spm_jobman(matlabbatch, 'run') structure is maintained.

To run the toolbox with example_session data:

  1. Unzip the example data in: '...\prepNFB-master\example_session\rtData'
  2. Open Matlab and set current working directory to: prepNFB-master
  3. Call the main interface from the Matlab command window by typing 'prep_NFB'
  4. In the main GUI:
    • Specify the project folder: '...\prepNFB-master\example_session\NFB_Project'
      This is the directory of the NFB project where OpenNFT will expect the subject specific folder strutcure
    • The watch folder: '...\prepNFB-master\example_session\rtData\rtMRdata_sess1'
      This is directory where the MRI images will or have arrive(d) (e.g. rtData folder)
    • Save settings
  5. Initialize a subject (e.g. 01) which will create a subject folder structure in the project folder
    • Put the SPM_onset file (prepNFB/example_session/NFB_project) inside the subject folder:
      (prepNFB/example_session/NFB_project/01/Localizer/beh)
      When the toolbox is properly set up the onset file will be automatically created in this directory
  6. Use the dcm series numbers specified in the txt file 'dcm_sequences.txt' in the rtData folder
    to direct the toolbox to the right images for each step

Some examples:

  • Region of Interest Delineation using prepNFB: Short Demo (YouTube)

  • Overview prepNFB tool
    Screenshot of the main interface and the different modules available Overview of prepNFB tool

  • Protocol Manager
    The protocol manager where users can load and adjust or create a new OpenNFT neurfeedback protocol and save it as a .json file
    Protocol Manager

About

This is a Matlab based toolbox to prepare for and coregister between OpenNFT Neurofeedback session(s)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages