You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
CanlabCore
This repository contains core tools for MRI/fMRI/PET analysis from the Cognitive and Affective Neuorscience Lab (Tor Wager, PI) and our collaborators. The tools provide a high-level language for interacting with neuroimaging data. The idea is to take preprocessed data or even the results of single-subject analyses—the output of established preprocessing pipelines—and import them into lightweight, flexible data objects specialized for neuroimaging visualization and analysis. These objects allow for interactive analysis with simple commands, like “plot”, “predict”, and “montage”. The repository also includes other useful toolboxes, including fMRI design optimization using a genetic algorithm, fMRI HRF estimation, fMRI analysis with Hierarchical Exponentially Weighted Moving Average change-point analysis, various fMRI diagnostics, and miscellaneous other tools and functions for visualizing brain data.
Cite As
Tor Wager (2023). CanlabCore (https://github.com/canlab/CanlabCore), GitHub. Retrieved .
Requires
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
CanlabCore
CanlabCore/@atlas
- atlas
- atlas2region
- atlas_add_L_R_to_labels
- atlas_get_probability_maps
- atlas_similarity
- check_properties
- create
- extract_data
- find_closest_region
- get_region_volumes
- horzcat
- isosurface
- merge_atlases
- montage
- num_regions
- parcel_data2fmri_data
- parcel_stats2statistic_image
- probability_maps_to_region_index
- remove_atlas_region
- reorder_atlas_regions
- select_atlas_subset
- select_regions_near_crosshairs
- split_atlas_by_hemisphere
- split_atlas_into_contiguous_regions
- threshold
CanlabCore/@brainpathway
- attach_voxel_data.m
- brainpathway
- brainpathway2fmri_data
- degree_calc
- find_node_indices
- nan2zero
- reorder_regions_by_node_cluster
- seed_connectivity
- threshold_connectivity
CanlabCore/@brainpathway/private
CanlabCore/@brainpathway_multisubject
- bct_toolbox_undirected_graph_metrics
- brainpathway_multisubject
- compute_HDIs
- flatten_conn_matrices
- get_wh_subjects
- ISC
- qcfc
- ttest
CanlabCore/@canlab_dataset
- add_vars
- bars
- canlab_dataset
- concatenate
- get_descriptives
- get_var
- glm
- glm_multilevel
- histogram
- list_variables
- mediation
- plot_var
- print_summary
- read_from_excel
- reliability
- replace_values
- scattermatrix
- scatterplot
- scatterplot
- select_trials_and_subjects
- spm2canlab_dataset
- ttest2
- write_text
CanlabCore/@fmri_data
- canlab_connectivity_preproc
- cat
- create
- evaluate_spatial_scale
- extract_measures_batch
- extract_roi_averages
- fmri_data
- horzcat
- hrf_fit
- model_brain_pathway
- neurosynth_feature_labels
- plot
- predict
- predict_test_suite
- regress
- rescale
- riverplot
- robfit_parcelwise
- rsa_regression
- saveplots
- signtest
- sim_data
- split
- spm_coregister
- test_generalizability
- ttest
- ttest_table_and_lateralization_test
- windsorize
CanlabCore/@fmri_glm_design_matrix
- add
- Add_Event_Info
- build
- build_single_trial
- fmri_glm_design_matrix
- get_condition_assignments
- get_session_X
- import_onsets
- plot
- replace_basis_set
- robustfit
- rotate_to_pca
- saveplots
- single_trial_estimates
CanlabCore/@fmri_mask_image
CanlabCore/@fmri_timeseries
CanlabCore/@fmridisplay
- activate_figures
- addblobs
- addpoints
- addthreshblobs
- fmridisplay
- legend
- montage
- removeblobs
- removepoints
- surface
- title_montage
- transparency_change
- zoom_in_on_regions
CanlabCore/@image_vector
- apply_atlas
- apply_mask
- apply_parcellation
- check_image_filenames
- compare_space
- descriptives
- display_slices
- enforce_variable_types
- expand_into_atlas_subregions.m
- extract_gray_white_csf
- extract_roi_averages
- flip
- get_wh_image
- histogram
- history
- horzcat
- ica
- image_math
- image_similarity_plot
- image_similarity_plot_bucknermaps
- image_vector
- interpolate
- isempty
- isosurface
- mahal
- mean
- minus
- montage
- orthviews
- outliers
- pattern_surf_plot_mip
- plot_current_orthviews_coord
- plus
- power
- prctile
- preprocess
- qc_metrics_second_level
- read_from_file
- rebuild_volinfo_from_dat
- reconstruct_image
- remove_empty
- render_on_surface
- reparse_contiguous
- replace_empty
- resample_space
- resample_time
- rmssd_movie
- searchlight
- searchlightLukas
- select_voxels_by_value
- slices
- slice_movie
- subdivide_by_atlas
- surface
- table
- threshold
- trim_mask
- union
- wedge_plot_by_atlas
- write
CanlabCore/@predictive_model
CanlabCore/@region
- autolabel_regions_using_atlas
- check_extracted_data
- extract_data
- isempty
- isosurface
- match_colors_left_right
- merge
- montage
- orthviews
- posneg_separate
- region
- region2atlas
- region2fmri_data
- region2imagevec
- region2imagevec
- region2imagevec2tmp
- region2struct
- reparse_continguous
- select_coordinates_near_regions
- subdivide_by_atlas
- subdivide_by_local_max
- surface
- table
- table_simple
- ttest_table_by_condition
CanlabCore/@statistic_image
- check_properties
- conjunction
- convert2mask
- estimateBayesFactor
- multi_threshold
- orthviews
- reparse_contiguous
- riverplot
- select_one_image
- statistic_image
- table
- threshold
CanlabCore/Cifti_plotting
CanlabCore/Cluster_contig_region_tools
- anat_subclusters
- cluster2region
- cluster2subclusters
- clusters2CLU
- clusters2mask
- cluster_close_enough
- cluster_export_pngs
- cluster_find_index
- cluster_interp
- cluster_intersection
- cluster_local_maxima
- cluster_set_intersection
- cluster_table
- cluster_table_old
- cluster_table_successive_threshold
- enlarge_cluster
- image2clusters
- mask2clusters
- mask2struct
- merge_clusters
- merge_nearby_clusters
- subclusters_from_local_max
- xyz2clusters
CanlabCore/Cluster_contig_region_tools/Cluster-based_multivar_tools
- cluster_discrim
- cluster_discrim_montage
- cluster_FA
- cluster_network
- cluster_nmdsfig
- cluster_nmdsfig_glassbrain
- cluster_princomp
- cluster_princomp2
- discrim_plot
- nmdsfig_tools
- partialcor
CanlabCore/Cluster_contig_region_tools/Cluster_based_statistics
CanlabCore/Cluster_contig_region_tools/cluster_tool
- adjacent_test
- check_cl
- cluster_tool
- cluster_tool_append
- cluster_tool_callgui
- cluster_tool_draw_sphere
- cluster_tool_edit
- cluster_tool_getbetas
- cluster_tool_getver
- cluster_tool_maskq
- cluster_tool_masktypeq
- cluster_tool_savefunc.m
- cluster_tool_subdivide
- cluster_tool_table
- cluster_tool_thresh
- cluster_tool_tools
- cluster_tool_writemasktypeq
- cl_cl_intersect
- cl_img_intersect
- cl_subdivide
- mmToVoxel
- space_match
- sphere_3d
- voxelToMm
CanlabCore/Data_extraction
- canlab_load_ROI
- canlab_maskstats
- cluster_tmask
- extract_contrast_data
- extract_from_rois
- extract_image_data
- extract_indiv_peak_data
- extract_raw_data
- load_atlas
- load_image_set
- readim2
- read_hdr
- sphere_roi_tool_2008
- sphere_roi_tool_2008_conflict.m
- timeseries_extract_slice
- tor_extract_rois
CanlabCore/Data_extraction/Grandfathered
CanlabCore/Data_extraction/read_gzip_nii
CanlabCore/Data_processing_tools
- canlab_extract_ventricle_wm_timeseries
- center_of_mass
- correlation_2d_to_3d
- correlation_3d_to_2d
- detransition
- downsample_scnlab
- fft_plot_scnlab
- filterAdjust
- fir2htw2
- get_snr
- hpfilter
- htw_from_fit
- luisFilter
- nuisance_cov_estimates
- physio_data
- rankdata
- resample_scnlab
- scale
- scnlab_filter_fmri_data
- scnlab_outlier_id
- selective_average
- selective_average_group
- smooth_timeseries
- splineDetrend
- splinetrim
- struct2canlab_dataset
- table2canlab_dataset
- trimts
- use_spm_filter
CanlabCore/External/2019_03_03_BCT
- adjacency_plot_und
- agreement
- agreement_weighted
- align_matrices
- assortativity_bin
- assortativity_wei
- backbone_wu
- betweenness_bin
- betweenness_wei
- breadth
- breadthdist
- charpath
- clique_communities
- clustering_coef_bd
- clustering_coef_bu
- clustering_coef_wd
- clustering_coef_wu
- clustering_coef_wu_sign
- community_louvain
- consensus_und
- core_periphery_dir
- cycprob
- degrees_dir
- degrees_und
- density_dir
- density_und
- diffusion_efficiency
- distance_bin
- distance_wei
- distance_wei_floyd
- diversity_coef_sign
- edge_betweenness_bin
- edge_betweenness_wei
- edge_nei_overlap_bd
- edge_nei_overlap_bu
- efficiency_bin
- efficiency_wei
- eigenvector_centrality_und
- erange
- evaluate_generative_model
- findpaths
- findwalks
- find_motif34
- flow_coef_bd
- gateway_coef_sign
- generate_fc
- generative_model
- get_components
- grid_communities
- gtom
- jdegree
- kcoreness_centrality_bd
- kcoreness_centrality_bu
- kcore_bd
- kcore_bu
- latmio_dir
- latmio_dir_connected
- latmio_und
- latmio_und_connected
- link_communities
- local_assortativity_wu_sign
- makeevenCIJ
- makefractalCIJ
- makelatticeCIJ
- makerandCIJdegreesfixed
- makerandCIJ_dir
- makerandCIJ_und
- makeringlatticeCIJ
- maketoeplitzCIJ
- make_motif34lib
- matching_ind
- matching_ind_und
- mean_first_passage_time
- mleme_constraint_model
- modularity_dir
- modularity_und
- module_degree_zscore
- motif3funct_bin
- motif3funct_wei
- motif3struct_bin
- motif3struct_wei
- motif4funct_bin
- motif4funct_wei
- motif4struct_bin
- motif4struct_wei
- navigation_wu
- null_model_dir_sign
- null_model_und_sign
- pagerank_centrality
- participation_coef
- participation_coef_sign
- partition_distance
- path_transitivity
- predict_fc
- quasi_idempotence
- randmio_dir
- randmio_dir_connected
- randmio_dir_signed
- randmio_und
- randmio_und_connected
- randmio_und_signed
- randomizer_bin_und
- randomize_graph_partial_und
- reachdist
- rentian_scaling_2d
- rentian_scaling_3d
- reorderMAT
- reorder_matrix
- reorder_mod
- resource_efficiency_bin
- retrieve_shortest_path
- rich_club_bd
- rich_club_bu
- rich_club_wd
- rich_club_wu
- rout_efficiency
- score_wu
- search_information
- strengths_dir
- strengths_und
- strengths_und_sign
- subgraph_centrality
- threshold_absolute
- threshold_proportional
- transitivity_bd
- transitivity_bu
- transitivity_wd
- transitivity_wu
- weight_conversion
- writetoPAJ
CanlabCore/External/2019_03_03_BCT/data_and_demos
CanlabCore/External/BF
CanlabCore/External/boundedline
CanlabCore/External/boundedline/Inpaint_nans
CanlabCore/External/boundedline/Inpaint_nans/demo
CanlabCore/External/boundedline/Inpaint_nans/doc
CanlabCore/External/boundedline/Inpaint_nans/test
CanlabCore/External/boundedline/boundedline
CanlabCore/External/boundedline/catuneven
CanlabCore/External/boundedline/singlepatch
CanlabCore/External/circularGraph
CanlabCore/External/export_fig
- append_pdfs.m
- copyfig
- crop_borders
- eps2pdf
- export_fig
- fix_lines.m
- ghostscript
- im2gif.m
- isolate_axes
- pdf2eps.m
- pdftops
- print2array
- print2eps
- read_write_entire_textfile.m
- user_string
- using_hg2.m
CanlabCore/External/lasso
- lasso_coefficients
- lasso_cv
- lasso_predict
- lasso_rocha
- lasso_selection
- penalized_coefficients
- plot_duals_example.m
CanlabCore/External/lasso/tests
CanlabCore/External/matlab_bgl
- all_shortest_paths
- astar_search
- bellman_ford_sp
- betweenness_centrality
- bfs
- biconnected_components
- boyer_myrvold_planarity_test
- breadth_first_search
- chrobak_payne_straight_line_drawing
- circle_graph_layout
- clique_graph
- clustering_coefficients
- combine_visitors
- components
- Contents.m
- core_numbers
- cycle_graph
- dag_sp
- depth_first_search
- dfs
- dijkstra_sp
- edge_weight_index
- edge_weight_vector
- edmonds_maximum_cardinality_matching
- edmunds_karp_max_flow
- erdos_reyni
- floyd_warshall_all_sp
- fruchterman_reingold_force_directed_layout
- grid_graph
- gursoy_atun_layout
- indexed_sparse
- is_kuratowski_graph
- is_straight_line_drawing
- johnson_all_sp
- kamada_kawai_spring_layout
- kolmogorov_max_flow
- kruskal_mst
- kuratowski_subgraph
- lengauer_tarjan_dominator_tree
- make_biconnected_planar
- make_connected
- make_maximal_planar
- matching
- maximal_matching
- max_flow
- mst
- num_edges
- num_vertices
- path_from_pred
- planar_canonical_ordering
- prim_mst
- push_relabel_max_flow
- random_graph_layout
- set_matlab_bgl_default
- shortest_paths
- star_graph
- test_dag
- test_matching
- test_planar_graph
- topological_order
- tree_from_pred
- wheel_graph
CanlabCore/External/matlab_bgl/@inplace
CanlabCore/External/matlab_bgl/@ipdouble
CanlabCore/External/matlab_bgl/@ipint32
CanlabCore/External/matlab_bgl/custom
CanlabCore/External/matlab_bgl/doc
CanlabCore/External/matlab_bgl/examples
- approx_multiway_cut
- bacon_numbers
- bfs_example.m
- bfs_in_mbgl
- bfs_in_mbgl
- core_numbers_example.m
- dfs_example.m
- edge_index_example.m
- max_flow_example.m
- multiway_example.m
- new_in_3_0.m
- new_in_4_0.m
- planar_graphs.m
- record_alg.m
- red_black.m
- reweighted_graphs.m
CanlabCore/External/matlab_bgl/private
- check_matlab_bgl
- compile
- get_matlab_bgl_options
- merge_options
- merge_structs
- todo.m
- todo_3_0_release.m
CanlabCore/External/matlab_bgl/test
- canlab_assert
- rtest_1
- rtest_2
- rtest_3_cojocaru
- rtest_5_henderson
- rtest_6
- rtest_7_karsi
- rtest_all.m
- test_all.m
- test_benchmark
- test_breadth_first_search
- test_components
- test_depth_first_search
- test_examples
- test_layouts
- test_main
- test_planar.m
- test_searches.m
- test_shortest_paths
- test_spanning_trees
- test_statistics
- test_trivial.m
CanlabCore/External/spider
CanlabCore/External/spider/Optimization
- Contents.m
- make_cell
- minimize
- mslinearsolve
- msquadsolve
- qp_learn
- quadsolve
- rsptrain
- rsptrain
- rsptrain
- rsptrainmodsel
- rsp_max
- slinearsolve
- squadsolve
- svm_multi_init
- svm_multi_pred
- svm_multi_predK
- svr2w2
CanlabCore/External/spider/Optimization/leon_src
CanlabCore/External/spider/Optimization/libsvm
CanlabCore/External/spider/Optimization/libsvm_classifier_spider
CanlabCore/External/spider/Optimization/libsvm_one_class_spider
CanlabCore/External/spider/Optimization/libsvm_regressor_spider
CanlabCore/External/spider/basic/@algorithm
- algorithm
- am_i_data
- display
- display_simple
- extract
- gen
- get_name
- isdeferred
- subsasgn
- subsref
- test
- train
- traintest
- traintests
CanlabCore/External/spider/basic/@chain
CanlabCore/External/spider/basic/@cv
CanlabCore/External/spider/basic/@data
- concatenate
- data
- display
- get
- get_dim
- get_index
- get_name
- get_x
- get_xy
- get_y
- isdeferred
- partition
- plot
- readfrom
- set_name
- set_x
- set_y
- subsasgn
- subsref
- testing
- training
CanlabCore/External/spider/basic/@data_global
- concatenate
- data_global
- display
- get
- get_dim
- get_index
- get_name
- get_x
- get_xy
- get_y
- isdeferred
- ismyX
- make_cell
- partition
- set_name
- set_x
- set_y
- subsasgn
- subsref
CanlabCore/External/spider/basic/@distance
- calc
- calc
- chisquared
- distance
- eq
- euclid
- get_name
- get_norm
- linear
- norm
- subsasgn
- subsref
- testing
- training
- YOUR_DISTANCE
CanlabCore/External/spider/basic/@get_mean
CanlabCore/External/spider/basic/@group
CanlabCore/External/spider/basic/@kernel
- anisotropic_rbf
- calc
- edit_distance
- empirical_levenstein
- emp_feat_map
- emp_feat_map_segments
- eq
- from_data
- gaussian
- get_kernel
- get_name
- get_norm
- kernel
- kmgraph
- kmgraph_classical
- kondor
- kpa
- levenstein
- linear
- linear
- matching
- poly
- poly
- poly
- poly_of_ker
- rbf
- rbf
- rbf_of_dist
- spikernel
- squared_levenstein
- squared_levenstein
- string_subsequence
- subsasgn
- subsref
- symbol_string
- testing
- tpoly
- training
- triangular
- weighted_linear
- weighted_poly
- YOUR_KERNEL
CanlabCore/External/spider/basic/@loss
- align
- alignment
- AUC
- balanced_loss
- BER
- calc
- class_loss
- confusion_matrix
- epsilon_loss
- get_name
- index_loss
- kernel_loss
- linear_loss
- log_loss
- loss
- N_class_loss
- one_class_loss
- quadratic_loss
- rmse
- roc
- roc50
- sensitivity
- specificity
- squared_corr
- subsasgn
- subsref
- testing
- training
- triang_loss
- weighted_class_loss
CanlabCore/External/spider/basic/@map
CanlabCore/External/spider/basic/@normalize
CanlabCore/External/spider/basic/@param
CanlabCore/External/spider/basic/@spiral
CanlabCore/External/spider/basic/@toy
CanlabCore/External/spider/basic/@toy2d
CanlabCore/External/spider/basic/@toyreg
CanlabCore/External/spider/clust/@kmeans
CanlabCore/External/spider/clust/@kpca
CanlabCore/External/spider/clust/@kvq
CanlabCore/External/spider/clust/@one_class_svm
CanlabCore/External/spider/density/@bayes
CanlabCore/External/spider/density/@gauss
CanlabCore/External/spider/density/@parzen
CanlabCore/External/spider/feat_sel/@rfe
CanlabCore/External/spider/functions
- alignk
- analysis.m
- calc_corrt_test
- calc_group
- calc_mean
- calc_mean_fast
- calc_wilcoxon
- convert_mc
- correst
- cv_mean
- equal
- errorbar2
- eval_hyper.m
- eval_name.m
- Fspikernel
- Ftrunc
- genCode
- get_methods
- gpS00
- group2cell
- group2vec
- incremental_invert
- libsvm_save
- make_html_contents
- make_html_help
- minimize
- muteinf
- myexist
- names
- plotranking
- plots
- readranking
- wekaArgumentString
- wekaCategoricalData
- wekaGetFeaturesFromGraph
- wekaInstalled
- wekaNumericalData
CanlabCore/External/spider/mclass/@one_vs_one
CanlabCore/External/spider/mclass/@one_vs_rest
CanlabCore/External/spider/mod_sel/@bayessel
CanlabCore/External/spider/mod_sel/@gridsel
CanlabCore/External/spider/pat/@adaboost
CanlabCore/External/spider/pat/@bagging
CanlabCore/External/spider/pat/@knn
CanlabCore/External/spider/pat/@platt
CanlabCore/External/spider/pat/@svm
CanlabCore/External/spider/pat/@template
CanlabCore/External/spider/redset/@rss_mp
CanlabCore/External/spider/reg/@gproc
CanlabCore/External/spider/reg/@multi_reg
CanlabCore/External/spider/reg/@multi_rr
CanlabCore/External/spider/reg/@svr
CanlabCore/External/umap/umap
- canlab_umap_example_iris_dataset.m
- categorical_simplicial_set_intersection
- CheckUmapFolder
- choose_optimize_layout
- clip
- Coder
- CommaFormat
- compute_membership_strengths
- cross_entropy
- debugTiming
- detectUnsupervised
- divide_sparse
- fast_intersection
- find_ab_params
- fuzzy_simplicial_set
- general_simplicial_set_intersection
- general_sset_intersection
- generate_synthetic_set
- initJava
- init_transform
- InstallMexAndExe
- KnnFind
- ln_freq_var
- lobpcg.m
- make_epochs_per_sample
- nearest_neighbors
- neg_sampling_objective
- NnDescent
- optimize_layout
- optimize_layout2
- optimize_layout3
- optimize_layout4
- optimize_layout5
- parseArguments
- pdist_plot
- perturb_classes
- plot_objectives
- prec_rec_plot
- probability_bin.m
- probability_bin_labels
- probability_means_weights_ptrs
- remove_sparse
- reset_local_connectivity
- resupervise
- run_examples
- run_umap
- smooth_knn_dist
- spectral_layout
- spectral_layout_binned
- StochasticGradientDescent
- Supervisors
- Template
- TestDistFunc
- Test_Mahal
- test_minkowski
- trainOptimize
- trans2_optimize_layout
- UMAP
- UmapExamples
- UmapPython
- UmapUtil
- UMAP_extra_results
- UstTest