====== NeuroElf wiki ====== {{http://neuroelf.net/face.jpg?200 |NeuroElf logo}}Welcome to the NeuroElf wiki. If you would like to contribute, please read the information provided in the wiki internals section below, email register (at) neuroelf (dot) info, and once you get your user information, you can edit/add articles! :) Below you can find a preliminary and manually maintained table of contents. This means that in case you create a new article when you write up your own piece of documentation, please name it with a useful title, and if you consider the information you provide to be useful in a global context (e.g. a manual on how to use a specific tool or a solution to a general problem), please add the article to this page. Once there is a sufficiently large number of articles, this will be re-organized, but for now, this should be good enough to quickly find the required information (given it is available here on the wiki). **Please note: manuals available here at the wiki mostly reflect the most up-to-date version of files available in the daily snapshot (see [[http://neuroelf.net|the main page]] for the link)! If a feature described therein isn't part of that last stable release, please (temporarily) use the snapshot release, if you need this feature urgently!** ===== Manuals ===== ==== wiki internals ==== * [[Adding articles]] * [[Creating formula images]] with [[http://neuroelf.net/pmp/index.php|PhpMathPublisher]] (hosted locally) * [[Uploading image files]] ==== Matlab basics ==== * [[Matlab - introduction|Introduction]] * [[Matlab - help|Help - where to find information on a topic?]] * [[Matlab - language|Matlab's language (basic vocabulary)]] * [[Matlab - datatypes|Variables, datatypes, and indexing]] * [[Matlab - expressions|Expressions]] * [[Matlab - precedence|Precedence - operators and identifiers]] * [[Matlab - M-files|M-files]] * [[Matlab - debugging|Debugging]] * [[Matlab - control structures|Control structures]] * [[Matlab - handles|Handles]] * [[Matlab - classes|Classes]] * [[Matlab - overloading|Overloading of functions and methods]] * [[Matlab - profiler|Profiler - cleaning up code]] ==== NeuroElf internals ==== * [[NeuroElf introduction|Introduction]] (basic info, etc.) * [[NeuroElf installation|Installation]] (instructions for both installer and flat folder/snapshot ZIP) * [[NeuroElf MEX files|Compiling MEX files]] (some hints if compiling fails) * [[NeuroElf release notes|Release notes]] (per-release list of substantial additions) * [[NeuroElf changelog|Changelog]] (latest additions and changes to the snapshot of the toolbox) * [[NeuroElf features|List of features]] (attempt at a comprehensive overview) * [[NeuroElf methods|Methods implemented in NeuroElf]] **(also contains citation references)** * [[NeuroElf support|Support]] (reporting errors and problems, [[NeuroElf feature requests|feature requests]]) * [[NeuroElf videos|Video tutorials]] (a set of screen-recordings showing various features of NeuroElf) * [[NeuroElf license|License and disclaimer]] ==== Data analysis - step-by-step suggestions/instructions for a processing stream ==== * [[Processing stream - coding guidelines|Coding guidelines]] (**this is IMPORTANT!!**) * [[Processing stream - project folder structure|Project folder structure]] * [[Processing stream - file formats|File formats (overview)]] * [[Processing stream - file transfer|File transfer]] * [[Processing stream - image file conversion|Image file conversion]] (DICOM import, K-space reconstruction, etc.) * [[Processing stream - quality assessment|Quality assessment]] * [[Processing stream - preprocessing|Configuration of preprocessing steps]] * [[Processing stream - recording experimental timing and behavior|Recording onsets and responses]] * Model-based approaches (confirmatory, hypotheses driven): [[Processing stream - model creation|Model creation]], [[NeuroElf GUI - Compute multi-study glm|GLM regression]], [[NeuroElf GUI - Contrast manager|Contrast and correlation maps]], [[NeuroElf GUI - RFX mediation|Mediation analysis]] * Model-free approaches (exploratory, covariance-based/multi-variate statistics): [[Processing stream - Cross-correlations|Cross-correlations]], [[Processing stream - ICA|ICA]], [[NeuroElf GUI - RFX mediation|Mediation analysis]] * Meta-analyses: [[MKDA|Multi-level Kernel Density Analysis (MKDA)]] * Output visualization: [[Processing stream - map overlay|Map overlay]], [[neuroelf_gui - image montage ui|Montage creation]] (multi-slice display), [[Processing stream - surface projection|Surface projection]], [[Processing stream - flatmaps|Flatmaps]] * [[Processing stream - scripted|Scripted example]] (taken from my lab) ==== User's corner ==== * [[ajay:start|Ajay Satpute's]] [[ajay:Neuroelf usage notes|usage notes]] * [[jochen:start|Tips and tricks from the NeuroElf himself]] ===== Graphical User Interface (GUI) ===== * [[neuroelf_gui|Main UI overview]] * [[neuroelf_gui - menu tree|GUI menu tree]] * [[neuroelf_gui - keyboard commands|Keyboard commands]] * [[neuroelf_gui - loading data|Loading anatomical and functional data]] * [[neuroelf_gui - GLM beta plotter|GLM beta plotter]] (GLM menu) * [[neuroelf_gui - compute multi-study GLM|Compute multi-study GLM]] (Analysis menu) * [[neuroelf_gui - contrast manager|Contrast manager]] (Analysis menu) * [[neuroelf_gui - RFX mediation|RFX (single-level) mediation]] (Analysis menu) * [[neuroelf_gui - ECG/GSR data analysis|ECG/GSR data analysis]] (Analysis menu) * [[neuroelf_gui - MKDA UI|Multi-level Kernel Density Analysis (MKDA)]] (Analysis menu -> Meta analysis) * [[neuroelf_gui - image montage ui|Image montage UI]] (Visualization menu) * [[neuroelf_gui - rendering ui|Rendering UI]] (Visualization menu / render button) * [[neuroelf_gui - MDM VOI condition average UI|MDM VOI condition averages]] (Visualization menu) * [[neuroelf_gui - scripting|GUI Scripting]] ===== How-to... guides ===== Some of the links (questions) below have their own page, others simply re-use a wiki page that strongly relates to the topic: * [[Applying alignment and normalization from FMR to VTC space|... apply BV's alignment files (IA/FA/ACPC/TAL) to FMR space data]]? * [[Attaching a protocol to a VTC|... attach a protocol to a VTC file]]? * [[Processing stream - quality_assessment|... assess fMRI data quality]]? * [[Close NeuroElf GUI after clear classes|... close the GUI after accidentally clearing everything?]] * [[NeuroElf GUI - menu tree#vmp_menu|... combine VMPs with the same spatial layout]]? * [[Working with statistics|... compute a conjunction map]]? * [[Creating and combining masks from VTCs|... create and combine masks (MSK) from VTCs]]? * [[Tables of activation clusters from VMP maps|... create activation clusters from VMP maps]]? * [[vmp.ClusterTable|... create cluster tables from VMP maps]]? * [[Neuroelf GUI - image montage UI|... create high-resolution images of overlaid maps on slice data]]? * [[Displaying the motion-parameters of a subject|... display the motion parameters of a subject]]? * [[mdm.VOICondAverage|... extract and plot timecourse and trial-related averages]]? * [[Segmenting brains|... fine-tune brain segmentation]]? * [[Processing stream - model creating|... generate PRT files in Matlab]]? * [[importvmpfromspms|... import SPM contrast maps (convert SPM t- and F-maps to VMP format)]]? * [[importrfxglmfromspms|... import SPM regression results (store SPM 1st level regression output in a RFX-GLM)]]? * [[importvtcfromanalyze|... import SPM timecourse data (convert SPM preprocessing output to VTC format)]]? * [[heartbeats|... perform ECG / heart-rate data analysis]]? * [[GSR data analysis|... perform GSR data analysis]]? * [[Processing stream - preprocessing|... preprocess several subjects at once using SPM5/SPM8 preprocessing]]? * [[NeuroElf feature requests|... request a new feature or file format]]? * [[alphasim - extended uses|... use alphasim]]? * [[Creating a RFX-GLM with robust regression on the first level|... use robust regression on first-level data]]? ===== Class overview ===== ==== xff ==== * [[xff|xff]] (main/constructor function, supported [[xff - file formats|file formats]], reading files, [[xff - memory management|memory management]]) * ROOT object methods (root.Method): [[root.ClearObjects|ClearObjects]], [[root.Document|Document]], [[root.Documents|Documents]], [[root.Help|Help]] * Common methods (object.Method): [[obj.ClearObject|ClearObject]], [[obj.CopyObject|CopyObject]], [[obj.DeleteHandle|DeleteHandle]], [[obj.FilenameOnDisk|FilenameOnDisk]], [[obj.Filenumber|Filenumber]], [[obj.Filetype|Filetype]], [[obj.Handles|Handles]], [[obj.Help|Help]], [[obj.Info|Info]], [[obj.ReloadFromDisk|ReloadFromDisk]], [[obj.Save|Save]], [[obj.SaveAs|SaveAs]], [[obj.SaveRunTimeVars|SaveRunTimeVars]], [[obj.SetHandle|SetHandle]] * 3D and 4D data shared methods (CMP/GLM/VMP/VMR/VTC; e.g. vmp.Method): [[obj.Browse|Browse]], [[obj.BoundingBox|BoundingBox]], [[obj.GetVolume|GetVolume]], [[obj.GetVolumeSize|GetVolumeSize]], [[obj.IntensityMask|IntensityMask]], [[obj.Layout|Layout]], [[obj.MapNames|MapNames]], [[obj.MaskWithVMR|MaskWithVMR]], [[obj.SampleBVBox|SampleBVBox]], [[obj.SampleData3D|SampleData3D]], [[obj.SampleTalBox|SampleTalBox]], [[obj.SetOrientation|SetOrientation]], [[obj.SliceData3D|SliceData3D]], [[obj.SliceToTransimg|SliceToTransimg]] * ACQ methods: [[acq.ChannelData|ChannelData]], [[acq.Filter|Filter]], [[acq.Resample|Resample]], [[acq.SampleData|SampleData]] * FMR methods: [[fmr.Filter|Filter]], [[fmr.LoadSTC|LoadSTC]], [[fmr.Realign|Realign]], [[fmr.SliceTiming|SliceTiming]] * GLM methods: [[glm.JoinFFX|JoinFFX]], [[glm.JoinRFX|JoinRFX]], [[glm.RFX_RemovePredictors|RFX_RemovePredictors]], [[glm.RFX_conmaps|RFX_conmaps]], [[glm.RFX_rMap|RFX_rMap]], [[glm.RFX_tMap|RFX_tMap]], [[glm.RemoveSubject|RemoveSubject]], [[glm.SingleStudy_tMap|SingleStudy_tMap]], [[glm.VOIBetas|VOIBetas]] * HDR methods: [[hdr.LoadVoxelData|LoadVoxelData]], [[hdr.SaveVoxelData|SaveVoxelData]], [[hdr.UpdateHeader|UpdateHeader]] * MAP methods: [[map.CreateVMP|CreateVMP]] * MDM methods: [[mdm.ComputeGLM|ComputeGLM]], [[mdm.ConditionOnsets|ConditionOnsets]], [[mdm.SDMs|SDMs]], [[mdm.Subjects|Subjects]], [[mdm.VOICondAverage|VOICondAverage]], [[mdm.VOITimeCourses|VOITimeCourses]] * MTC methods: [[mtc.ApplySSM|ApplySSM]], [[mtc.ApplyTSM|ApplyTSM]] * NTT methods: [[ntt.ChannelData|ChannelData]], [[ntt.Filter|Filter]], [[ntt.Resample|Resample]], [[ntt.SampleData|SampleData]] * PLP methods: [[plp.MKDA|MKDA]], [[plp.PlotOnSlice|PlotOnSlice]], [[plp.PlotOnSurface|PlotOnSurface]] * PRT methods: [[prt.ConvertToMS|ConvertToMS]], [[prt.ConvertToSingleTrial|ConvertToSingleTrial]], [[prt.ConvertToVol|ConvertToVol]], [[prt.CreateSDM|CreateSDM]], [[prt.SetDuration|SetDuration]], [[prt.ShiftOnsets|ShiftOnsets]] * SDM methods: [[sdm.AddFilters|AddFilters]], [[sdm.CalcBetas|CalcBetas]], [[sdm.ShowDesign|ShowDesign]] * SMP methods: [[smp.ClusterTable|ClusterTable]], [[smp.Smooth|Smooth]] * SRF methods: [[srf.AddMarkers|AddMarkers]], [[srf.BackToVMR|BackToVMR]], [[srf.Combine|Combine]], [[srf.CurvatureMap|CurvatureMap]], [[srf.Inflate|Inflate]], [[srf.Morph|Morph]], [[srf.RecalcNormals|RecalcNormals]], [[srf.RecoSMToSphere|RecoSMToSphere]], [[srf.RecoToSphere|RecoToSphere]], [[srf.Smooth|Smooth]], [[srf.Transform|Transform]] * VMP methods: [[vmp.ClusterTable|ClusterTable]], [[vmp.ComputeFormula|ComputeFormula]], [[vmp.CreateSMP|CreateSMP]], [[vmp.MakeHiResVMP|MakeHiResVMP]], [[vmp.PerformFDR|PerformFDR]] * VMR methods: [[vmr.ApplyTRF|ApplyTRF]], [[vmr.CleanVMR|CleanVMR]], [[vmr.CreateVTC|CreateVTC]], [[vmr.HiResRescale|HiResRescale]], [[vmr.InhomogeneityCorrect|InhomogeneityCorrect]], [[vmr.LimitVMR|LimitVMR]], [[vmr.OverlayVMP|OverlayVMP]], [[vmr.Talairach|Talairach]] * VOI methods: [[voi.AddSphericalVOI|AddSphericalVOI]], [[voi.ApplyTrf|ApplyTrf]] * VTC methods: [[vtc.Correlate|Correlate]], [[vtc.CreateMTC|CreateMTC]], [[vtc.CrossCorrelate|CrossCorrelate]], [[vtc.Filter|Filter]], [[vtc.ICA|ICA]], [[vtc.Resample|Resample]], [[vtc.VOITimeCourse|VOITimeCourse]] * Auxiliary functions: [[clearxffobjects]], [[isxff]] ==== xfigure ==== * [[xfigure|xfigure]] (main/constructor function, [[xfigure - CreateFigureFromFile|creating figures]] from [[xfigure - TFG format|TFG files]], [[xfigure - subsref|subsref]] and [[xfigure - subsasgn|subsasgn]] overload to access properties) * figure methods: [[xfigure - SetGroupEnabled|hFig.SetGroupEnabled]], [[xfigure - ShowPage|hFig.ShowPage]] * uicontrol methods: [[xfigure - MultiString|hUIC.MultiString]] ==== transimg ==== ==== transio ==== ===== Function reference ===== This section is sorted by area of application. To look up help for a specific function name, please use the Search box on top of any wiki page or look at the [[NeuroElf - all functions|alphabetical function index]]. ==== BrainVoyager specific ==== * [[averagevmrs]] - average multiple VMRs into one dataset * [[bcc2area]] - lookup labels of color codes used in BrainVoyager QX's Talairach.VMR * [[createfmr]] - create a BrainVoyager compatible [[xff - FMR format|FMR]] object from DICOM, PAR/REC, or Analyze files * [[createvmr]] - create a BrainVoyager compatible [[xff - VMR format|VMR]] object from DICOM, PAR/REC, or Analyze file(s) * [[vmrspmcoreg]] - apply SPM's coregistration to two VMRs and create a TRF object ==== Data import ==== * [[dcm2nii]] - import DICOM to NIftI format (using SPM's DICOM Import tool) * [[dicom2nii]] - import DICOM or PAR/REC to NIftI format (no SPM required) * [[fmriqasheet]] - visualize the result of ''fmriquality'' * [[fmriquality]] - fMRI quality assessment (per run, estimates measures of noise as well as motion and detects outliers) * [[importrfxglmfromspms]] - import several SPM.mat files (and the used timecourses) into BrainVoyager QX's [[xff - GLM format|RFX-GLM format]] * [[importvmpfromspms]] - import several 3D SPM based t- or F-maps into BrainVoyager QX's [[xff - VMP format|VMP format]] * [[importvmrfromanalyze]] - import one 3D [[xff - NII format|Analyze/NIftI]] file into BrainVoyager QX's VMR format * [[importvtcfromanalyze]] - import several 3D or one 4D [[xff - NII format|Analyze/NIftI]] file(s) into BrainVoyager QX's VTC format * [[renamedicom]] - rename DICOM files (from filename list) according to a pattern using DICOM header values (incl. UI) ==== Fun functions ==== * [[solvesudoku]] - Sudoku puzzle solver (not the best one, but it works) ==== Information processing ==== * [[acsvread]] - read CSV (comma-separated-value) files (e.g. text-based Excel sheets) * [[findfiles]] - seek file/folder names in filesystem, create list of filenames with pattern for scripted processing * [[qsort]] - C-based Qsort algorithm (only for certain applications * [[u8str2double]] - parsing large text files with tabular numeric data (MEX file: **fast**) ==== Interpolation (resampling) ==== * [[flexinterpn]] and the more user friendly [[flexinterpn_method]] - flexibly interpolate data (up to 4D) * [[resampleaa]] - resample data with anti-aliasing (uses [[flexinterpn]] but has different option set, also distinguishes better between up- and downsampling) ==== Physiological data processing ==== * [[computehrv]] - compute heart-rate variability (HRV) from onset data * [[heartbeats]] - detect and visualize heart beats from ECG recording (incl. manual de/selection of problematic beat locations) * [[plotcurves]] - flexibly visualize curves and, if requested, determine points of interest (e.g. peaks) and compute distances (response times, amplitudes, etc.) * [[prefilter]] - pre-processing filter of signal data (removal of unwanted frequencies, resonance, and noise components) ==== Robust regression ==== * [[fitrobustbisquare]] - robustly fit (weighted) least-squares model by iteratively re-weighting outliers using the bisquare function * [[fitrobustbisquare_img]] - apply robust fit on multi-dimensional data, instance-by-instance (faster than looping around fitrobustbisquare) ==== Spatial data processing ==== * [[clustercoords]] and [[clustercoordsc]] - cluster coordinates in 3D data volume * [[clustermeshmap]] and [[clustermeshmapbin]] - cluster coordinates on 2D mesh surface * [[clustervol]] - cluster binary volume (used by clustercoords) * [[conv3d]] - C-based 3D spatial convolution * [[splitclustercoords]] - attempt to split a cluster into sub-compartments using a modified watershed algorithm ==== Spatial transformations (incl. coordinates) ==== * [[acpc2tal]] - apply [[xff - TAL format|BrainVoyager TAL transformation]] to coordinates * [[applybvtrf]] - apply [[xff - TRF format|BrainVoyager TRF transformation]] to coordinates * [[bvcoordconv]] - convert between TAL/MNI space and diverse BrainVoyager QX spaces (interal/external/voxel coordinate systems) * [[bvtrf]] - compile BrainVoyager QX compatible transformation matrix (see also [[xff - TRF format|TRF object]]) * [[mni2tal]] - apply Matthew Brett's coordinate conversion from MNI to Talairach space * [[tal2acpc]] - apply inverse [[xff - TAL format|BrainVoyager TAL transformation]] to coordinates ==== Statistics ==== * [[alphasim - extended uses|alphasim]] - simulate random data/maps to determine cluster level threshold under given smoothing conditions * [[calcbetas]] - perform ordinary least-squares (OLS) regression and, if requested, compute predicted time course and SE * [[conjval and conjvalp]] - compute conjunction of statistics (where conjvalp inverts the min to a max logic for signed, one-tailed p-values) * [[correlinvtstat]], [[correlpvalue]], and [[correltstat]] - convert correlation coefficient (r) from/into t-statistic (or p-value) * [[corrmap]] - correlation map with support for OLS, robust regression, and Kendall Tau coefficient * [[cov_nd]] - compute covariance/correlation arrays over last dimension of N-dimensional data * [[custom_pwelch]] - compute [[http://en.wikipedia.org/wiki/Welch%27s_method|Welch's method]] periodogram over data * [[kurt]] - kurtosis * [[sdist]] - statistical distributions (one function, e.g. Fcdf, tcdf, tinv, etc.) * [[skew]] - skewness * [[varc]] - C-based variance (faster for single-core processing) ==== Temporal transformations ==== * [[psctrans]] - per cent signal change (%) transformation (incl. applying transform in one dimension for multi-dimensional data) * [[tempfilter]] - apply temporal filtering to (multi-dimensional) data * [[ztrans]] - z-transformation (incl. applying transform in one dimension for multi-dimensional data) ==== User Interface (UI) functions ==== * [[colorpicker]] - select color(s) from RGB/HSV color space ==== Auxiliary functions ==== * [[afni_parse]] - AFNI's [[xff - HEAD format|HEAD]] format parser (used by xff) * [[analyzetype]] - return datatype for internal use by the [[xff - HDR format|Analyze/NIftI format]] * [[any2ascii]] - converts other datatypes into ASCII representation (for storage in text files and use with eval) * [[asciiread]] and [[asciiwrite]] - read/write file contents as ASCII (handle line breaks) * [[barycoord]] - compute barycentric coordinates * [[binread]] and [[binwrite]] - read/write file contents as uint8 * [[checkstruct]] - compare struct with well-formated list of fields and options * [[checksyntax]] - detect syntax errors in code without actually running it (uses eval) * [[colcode2uint32]] and [[uint322colcode]] - internal routine to convert the color coding used in [[xff - SRF format|BrainVoyager's SRF format]] * [[convones]] - convolve a given vector with an all-ones vector of given length * [[filesize]] - get size of given filename in bytes ===== Dealing with errors ===== * [[Matlab debugging|Using dbstop to locate errors]] * [[Checking xff files for problems]] * [[NeuroElf - error report|Reporting an error with NeuroElf]]