= What's next =
A roadmap to the future developments of Brainstorm.
== Next six months ==
==== Data acquisition ====
 * Improve the acquisition of the head points and the registration MEG / MRI
 * Real-time processing and display (based on FieldTrip realtime module)
 * Support for optical recordings: Near-infrared spectroscopy (NIRS)
 * Support for intra-cranial recordings
==== Pre-processing ====
 * Correction for head movements (using the continuous head localization coils)
 * Extend processing of continuous CTF files to all file formats
 * Make all the main operations available in the pipeline editor
'''Source modeling'''
 * Computation of equivalent current dipoles
==== Functionnal connectivity ====
 * Implementation of methods developed at USC
'''Data management'''
 * Filter the display of the tree by type / name / tag
<
><
><
>
== Recordings ==
 * RAW file viewer:
  * Each RAW viewer window should take a full row of windows (auto-arrange windows)
  * Adding events using configurable shortcuts (CTRL+number)
  * If "Use SSP " option is selected, automatically select "Remove baseline" and "CTF compensations"
  * Documentation: Add definition of bad segments
 * RAW processing:
  * Process correctly CTF files saved without the 3rd order grad correction (apply correction before)
  * Allow to overwrite RAW files (but with a HUGE warning)
  * Update file definition + events if time changes (ex: resample)
  * Make it work for all the file formats
 * Imported recordings: Offer the same interface as the RAW viewer:
  * Scroll bar
  * Events viewer / editor
  * Re-epoch (import from files in database)
 * bst_selections:
  * Add user defined combinations of sensors (eg. "double banana" for EEG)
  * Use this to produce "inversed polarity" displayes too (useful in EEG)
  * Standard setups for all the EEG caps
 * NIRS:
  * Add new data type
  * Display of sensors by pairs oxy/deoxy (red/blue), overlaid
 * Intracranial electrodes:
  * Display in the MRI viewer
  * Different data type
  * Display time series
 * Images of amplitude: [sensor x time], [trial x time], scout: [trial x time] (similaire to erpimage in eeglab)
 * Colormaps:
  * Create a colormap similar to MNE, where extrema are bright
  * Grey out the portion of the colorbars not displayed because of the threshold
== Processes ==
 * SSP:
  * Display warning if changing the ChannelFlag while there is a Projector applied
  * When processing multiple files: waitbar is not behaving well
  * Write documentation
 * Complete processing pipeline:<
>
  * Import + pre-process
  * Sources / head model / noise covariance
  * Project sources
  * Do not generate errors, stay silent and generate a report log that is shown at the end
  * Command-line Brainstorm: for working on clusters (make sure that there are no interface interruptions)
  * Delete intermediary files
  * Complete process of "matrix" file
 * Average:
  * Remember how many trials were used per channel
  * By subject AND condition
 * Co-registration of MEG runs:
  * Finish validation of the method
  * Apply to continuous recordings for correcting for head movements (using head position coils)
 * Time-frequency:
  * Write script for timefreq tutorial
  * Make much faster and more memory efficient (C functions coded by Matti ?)
  * Display stat computed on time-frequency data
  * Display TF maps separately for the two gradiometers (if not: overlap)
  * Source reconstruction by frequency bands
  * Scouts on surface / time-freq
 * Process selection interface:
  * Do not reload the list a each display, but once when starting Brainstorm
  * Bug when redimensioning window (with more than one process)
  * isAvgRef: warning quand process necessite des donnees en AVG REF en entree
  * Save "freqband" option when edited from custom processes
 * Other processes:
  * Moving average
  * Max
  * Median
  * Significance test (Dimitrios, Leo)
  * Remove linear trend
  * Power line removal
  * Bug: gradnorm crashes with bad channels
  * Spatial smoothing: check / document parameters
  * Sinusoid removal: fix new function
 * Contact sheets & movies: use average of time windows instead of single instants, for each picture.
== Database ==
 * Filter display of the database explorer (filename, file type, comment...)
 * MEG protocols: More flexible organization of the database; sub-conditions to allow different runs X different conditions.
 * GUI: Save configuration of windows (per protocol)
 * Add notes in the folders (text files, visible as nodes in the tree)
== Source modeling ==
 * Dipole fitting
 * Visualize Beamformer results (contact Zainab Fatima):
  * Read CTF SAM .svl
  * Create new file type in the database
  * Display as layers in the MRI viewer
 * Unconstrained sources:
  * Compute unconstrained and then project on the normal ?
  * Define as default
  * Check all the processes
  * Difference and stat should be: norm(A) - norm(B)
 * Overlapping spheres: improve the estimation of the spheres for the frontal lobes
 * Volume grid:
  * Scouts 3D
  * Test volume sources with all the subsequent processes (timefreq, stat...)
  * Optimize: 3D display (better that 9x9 cubes)
  * Optimize: vol_dilate (with 26 neighbors)
  * Optimize: grid_interp_mri
 * Magnetic extrapolation:
  * Do the same thing with EEG
 * Project sources:
  * Adapt smooth factor to the number of vertices
  * Number of neighbors to consider = average number of neighbors in the target mesh.
  * Compute by small time blocks
 * Noise covariance matrix:
  * Problem of having inividual trials + averages in the condition => Display warning or not?
  * Save nAvg in noisecov file, to make it easier to scale to other recordings
  * When deploying to other conditions: Apply destination SSP (!NoiseCov = SSP . !NoiseCov . SSP' )
 * Sources on surface: Display peak regions over time (time = color) => A.Gramfort
 * Simulation: synthesize pseudo data-files from a cortex patch (duration, amplitude, noise)
== Anatomy ==
 * BEM surfaces:
  * Fix the bumps at the back of the head
  * Surface edges: same color as the surface when color was changed
 * Import / registration:
  * Improve ICP registration headpoints / scalp (chanfrein, multi-resolution, see with C Grova...)
  * Auto-reorientation of MRI  after selected NAS / LPA / RPA
  * Major bug when importing surfaces for an MRI that was re-oriented manually
 * ICBM brain
  * MINC MRI reader: EMMA, NIAK (Pierre Bellec), HDF5 directly read in Matlab
  * ICBM average surfaces + atlas
  * Using CIVET pipeline for extracting surfaces
 * Atlas:
  * Brodmann scouts=> Replace with FreeSurfer labels
  * Remove NCS/Talairach coordinate system, or fix it => Sylvain, Karim ND
 * Clustering cortex: Dimitrios, David, Yu-Teng
== Statistics ==
 * Stat on scouts / clusters / "matrix"
 * ANOVA: Use LENA functions
  * Output = 1 file per effect, all grouped in a node "ANOVA"
  * Display  several ANOVA maps (from several files) on one single figure, using a  "graphic accumulator", towards which one can send any type of graphic  object
 * Permutation tests:
  * t-test only (wilcoxon? sign-test?): paired, equal var, unequal var
  * nb permutations ~ 1000
  * maximum statistic over "time" or "time and space"
 * Permutations / clustering: cf fieldtrip
  * http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock
  * http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_freq
 * Threshold  in time: keep only the regions that are significative for contiguous  blocks of time, or over a certain number of time points<
> => Process that creates a static representation of a temporal window
== Input / output ==
 * Use BEM surfaces from !FieldTrip
 * EEG File formats:
  * Stellate
  * !BrainVision / !BrainAmp: Get functions from EEGLAB
  * Nihon Kohden
  * EDF+
  * EEG !CeeGraph
  * NEUROFILE = COHERENCE EEG/video !LongTerm Monitoring => Manfred Spueler
  * EGI: Finish support for epoched files (formats 3,5,7)
 * Other file formats
  * MEG160  (KIT)
  * CTF: Read STIM channel and generate !MarkerFile
  * EEGLAB: Apply ICA matrices, get number of trials for AVG files
  * !FieldTrip structures: In / Out
  * Output for all the channel file formats
 * Define scouts from SPM / Analyze 3D masks
 * Files > 2Gb: display warnings
== Distribution & documentation ==
 * Version with big fonts for live demos
 * Automatic update for binary version
 * Shortcuts:
  * Add Help buttons and menus (in popups, dialog windows...) => Links to the website.
  * List of all the keyboard and mouse shortcuts
  * Equivalents for MacOS
 * Send emails to registered users to anounce major improvements
 * Script tutorials:
  * Update them to reflect all the recent changes
  * Script for the time-frequency computation
 * Introduction tutorials:
  * Estimate time to complete each tutorial
  * Clusters
  * Anatomy: Segmentation with !FreeSurfer
  * First steps: Brainstorm preferences
  * Headmodel: explain the fields + how to get the constrained leadfield
  * Coordinate sytems: How to convert between the different coordinates systems in scripts
  * Sources: Modelized data
  * Sources: theshold min. size (not documented yet)
  * Scouts: Atlases of Tzourio-Mazoyer and Brodman
  * Processes: Describe all the processes
  * Processes: How to write your own processes (user folder for processes)
  * Processes: Processing RAW files
  * Import raw recordings: Add "detect bad trials/channels" in the pipeline
 * Advanced tutorials:
  * MNE sample dataset
  * EEG (How to import an EEG cap)
  * MRI segmentation with !FreeSurfer => David Wheland
  * How to make and compress a movie (Brainstorm + !VirtualDub + XVid)
 * Ask users to send their channel files, align on Colin, distribute
== Geeky programming details ==
 * OpenGL options: {none, software, hardware}
 * Bug: Scout without overlay, adapt scale for each graph when "Uniformize" option is unchecked (mixing sources + zscores)
 * Waitbars:
  * Replace old waitbars with java ones
  * Add a "Cancel" button on waitbars when the bounds are defined (ie. when bst controls the process)
 * Double-click doesn't work well on some Linux workstations
 * Bug: Menu "Use default EEG cap" doesn't work for a multiple selection (setting the same EEG cap for several subjects)
 * Bug node selection: click on sources > TF: select node-source, not node-condition
 * Bug tree_dependencies: sources files, reprojected on default anatomy; If based on data files that are bad trials, they should be ignored by tree_dependencies, and they are not
 * bst_warp and channel_project: Use tess_parametrize_new instead of tess_parametrize
 * Bug in_bst_data_multi: If trials have different sizes, output is random (the one of the first file)...
 * sLORETA: Values are now multiplied by 1e12 at loading for display => has do to be done in another way
 * Shared kernels: do the "get bad channels" operation in a different way (reading all the files is too slow)
 * Write shepards.m with new algorithm for nearest neighbors
 * Use Matlab Coder to compile / optimize some processes
 * Optimize calls to bst_get, now study and subject have necessarily the same folder name