Brainstorm
  • Comments
  • Menu
    • Attachments
    • Versions
    • Raw Text
    • Print View
  • Login

Software

  • Introduction

  • Gallery

  • Download

  • Installation

Users

  • Tutorials

  • Forum

  • Courses

  • Community

  • Publications

Development

  • What's new

  • What's next

  • About us

  • Contact us

  • Contribute

Revision 6 as of 2013-10-10 19:40:00
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

Writing your own processes

Brainstorm features a flexible plug-in structure. All the operations available when using the Process1 and Process2 tabs are in fact written as plug-ins. A Brainstorm plug-in, or "process", is a single Matlab .m script that is automatically identified and added to the menus in the pipeline editor. Two folders are parsed for plug-ins:

  • brainstorm3/toolbox/process/functions:
    Brainstorm "official" processes, included in the main distribution of the software

  • $HOME/.brainstorm/process:
    User processes folder, to develop new processes or overwrite some default function

Process structure

A process function must be named "process_...m" and located in one of the two process folders in order to be recognized by the software. Let's call our example function "process_test.m". It contains at least 4 functions:

  • process_test(): The first line of the script must contain a function with the same name as the .m script. It contains only a call to the Brainstorm script macro_methodcall. This allows us to call subfunction in the process_test.m script from outside, using the syntax: process_test('FunctionName', arguments)

  • GetDescription(): Returns a structure that describes the process. This function is called when Brainstorm parses the process folders to find all the valid processes

Run Matlab command

  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01