Multimodal approach to identify neuropsychophysiological subgroups in myalgic encephalomyelitis/chronic fatigue syndrome and their relevance for rehabilitation: protocol for a mechanistic cross-sectional and longitudinal study.
The 16 matches · 5 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
- [1] § CRediT authorship contribution statement ↔ pet/scripts/LaBGAScore_pet_model_TSPO_DPA714.m, lines 1–106 · score 0.69 · Lixin Qiu, Lukas Van Oudenhove, Patrick Dupont
- [2] § Methods › Neuroimaging data › Preprocessing › PET ↔ pet/scripts/LaBGAScore_pet_model_TSPO_DPA714.m, lines 1–106 · score 0.68 · endothelial binding, DPA714, SPM, parcels, blood, ROIs
- [3] § Methods › Measures › Primary outcome variables › Neuroimaging › PET/MR scan protocol ↔ pet/functions/LCN12_PET_preprocessing.m, lines 1–76 · score 0.67 · attenuation correction, T1 weighted, injection, DPA714, dynamic, scanning
- [4] § Methods › Statistical analysis plan › Objective 1: comparison of neuropsychophysiological measures between ME/CFS patients and healthy participants › Brain resting-state fMRI ↔ secondlevel/functions/tfce_volume.m, the whole file · a weak match · score 0.67 · Threshold Free Cluster, Enhancement, TFCE, connectivity, Voxel, error
- [5] § Methods › Neuroimaging data › Preprocessing › MRS ↔ mrs/LaBGAScore_mrs_run_osprey_GE.m, lines 230–316 · score 0.66 · linear combination, water scaled, Osprey, spectra, quality, quantification
- [6] § Methods › Neuroimaging data › Preprocessing › MRS ↔ mrs/LaBGAScore_mrs_run_osprey_Philips.m, lines 230–316 · score 0.66 · linear combination, water scaled, Osprey, spectra, quality, quantification
- [7] § Methods › Statistical analysis plan › Objective 1: comparison of neuropsychophysiological measures between ME/CFS patients and healthy participants › Brain resting-state fMRI ↔ secondlevel/functions/tfce_transform_3d.m, the whole file · a weak match · score 0.66 · Threshold Free Cluster, Enhancement, TFCE, connectivity, Voxel, error
- [8] § Methods › Statistical analysis plan › Objective 1: comparison of neuropsychophysiological measures between ME/CFS patients and healthy participants › Brain task-based fMRI ↔ Second_level_analysis_template_scripts/b_copy_to_local_scripts_dir_and_modify/a2_set_default_options.m, lines 383–401 · score 0.66 · multivariate mediation, gray matter mask, FDR correction, PDM, CANlab, threshold
- [9] § Methods › Neuroimaging data › Preprocessing › PET ↔ pet/functions/LCN12_write_image.m, the whole file · a weak match · score 0.61 · University College London, Wellcome, SPM12, volume, MATLAB, PET
- [10] § Methods › Statistical analysis plan › Objective 4: use these subgroups as potential predictors of longitudinal effects throughout treatment ↔ canlab_mixed_effects_matlab_demo1/canlab_mixed_model_example.r, the whole file · a weak match · score 0.61 · linear mixed models, model fit, intercept
- [11] § Methods › Statistical analysis plan › Objective 1: comparison of neuropsychophysiological measures between ME/CFS patients and healthy participants › Brain task-based fMRI ↔ decoding_toolbox/LaBGAScore_decoding_SVM_between_subjects.m, lines 1193–1296 · score 0.61 · Decoding Toolbox, cross validate, shuffling, classifier, train, fold
- [12] § CRediT authorship contribution statement ↔ pet/functions/LCN12_PET_preprocessing.m, lines 1–76 · score 0.55 · Lukas Van Oudenhove, Patrick Dupont, editing
- [13] § Methods › Neuroimaging data › ROI definition › Task-based fMRI (Montreal Imaging Stress Test) ↔ example_help_files/canlab_help_9_apply_a_multivariate_pattern_of_interest.m, the whole file · a weak match · score 0.54 · anterior cingulate, fMRI, dorsal, ROI
- [14] § Methods › Measures › Primary outcome variables › Neuroimaging › MRI scan protocol ↔ mrs/LaBGAScore_mrs_osprey_single_sess_jobfile_Philips.m, lines 262–351 · score 0.54 · T1 weighted, Philips, MRS, scanning, sequence, quantified
- [15] § Methods › Measures › Primary outcome variables › Neuroimaging › MRI scan protocol ↔ mrs/LaBGAScore_mrs_osprey_jobfile_Philips.m, lines 262–361 · score 0.54 · T1 weighted, Philips, MRS, scanning, sequence, quantified
- [16] § Methods › Statistical analysis plan › Objective 1: comparison of neuropsychophysiological measures between ME/CFS patients and healthy participants › SRS, SCFAs, fatigue/fatigability, immune markers ↔ stats_tools/functions/LaBGAScore_Storey_FDR.m, lines 1–60 · score 0.50 · Benjamini Hochberg, pFDR, spline, bootstrap, CFS
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
MATLAB · 1,435 lines · 79 KB · GPL-3.0 · 2 matches
- %% LaBGAScore_pet_model_TSPO_DPA714.m
- %
- %
- % *USAGE*
- %
- % Assumptions:
- % Data are organized according to BIDS.
- % You have to specify a main directory where al the folders of the
- % subjects can be found.
- % In the folder of each subject, there might be a folder ses-xx
- % which contains the folder anat with the T1 weighted structural MRI
- % and a folder pet which contains the dynamic PET images.
- % If the folder ses-xx is not existing, we assume that the subfolder
- % anat and pet are directly under the main folder of the subject.
- %
- % The data are preprocessed using LCN12_PET_preprocess_data.m
- %
- % A template for the PET naming should be specified. PET data are
- % acquired dynamically from the start of the injection. The unit of
- % the PET data is expresses as Bq/ml.Images are decay corrected to
- % the start of the injection/begin of scanning.
- % We assume that PET data are in 4D nifti format.
- % In the pet folder, there must be a .m file containing the frame
- % defintion by specifying the variable frames_timing which is a N x 2
- % or N x 3 array (N = number of frames) for which the first column is
- % the start time of the frame in seconds post injection, the second
- % column is the end time of each frame and the third column is
- % optional with the weight for the frame (positive values). If
- % weights are not specified, all frames are weighted in the same way.
- %
- %
- % *OPTIONS*
- %
- % All set in the "PREP WORK, SET INFO AND OPTIONS" section, above the
- % "DO NOT CHANGE BELOW THIS LINE" marker:
- %
- % * sessiondir default '', session subfolder name (empty = no session level)
- % * infostring_tracer default 'trc-DPA714', tracer identifier used in filenames
- % * infostring_PET default 'rec-acdyn_pet', PET-image filename suffix
- % * infostring_frames default 'frames', frame-definition .m filename suffix
- % * infostring_input default 'data_blood', arterial input function filename suffix (only needed for models requiring one)
- % * infostring_metab default 'data_metab', metabolite filename suffix (only needed for models requiring one)
- % * SUBJECTS which subjects to analyze - three alternative strategies in-code (all-PET-in-BIDS, all-in-derivatives, or manual list); default uses "all subjects in derivatives/pet"
- % * figures_on default 0, show per-region figures and pause (needs keypress) if 1
- % * save_figures default 1, save figures to file (overrules pausing)
- % * save_parcelimgs default 0, save parcel-wise images per parameter/model/subject if 1
- % * do_voxelwise_logan default 0, also run voxel-wise Logan analysis if 1
- % * pet_space_reference default 0, read atlas in PET space (1) vs. atlas space (0)
- % * suffix default 'atlas_space', label used when running multiple models
- % * atlas_name default 'canlab2024_fine_2mm' - option (a) whole-brain atlas name for load_atlas.m, or option (b, commented) a combined-ROI .nii from LaBGAScore_atlas_rois_from_atlas.m
- % * intersect_GM / intersect_WM default 0/0, intersect VOI/parametric image with subject-specific GM/WM mask
- % * GM_CUTOFF / WM_CUTOFF default 0.3/0.3, thresholds for the above
- % * additional_smooth_parametric default 6 (mm), isotropic Gaussian smoothing kernel for voxel-based parametric Logan images
- % * nr_parpool default 12 (LaBGAS server default), number of parallel workers
- %
- %
- % *DEPENDENCIES*
- %
- % * CanlabCore: load_atlas, downsample_parcellation
- % * SPM: spm_vol
- % * vendored pet/functions/LCN_*.m: LCN12_read_image, LCN_check_filename, LCN_calc_intact_tracer_hill (and related LCN model-fitting functions)
- %
- %
- % *NOTES*
- %
- % THIS IS RESEARCH SOFTWARE. Originated as LCN12_PET_TSPO_DPA714.m (v2.0).
- %
- % History:
- % February 2024: an excel file is written which contains for all
- % subjects and all regions, the volume of distribution
- % and the error of the fit.
- % March 2024: adapted to work with standard LaBGAS file
- % organization (LVO) and adapted version of
- % preprocessing script
- % LaBGAScore_pet_preprocess_data
- % built in check for enough frames after
- % logan_start_time (LVO)
- % May 2024 further adaptations to fit LaBGAS file organization (LVO)
- % built in more options for automatic subject and ROI definition (LVO)
- % November 2024: removal of Global variables and adding parallel processing
- % January 2025: weights for excluded frames set to zero and decay
- % between measurement samples and start scan is now
- % taken into account
- % April 2025: Logan is also done voxel based
- % May 2025: Built in option to work with canlab atlas objects (LVO)
- % Final adaptations to fit LaBGAS file organisation (LVO)
- % Added atlas labels automatically to output files (LVO)
- % Sept 2025: Integration of LCN12_PET_TSPO_DPA714_compare_models.m (v0.2)
- % ~ includes 2T4k models with (ir)reversible endothelial binding
- % component and fit statistics to compare models
- % (LVO)
- %
- % -------------------------------------------------------------------------
- %
- % modified by: Patrick Dupont, Lukas Van Oudenhove, Lixin Qiu
- %
- % date: October 2023
- %
- % -------------------------------------------------------------------------
- %
- % LaBGAScore_pet_model_TSPO_DPA714.m v2.1
- %
- % last modified: 2026/08/20
- clear
- close all
- %% PREP WORK, SET INFO AND OPTIONS
- %--------------------------------------------------------------------------
- % SET DIRECTORIES
- LaBGAScore_prep_s0_define_directories; % MAKE STUDY-SPECIFIC
- maindir = BIDSdir; % directory where the folders of each subject can be found
- sessiondir = ''; % if empty, we assume that there is no folder session and the folders anat and pet are directly under the subject folder
- infostring_tracer = 'trc-DPA714';
- infostring_PET = 'rec-acdyn_pet'; % the PET data are "subjectname"_"sessiondir"_"infostring_tracer"_"infostring_PET".nii (example = sub-test_trc-DPA714_rec-acdyn_pet.nii)
- infostring_frames = 'frames'; % in the folder pet, we assume a .m file name "subjectname"_"sessiondir"_"infostring_tracer"_"infostring_PET"_"infostring_frames".m (example sub-test_trc-DPA714_rec-acdyn_pet_frames.m)
- % infostring_input and infostring_metab need only be defined if we use
- % models which require an arterial input function
- infostring_input = 'data_blood'; % % in the folder pet, we assume a .m file name "subjectname"_"sessiondir"_"infostring_tracer"_"infostring_input".m (example sub-test_trc-DPA714_rec-acdyn_data_blood.nii)
- infostring_metab = 'data_metab'; % % in the folder pet, we assume a .m file name "subjectname"_"sessiondir"_"infostring_tracer"_"infostring_metab".m (example sub-test_trc-DPA714_rec-acdyn_data_metab.nii)
- % Lukas' code to take into account that preprocessed data are in
- % derivatives/pet-<infostring_tracer>
- derivrootdir = fileparts(derivdir);
- derivpetdir = fullfile(derivrootdir,['pet_' infostring_tracer]);
- firstlevelpetdir = fullfile(rootdir,'firstlevel',['pet_' infostring_tracer]);
- if ~exist(firstlevelpetdir,'dir')
- mkdir(firstlevelpetdir);
- end
- secondlevelpetdir = fullfile(rootdir,'secondlevel',['pet_' infostring_tracer]);
- if ~exist(secondlevelpetdir,'dir')
- mkdir(secondlevelpetdir);
- end
- secondlevelpetmaskdir = fullfile(secondlevelpetdir,'masks');
- if ~exist(secondlevelpetmaskdir,'dir')
- mkdir(secondlevelpetmaskdir);
- end
- secondlevelpetresultsdir = fullfile(secondlevelpetdir,'results');
- if ~exist(secondlevelpetresultsdir,'dir')
- mkdir(secondlevelpetresultsdir);
- end
- secondlevelpetroidir = fullfile(secondlevelpetmaskdir,'rois');
- if ~exist(secondlevelpetroidir,'dir')
- mkdir(secondlevelpetroidir);
- end
- % SELECT SUBJECTS
- % Lukas' code to automate selection of subjects who have a pet dir in BIDS
- % USE THIS FOR ANALYZING ALL PET SUBJECTS AT ONCE
- % dir_BIDS = dir(fullfile(BIDSdir,'sub-*'));
- %
- % petsubcounter = 1;
- %
- % for sub = 1:size(dir_BIDS,1)
- % BIDSsubdir = fullfile(BIDSdir,dir_BIDS(sub).name);
- % dir_BIDSsubdir = dir(BIDSsubdir);
- % if contains([dir_BIDSsubdir(:).name],'pet')
- % SUBJECTS{petsubcounter,1} = dir_BIDS(sub).name;
- % petsubcounter = petsubcounter + 1;
- % else
- % continue
- % end
- % end
- %
- % dir_derivpet = dir(fullfile(derivpetdir,'sub-*'));
- %
- % if ~isequal(SUBJECTS,{dir_derivpet(:).name}')
- % error('#subjects with PET data in BIDS and derivatives subdatasets does not match, please preprocess all subjects before proceeding');
- % end;
- % Lukas' code to automate selection of subjects in derivatives/pet
- % USE THIS FOR ANALYZING ALL PET SUBJECTS AT ONCE WITHOUT CHECKING CONSISTENCY BETWEEN BIDS AND DERIVATIVES SUBDATASETS
- dir_derivpet = dir(fullfile(derivpetdir,'sub-*'));
- SUBJECTS = {dir_derivpet(:).name}';
- % Patrick's code to enter subjects manually
- % USE THIS FOR ANALYZING SELECTED SUBJECTS
- % SUBJECTS = {
- % 'sub-KUL034'
- % };
- % SET FIGURE/IMAGE OPTIONS
- figures_on = 0; % if 1, we show the figures for each region and pause. You need to hit a key to proceed.
- save_figures = 1; % if 1, we save the figures to file and pausing of figures is overruled.
- save_parcelimgs = 0; % if 1, we save parcel-wise images for every parameter in every model for every subject
- do_voxelwise_logan = 0; % if 1, we perform a voxel-wise Logan analysis in addition to the parcel-wise analyses
- pet_space_reference = 0; % if 1, atlas is read in pet space. Voxels with non-integer values (i.e. voxels at the border of a region) will be excluded. If 0, atlas space is used.
- suffix = 'atlas_space'; % use if you want to run multiple models
- % DEFINE ATLAS/ROIS
- % Lukas' code to flexibly load canlab atlas objects
- % option a - atlas name from load_atlas.m for whole-brain parcellation
- atlas_name = 'canlab2024_fine_2mm';
- atlas = load_atlas(atlas_name);
- atlas = downsample_parcellation(atlas,'labels_3'); % downsample to intermediate granularity level, 246 parcels
- atlas.probability_maps = [];
- atlas_filename = fullfile(secondlevelpetmaskdir,[atlas_name '.nii']);
- if ~isfile(atlas_filename)
- write(atlas,'fname',atlas_filename);
- end
- % option b - combined roi .nii file generated by
- % https://github.com/labgas/LaBGAScore/blob/main/atlas_mask_tools/LaBGAScore_atlas_rois_from_atlas.m
- % for roi analysis
- % atlas_name = 'combined_inflammation_regions';
- % atlas_name = 'combined_TSPO';
- % atlas_mat = 'pet_trc-DPA714_combinedTSPO'; % lixin May26 2025
- % atlas_filename = fullfile(secondlevelpetmaskdir,[atlas_name '.nii']);
- % atlas_mat = fullfile(secondlevelpetmaskdir,[atlas_mat '.mat']); % lixin May26 2025
- % load(atlas_mat);
- % SPECIFY BASE NAME FOR THE OUTPUT FILES
- % we will extend the name with the name of the model and write as an excel file)
- outputfile_excel_region_based = fullfile(secondlevelpetresultsdir,['results_' infostring_tracer '_' atlas_name '_VOIS']);
- % SET OPTIONS FOR INTERSECTING WITH GRAY MATTER
- % if you want to intersect the VOI region with a subject specific GM or WM map, you need to specify the variables below
- % the same will be done for the parametric image with Logan_input in which case the voxels withing GM or WM after thresholding these maps will be calculated.
- intersect_GM = 0;
- intersect_WM = 0;
- GM_CUTOFF = 0.3;
- WM_CUTOFF = 0.3;
- % SET SMOOTHING KERNEL FOR VOXEL-BASED PARAMETRIC LOGAN IMAGES
- additional_smooth_parametric = 6; % kernel size in mm; isotropic Gaussian 3D smoothing; additional smoothing for a voxel based analysis. If GM of WM intersection is selected, smoothing is within this mask
- % SET NUMBER OF PARALLEL PROCESSES
- nr_parpool = 12; % LaBGAS server default
- % nr_parpool = 20;
- %+++++++++++++++ DO NOT CHANGE BELOW THIS LINE ++++++++++++++++++++++++++++
- %% SETTINGS
- %---------------------- settings ------------------------------------------
- min_number_voxels = 25; % minimum number of voxels in the parcel that are used for the calculation of the TAC.
- % we will use a multigrid search for the optimal parameters for the rate
- % constants for each model. Keep in mind that you have
- % nr_starting_values_per_dimension^4 number of starting values for a model
- % with 4 rate constants that you vary and
- % nr_starting_values_per_dimension^6 for a model with 6 parameters that you
- % would like to vary.
- % the time for the fitting is roughly proportional to the number of
- % starting values.
- % the starting value for Vb is fixed but it will be fitted.
- Vb0 = 0.05;
- nr_starting_values_per_dimension = 3;
- model_list = {
- 'Logan_input'
- '2T4k'
- '2T4k_Vb'
- '2T4k_vasc1k'
- '2T4k_vasc2k'
- };
- logan_start_time = 31; % in min (ref Van Weehaeghe et al. J Nucl Med. 2020 Apr;61(4):604-607)
- % initial values Hill function
- p0_hill = [50 -1]; % see LCN_calc_intact_tracer_hill for details
- % boundaries for the models with initial conditions
- k0_2T4k_lower_bound = [0.001 0.001 0.001 0.001];
- k0_2T4k_upper_bound = [1 1 1 1];
- k0_2T4k_Vb_lower_bound = [0.001 0.001 0.001 0.001 0.001];
- k0_2T4k_Vb_upper_bound = [1 1 1 1 1];
- k0_2T4k_vasc1k_lower_bound = [0.001 0.001 0.001 0.001 0.001 0.001];
- k0_2T4k_vasc1k_upper_bound = [1 1 1 1 1 1];
- k0_2T4k_vasc2k_lower_bound = [0.001 0.001 0.001 0.001 0.001 0.001 0.001];
- k0_2T4k_vasc2k_upper_bound = [1 1 1 1 1 1 1];
- nr_params_Logan_input = 2;
- nr_params_2T4k = 4;
- nr_params_2T4k_Vb = 5;
- nr_2T4k_vasc1k = 6;
- nr_2T4k_vasc2k = 7;
- options = optimoptions('fmincon','Display','off');
- STEP = 0.01; % step size for the calculation of integrals in min
- % CALC_OPTION: parameter determing the way we calculate the output of a
- % model.
- % 1 - the model is calculated as the integral of the output concentration
- % devided by the frameduration.
- % 2 - the model is calculated at the midscantime.
- CALC_OPTION = 2;
- window_size = 0; % for temporal median filtering
- thalf_F18 = 1.82871*60; % half life in min of 18F (REF: García-Toraño E, Medina VP, Ibarra MR. The half-life of 18F. Appl Radiat Isot. (2010) 68(7-8):1561-5)
- %--------------------------------------------------------------------------
- curdir = pwd;
- % determine the path of the prior data of SPM
- tmp = which('spm.m');
- [spm_pth,~,~] = fileparts(tmp);
- spm_pth_priors = fullfile(spm_pth,'tpm');
- % define the brain mask
- brain_mask_file = fullfile(spm_pth_priors,'mask_ICV.nii');
- nr_subjects = size(SUBJECTS,1);
- nr_models = size(model_list,1);
- %% READ ATLAS PARCELS
- %--------------------------------------------------------------------------
- if exist('atlas_filename','var') == 1 && ~isempty(atlas_filename) == 1
- % read atlas
- [atlas_orig,Vatlas_orig] = LCN12_read_image(atlas_filename);
- atlas_orig = round(atlas_orig);
- parcel_values = setdiff(unique(atlas_orig(:)),0); % assuming 0 is background
- % check if there is a .m file with the same name as the atlas
- % with the VOIdetails such as the name
- [pth,name,ext] = fileparts(atlas_filename);
- if exist(fullfile(pth,[name '.m']),'file') == 2
- % execute this m-file
- curdir = pwd;
- cd(pth);
- eval(name); % now VOIdetails is known, a n x 2 cell array with each row the value of a parcel in the atlas and the corresponding parcel name
- cd(curdir);
- parcel_values_atlas = cell2mat(VOIdetails(:,1));
- parcel_names = VOIdetails(:,2);
- else
- parcel_values_atlas = parcel_values;
- try
- parcel_names = atlas.labels;
- catch
- parcel_names = roi_atlas.labels;
- end
- % parcel_names = num2str(parcel_values);
- end
- nr_VOIS = length(parcel_values);
- % initialize output
- % varNames = cell(1,nr_VOIS+1);
- % for voi = 1:nr_VOIS
- % index_value = find(parcel_values_atlas == parcel_values(voi));
- % varNames(1,voi+1) = {[num2str(parcel_values(voi)) '-' char(parcel_names(index_value,:))]};
- % end
- else
- fprintf('You need to define an atlas \n');
- return;
- end
- %% INITIALIZE OUTPUT
- %--------------------------------------------------------------------------
- % PARAMETERS FOR EACH MODEL
- sz = [nr_subjects nr_VOIS+1];
- varNames = [{'subject'} (parcel_names)]; % lixin may26 2025
- varTypes(1,1) = {'string'};
- varTypes(1,2:nr_VOIS+1) = {'double'};
- results_number_voxels_VOI = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- for m = 1:nr_models
- modelname = model_list{m,1};
- if strcmp(modelname,'Logan_input')
- results_region_based_Logan_input_DV = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_Logan_input_error = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- end
- if strcmp(modelname,'2T4k')
- results_region_based_2T4k_K1 = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_k2 = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_k3 = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_k4 = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_DV = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_error = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- end
- if strcmp(modelname,'2T4k_Vb')
- results_region_based_2T4k_Vb_K1 = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_Vb_k2 = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_Vb_k3 = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_Vb_k4 = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_Vb_Vb = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_Vb_DV = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_Vb_error = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- end
- if strcmp(modelname,'2T4k_vasc1k')
- results_region_based_2T4k_vasc1k_K1 = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_vasc1k_k2 = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_vasc1k_k3 = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_vasc1k_k4 = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_vasc1k_Vb = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_vasc1k_K1v = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_vasc1k_DV = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_vasc1k_error = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- end
- if strcmp(modelname,'2T4k_vasc2k')
- results_region_based_2T4k_vasc2k_K1 = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_vasc2k_k2 = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_vasc2k_k3 = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_vasc2k_k4 = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_vasc2k_Vb = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_vasc2k_K1v = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_vasc2k_k2v = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_vasc2k_DV = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- results_region_based_2T4k_vasc2k_error = table('Size',sz,'VariableTypes',varTypes,'VariableNames',varNames);
- end
- end
- % FIT STATISTICS FOR ALL MODELS
- sz2 = [nr_subjects*4 nr_VOIS+2];
- varNames2 = [{'subject'} {'method'} (parcel_names)]; % lukasvo sept 22 2025
- varTypes2 = cell(1, nr_VOIS + 2);
- varTypes2(1:2) = {'string', 'string'};
- varTypes2(3:end) = repmat({'double'}, 1, nr_VOIS);
- results_region_based_AIC = table('Size', sz2, 'VariableTypes', varTypes2, 'VariableNames', varNames2);
- results_region_based_SC = table('Size', sz2, 'VariableTypes', varTypes2, 'VariableNames', varNames2);
- %% DETERMINING THE GRID OF STARTING VALUES WITHIN THE SEARCH SPACE
- %--------------------------------------------------------------------------
- for m = 1:nr_models
- modelname = model_list{m,1};
- if strcmp(modelname,'2T4k')
- k0_2T4k_all_values = zeros(nr_starting_values_per_dimension^4,4);
- counter = 0;
- for d1 = 1:nr_starting_values_per_dimension
- val1 = k0_2T4k_lower_bound(1) + d1*(k0_2T4k_upper_bound(1) - k0_2T4k_lower_bound(1))/(nr_starting_values_per_dimension+1);
- for d2 = 1:nr_starting_values_per_dimension
- val2 = k0_2T4k_lower_bound(2) + d2*(k0_2T4k_upper_bound(2) - k0_2T4k_lower_bound(2))/(nr_starting_values_per_dimension+1);
- for d3 = 1:nr_starting_values_per_dimension
- val3 = k0_2T4k_lower_bound(3) + d3*(k0_2T4k_upper_bound(3) - k0_2T4k_lower_bound(3))/(nr_starting_values_per_dimension+1);
- for d4 = 1:nr_starting_values_per_dimension
- val4 = k0_2T4k_lower_bound(4) + d4*(k0_2T4k_upper_bound(4) - k0_2T4k_lower_bound(4))/(nr_starting_values_per_dimension+1);
- counter = counter + 1;
- k0_2T4k_all_values(counter,:) = [val1 val2 val3 val4];
- end
- end
- end
- end
- nr_k0_2T4k = size(k0_2T4k_all_values,1);
- end
- if strcmp(modelname,'2T4k_Vb')
- k0_2T4k_Vb_all_values = zeros(nr_starting_values_per_dimension^4,5);
- counter = 0;
- val5 = Vb0;
- for d1 = 1:nr_starting_values_per_dimension
- val1 = k0_2T4k_Vb_lower_bound(1) + d1*(k0_2T4k_Vb_upper_bound(1) - k0_2T4k_Vb_lower_bound(1))/(nr_starting_values_per_dimension+1);
- for d2 = 1:nr_starting_values_per_dimension
- val2 = k0_2T4k_Vb_lower_bound(2) + d2*(k0_2T4k_Vb_upper_bound(2) - k0_2T4k_Vb_lower_bound(2))/(nr_starting_values_per_dimension+1);
- for d3 = 1:nr_starting_values_per_dimension
- val3 = k0_2T4k_Vb_lower_bound(3) + d3*(k0_2T4k_Vb_upper_bound(3) - k0_2T4k_Vb_lower_bound(3))/(nr_starting_values_per_dimension+1);
- for d4 = 1:nr_starting_values_per_dimension
- val4 = k0_2T4k_Vb_lower_bound(4) + d4*(k0_2T4k_Vb_upper_bound(4) - k0_2T4k_Vb_lower_bound(4))/(nr_starting_values_per_dimension+1);
- counter = counter + 1;
- k0_2T4k_Vb_all_values(counter,:) = [val1 val2 val3 val4 val5];
- end
- end
- end
- end
- nr_k0_2T4k_Vb = size(k0_2T4k_Vb_all_values,1);
- end
- if strcmp(modelname,'2T4k_vasc1k')
- k0_2T4k_vasc1k_all_values = zeros(nr_starting_values_per_dimension^5,6);
- counter = 0;
- val5 = Vb0;
- for d1 = 1:nr_starting_values_per_dimension
- val1 = k0_2T4k_vasc1k_lower_bound(1) + d1*(k0_2T4k_vasc1k_upper_bound(1) - k0_2T4k_vasc1k_lower_bound(1))/(nr_starting_values_per_dimension+1);
- for d2 = 1:nr_starting_values_per_dimension
- val2 = k0_2T4k_vasc1k_lower_bound(2) + d2*(k0_2T4k_vasc1k_upper_bound(2) - k0_2T4k_vasc1k_lower_bound(2))/(nr_starting_values_per_dimension+1);
- for d3 = 1:nr_starting_values_per_dimension
- val3 = k0_2T4k_vasc1k_lower_bound(3) + d3*(k0_2T4k_vasc1k_upper_bound(3) - k0_2T4k_vasc1k_lower_bound(3))/(nr_starting_values_per_dimension+1);
- for d4 = 1:nr_starting_values_per_dimension
- val4 = k0_2T4k_vasc1k_lower_bound(4) + d4*(k0_2T4k_vasc1k_upper_bound(4) - k0_2T4k_vasc1k_lower_bound(4))/(nr_starting_values_per_dimension+1);
- for d6 = 1:nr_starting_values_per_dimension
- val6 = k0_2T4k_vasc1k_lower_bound(6) + d4*(k0_2T4k_vasc1k_upper_bound(6) - k0_2T4k_vasc1k_lower_bound(6))/(nr_starting_values_per_dimension+1);
- counter = counter + 1;
- k0_2T4k_vasc1k_all_values(counter,:) = [val1 val2 val3 val4 val5 val6];
- end
- end
- end
- end
- end
- nr_k0_2T4k_vasc1k = size(k0_2T4k_vasc1k_all_values,1);
- end
- if strcmp(modelname,'2T4k_vasc2k')
- k0_2T4k_vasc2k_all_values = zeros(nr_starting_values_per_dimension^6,7);
- counter = 0;
- val5 = Vb0;
- for d1 = 1:nr_starting_values_per_dimension
- val1 = k0_2T4k_vasc2k_lower_bound(1) + d1*(k0_2T4k_vasc2k_upper_bound(1) - k0_2T4k_vasc2k_lower_bound(1))/(nr_starting_values_per_dimension+1);
- for d2 = 1:nr_starting_values_per_dimension
- val2 = k0_2T4k_vasc2k_lower_bound(2) + d2*(k0_2T4k_vasc2k_upper_bound(2) - k0_2T4k_vasc2k_lower_bound(2))/(nr_starting_values_per_dimension+1);
- for d3 = 1:nr_starting_values_per_dimension
- val3 = k0_2T4k_vasc2k_lower_bound(3) + d3*(k0_2T4k_vasc2k_upper_bound(3) - k0_2T4k_vasc2k_lower_bound(3))/(nr_starting_values_per_dimension+1);
- for d4 = 1:nr_starting_values_per_dimension
- val4 = k0_2T4k_vasc2k_lower_bound(4) + d4*(k0_2T4k_vasc2k_upper_bound(4) - k0_2T4k_vasc2k_lower_bound(4))/(nr_starting_values_per_dimension+1);
- for d6 = 1:nr_starting_values_per_dimension
- val6 = k0_2T4k_vasc2k_lower_bound(6) + d4*(k0_2T4k_vasc2k_upper_bound(6) - k0_2T4k_vasc2k_lower_bound(6))/(nr_starting_values_per_dimension+1);
- for d7 = 1:nr_starting_values_per_dimension
- val7 = k0_2T4k_vasc2k_lower_bound(7) + d4*(k0_2T4k_vasc2k_upper_bound(7) - k0_2T4k_vasc2k_lower_bound(7))/(nr_starting_values_per_dimension+1);
- counter = counter + 1;
- k0_2T4k_vasc2k_all_values(counter,:) = [val1 val2 val3 val4 val5 val6 val7];
- end
- end
- end
- end
- end
- end
- nr_k0_2T4k_vasc2k = size(k0_2T4k_vasc2k_all_values,1);
- end
- end
- %% LOOP OVER SUBJECTS
- %--------------------------------------------------------------------------
- parpool(nr_parpool);
- for subj = 1:nr_subjects
- % PREP WORK
- clear subjectdir subjectname dir_anat dir_pet dir_deriv* dir_firstlevel dir_tmp dir_anat2 DV_Logan
- clear tmp_frames frames_timing nr_frames acqtimes FRAMEDURATION MIDSCANTIMES WEIGHTS_PET
- clear name_logfile fid go go_GM go_WM go_CSF go_PET go_frames go_input go_metab Vref Vref_tmp
- subjectname = SUBJECTS{subj};
- subjectdir = fullfile(maindir,subjectname);
- if ~isempty(sessiondir)
- dir_pet = fullfile(fullfile(subjectdir,sessiondir),['pet_' infostring_tracer]);
- dir_deriv = fullfile(derivpetdir,subjectname,sessiondir);
- dir_deriv_tmp = fullfile(dir_deriv,'tmp');
- dir_deriv_anat2 = fullfile(dir_deriv,'anat');
- dir_firstlevel = fullfile(firstlevelpetdir,subjectname,sessiondir);
- if ~exist(dir_firstlevel,'dir')
- mkdir(dir_firstlevel);
- end
- else
- dir_pet = fullfile(subjectdir,['pet_' infostring_tracer]);
- dir_deriv = fullfile(derivpetdir,subjectname);
- dir_deriv_tmp = fullfile(dir_deriv,'tmp');
- dir_deriv_anat2 = fullfile(dir_deriv,'anat');
- dir_firstlevel = fullfile(firstlevelpetdir,subjectname);
- if ~exist(dir_firstlevel,'dir')
- mkdir(dir_firstlevel);
- end
- end
- if save_figures == 1
- dir_figures = fullfile(dir_deriv,'figures');
- if exist(dir_figures,'dir') ~= 7
- mkdir(dir_figures);
- end
- end
- fprintf('working on subject %s \n',subjectname);
- name_logfile = fullfile(dir_deriv,'LCN12_PET_TSPO_DPA714_log.txt');
- fid = fopen(name_logfile,'a+');
- fprintf(fid,'subject = %s\n',subjectname);
- fprintf(fid,'LCN12_PET_TSPO_DPA714_compare_models.m \n');
- fprintf(fid,'%c','-'*ones(1,30));
- fprintf(fid,'\n');
- fprintf(fid,'Processing started at %s\n',datetime('now'));
- fprintf(fid,'\n');
- fprintf(fid,'Settings\n');
- fprintf(fid,'brain_mask_file = %s\n',brain_mask_file);
- fprintf(fid,'figures_on = %i\n',figures_on);
- fprintf(fid,'save_figures = %i\n',save_figures);
- fprintf(fid,'atlas_filename = %s\n',atlas_filename);
- if exist('intersect_GM','var') == 1
- fprintf(fid,'intersect_GM = %i\n',intersect_GM);
- else
- fprintf(fid,'intersect_GM = not defined \n');
- end
- if exist('intersect_WM','var') == 1
- fprintf(fid,'intersect_WM = %i\n',intersect_WM);
- else
- fprintf(fid,'intersect_WM = not defined \n');
- end
- if exist('GM_CUTOFF','var') == 1
- fprintf(fid,'GM_CUTOFF = %4,2f\n',GM_CUTOFF);
- else
- fprintf(fid,'GM_CUTOFF = not defined \n');
- end
- if exist('WM_CUTOFF','var') == 1
- fprintf(fid,'WM_CUTOFF = %4.2f\n',WM_CUTOFF);
- else
- fprintf(fid,'WM_CUTOFF = not defined \n');
- end
- fprintf(fid,'p0_hill = [%4.2f %4.2f] \n',p0_hill(1),p0_hill(2));
- for m = 1:nr_models
- modelname = model_list{m,1};
- if strcmp(modelname,'Logan_input')
- fprintf(fid,'logan_start_time (min) = %i \n',logan_start_time);
- end
- if strcmp(modelname,'2T4k')
- fprintf(fid,'k0_2T4k_lower_bound = [%4.3f %4.3f %4.3f %4.3f %4.3f] \n',k0_2T4k_lower_bound(1),k0_2T4k_lower_bound(2),k0_2T4k_lower_bound(3),k0_2T4k_lower_bound(4));
- fprintf(fid,'k0_2T4k_upper_bound = [%4.3f %4.3f %4.3f %4.3f %4.3f] \n',k0_2T4k_upper_bound(1),k0_2T4k_upper_bound(2),k0_2T4k_upper_bound(3),k0_2T4k_upper_bound(4));
- end
- if strcmp(modelname,'2T4k_Vb')
- fprintf(fid,'k0_2T4k_Vb_lower_bound = [%4.3f %4.3f %4.3f %4.3f %4.3f] \n',k0_2T4k_Vb_lower_bound(1),k0_2T4k_Vb_lower_bound(2),k0_2T4k_Vb_lower_bound(3),k0_2T4k_Vb_lower_bound(4),k0_2T4k_Vb_lower_bound(5));
- fprintf(fid,'k0_2T4k_Vb_upper_bound = [%4.3f %4.3f %4.3f %4.3f %4.3f] \n',k0_2T4k_Vb_upper_bound(1),k0_2T4k_Vb_upper_bound(2),k0_2T4k_Vb_upper_bound(3),k0_2T4k_Vb_upper_bound(4),k0_2T4k_Vb_upper_bound(5));
- end
- if strcmp(modelname,'2T4k_vasc1k')
- fprintf(fid,'k0_2T4k_vasc1k_lower_bound = [%4.3f %4.3f %4.3f %4.3f %4.3f %4.3f] \n',k0_2T4k_vasc1k_lower_bound(1),k0_2T4k_vasc1k_lower_bound(2),k0_2T4k_vasc1k_lower_bound(3),k0_2T4k_vasc1k_lower_bound(4),k0_2T4k_vasc1k_lower_bound(5),k0_2T4k_vasc1k_lower_bound(6));
- fprintf(fid,'k0_2T4k_vasc1k_upper_bound = [%4.3f %4.3f %4.3f %4.3f %4.3f %4.3f] \n',k0_2T4k_vasc1k_upper_bound(1),k0_2T4k_vasc1k_upper_bound(2),k0_2T4k_vasc1k_upper_bound(3),k0_2T4k_vasc1k_upper_bound(4),k0_2T4k_vasc1k_upper_bound(5),k0_2T4k_vasc1k_upper_bound(6));
- end
- if strcmp(modelname,'2T4k_vasc2k')
- fprintf(fid,'k0_2T4k_vasc2k_lower_bound = [%4.3f %4.3f %4.3f %4.3f %4.3f %4.3f %4.3f] \n',k0_2T4k_vasc2k_lower_bound(1),k0_2T4k_vasc2k_lower_bound(2),k0_2T4k_vasc2k_lower_bound(3),k0_2T4k_vasc2k_lower_bound(4),k0_2T4k_vasc2k_lower_bound(5),k0_2T4k_vasc2k_lower_bound(6),k0_2T4k_vasc2k_lower_bound(7));
- fprintf(fid,'k0_2T4k_vasc2k_upper_bound = [%4.3f %4.3f %4.3f %4.3f %4.3f %4.3f %4.3f] \n',k0_2T4k_vasc2k_upper_bound(1),k0_2T4k_vasc2k_upper_bound(2),k0_2T4k_vasc2k_upper_bound(3),k0_2T4k_vasc2k_upper_bound(4),k0_2T4k_vasc2k_upper_bound(5),k0_2T4k_vasc2k_upper_bound(6),k0_2T4k_vasc2k_upper_bound(7));
- end
- end
- % CHECK IF WE CAN FIND ALL INPUT DATA IN MNI SPACE
- [filename_GM,go_GM] = LCN_check_filename(dir_deriv_anat2,['wc1' subjectname '*.nii']);
- [filename_WM,go_WM] = LCN_check_filename(dir_deriv_anat2,['wc2' subjectname '*.nii']);
- [filename_CSF,go_CSF] = LCN_check_filename(dir_deriv_anat2,['wc3' subjectname '*.nii']);
- [filename_wPET,go_PET] = LCN_check_filename(dir_deriv,['w' subjectname '*_' infostring_tracer '*_' infostring_PET '.nii']);
- [frame_definition_file,go_frames] = LCN_check_filename(dir_pet,[subjectname '_*' infostring_tracer '_' infostring_PET '_' infostring_frames '.m']);
- [input_file,go_input] = LCN_check_filename(dir_pet,[subjectname '_*' infostring_tracer '_' infostring_input '.m']);
- [metab_file,go_metab] = LCN_check_filename(dir_pet,[subjectname '_*' infostring_tracer '_' infostring_metab '.m']);
- % READ PLASMA AND BLOOD DATA, PERFORM CALCULATIONS, AND ANALYSE DATA
- if go_frames == 1 % frame definition file found
- % read the frame definition file
- fprintf(fid,'Timing file: %s\n',frame_definition_file);
- copyfile(frame_definition_file,'tmp_frames.m');
- tmp_frames; % the variable frames_timing is now known
- delete('tmp_frames.m');
- nr_frames = size(frames_timing,1);
- % calculate midscan times (in minutes)
- acqtimes = frames_timing(:,1:2)/60; % in minutes
- FRAMEDURATION = acqtimes(:,2)-acqtimes(:,1);
- MIDSCANTIMES = acqtimes(:,1) + FRAMEDURATION/2;
- else
- fprintf(fid,'frame definition file not found for subject %s \n',subjectname);
- continue;
- end
- if go_input*go_metab == 1
- clear ref_time scanner_time
- % read the input data and metab data
- fprintf(fid,'Input file: %s\n',input_file);
- copyfile(input_file,'tmp_input_file.m');
- tmp_input_file; % the variable input and calibrationfactor_wellcounter are now known
- delete('tmp_input_file.m');
- fprintf(fid,'Metab file: %s\n',metab_file);
- copyfile(metab_file,'tmp_metab_file.m');
- tmp_metab_file; % the variable data_metab is now known
- delete('tmp_metab_file.m');
- % analyse the metab data
- TIME_METAB = data_metab(:,1)/60; % time p.i. in min
- FRACTION_INTACT_TRACER = data_metab(:,2)/100; % fraction intact tracer
- if size(data_metab,2) == 3
- WEIGHTS_METAB = data_metab(:,3);
- else
- WEIGHTS_METAB = ones(size(data_metab,1),1);
- end
- % normalize WEIGHTS
- WEIGHTS_METAB = WEIGHTS_METAB/sum(WEIGHTS_METAB);
- % apply a hill fit for the metabolites
- % nr_params_hill = length(p0_hill);
- % nr_samples = length(TIME_METAB);
- clear pfit res intact_fine
- % fit hill model
- cost_function = @(p) norm(WEIGHTS_METAB .* (LCN_calc_intact_tracer_hill(p,TIME_METAB)' - FRACTION_INTACT_TRACER));
- [pfit, error] = fminsearch(cost_function, p0_hill);
- if figures_on == 1 || save_figures == 1
- close('all');
- hfig1 = figure(1);
- set(hfig1,'Name',subjectname);
- plot(TIME_METAB,FRACTION_INTACT_TRACER,'o')
- axis([0 1.1*max(TIME_METAB) 0 1])
- hold on
- fine_time = (0:0.01:max(TIME_METAB))';
- intact_fine = LCN_calc_intact_tracer_hill(pfit,fine_time);
- plot(fine_time,intact_fine)
- title('hill');
- xlabel('time (min)')
- ylabel('fraction intact tracer')
- if save_figures == 1
- cd(dir_figures);
- saveas(hfig1,['fig_metab_' subjectname '.fig']);
- else
- pause
- end
- end
- % analyse the input data (plasma and blood)
- % if the variables ref_time and scanner_time exist, we need to
- % correct for decay between measurement of samples and start scan.
- % if they are not available, it means that the data are not yet
- % corrected for this time difference and it will be done here.
- if exist('ref_time','var') == 1 && exist('scanner_time','var') == 1
- % correct blood data for decay between start scan and start measurement and well counter
- dt = minutes(duration(datetime(ref_time)-datetime(scanner_time),'Format','s'));
- decay_factor = exp(log(2)*dt/thalf_F18);
- input(:,2) = input(:,2).*decay_factor;
- input(:,3) = input(:,3).*decay_factor;
- end
- % calculate corrected inputcurve
- time_input = input(:,1)/60; % time in min
- [correction] = LCN_calc_intact_tracer_hill(pfit,time_input);
- uncor_input = calibrationfactor_wellcounter.*input(:,2)/(60*1000); % in kBq/ml
- corrected_input = calibrationfactor_wellcounter.*correction.*input(:,2)/(60*1000); % in kBq/ml
- uncor_blood = calibrationfactor_wellcounter.*input(:,3)/(60*1000); % in kBq/ml
- TIME = [0; time_input];
- FINETIMES = (0:STEP:max(TIME))';
- CA = [0; corrected_input];
- CA_WB = [0; uncor_blood];
- CA_FINETIMES = interp1q(TIME,CA,FINETIMES);
- CA_MIDSCANTIMES = interp1q(TIME,CA,MIDSCANTIMES);
- CA_WB_FINETIMES = interp1q(TIME,CA_WB,FINETIMES);
- if figures_on == 1 || save_figures == 1
- hfig2 = figure(2);
- set(hfig2,'Name',subjectname);
- subplot(1,2,1);
- plot(time_input,uncor_input,'o');
- hold on
- plot(time_input,corrected_input);
- axis([0 1.1*max(time_input) 0 max(uncor_input)]);
- title('plasma input function');
- xlabel('time (min)');
- ylabel('kBq/ml');
- subplot(1,2,2);
- plot(time_input,uncor_blood,'*r');
- axis([0 1.1*max(time_input) 0 max(uncor_blood)]);
- title('whole blood');
- xlabel('time (min)');
- ylabel('kBq/ml');
- if save_figures == 1
- cd(dir_figures);
- saveas(hfig2,['fig_input_' subjectname '.fig']);
- else
- pause
- end
- end
- end
- % READ BRAIN DATA
- if go_PET == 1 % dynamic data are found
- % reading data in MNI space
- fprintf('reading data of subject %s',subjectname);
- fprintf(fid,'\n');
- fprintf(fid,'Reading data in MNI space started: %s \n',datetime('now'));
- if pet_space_reference
- Vref_tmp = spm_vol(filename_wPET);
- Vref = Vref_tmp(1);
- % read dynamic data
- dydata = zeros(Vref.dim(1),Vref.dim(2),Vref.dim(3),nr_frames);
- for frame = 1:nr_frames
- clear tmp
- tmp = LCN12_read_image([filename_wPET ',' num2str(frame)],Vref);
- dydata(:,:,:,frame) = tmp/1000; %in kBq/ml
- end
- else
- atlas = atlas_orig;
- Vref = Vatlas_orig;
- dydata = zeros(Vref.dim(1),Vref.dim(2),Vref.dim(3),nr_frames);
- for frame = 1:nr_frames
- clear tmp
- tmp = LCN12_read_image([filename_wPET ',' num2str(frame)],Vref);
- dydata(:,:,:,frame) = tmp/1000; %in kBq/ml
- end
- end
- % load the file excluded_frames
- [filename_excluded_frames,~] = LCN_check_filename(dir_deriv,'excluded_frames_*pet.mat');
- load(filename_excluded_frames); % now the variable excluded_frames is know
- frames_ok = setdiff(1:nr_frames,excluded_frames)';
- idx_frames = MIDSCANTIMES > logan_start_time;
- if size(frames_ok,1) < (size(FRAMEDURATION,1) - sum(idx_frames) + 2) % we need at least 3 points to fit the Logan regression line
- fprintf('\nWARNING: all frames after logan start time %d are excluded based on head motion, Logan cannot be fit - skipping subject %s\n', logan_start_time, subjectname);
- continue
- end
- % read brain mask in MNI
- fprintf(fid,'brain mask: %s\n',brain_mask_file);
- brain_mask_img = LCN12_read_image(brain_mask_file,Vref);
- % determine masks
- brain_mask = (brain_mask_img > 0.5);
- % get the voxel size
- tmp = spm_imatrix(Vref.mat); % tmp(7:9) are the voxel sizes
- voxelsize_wPET = abs(tmp(7:9));
- else
- fprintf('Dynamic data of subject %s not found \n',subjectname);
- continue;
- end
- if go_GM*go_WM*go_CSF == 1
- % read segmentations
- fprintf(fid,'GM: %s\n',filename_GM);
- GMimg = LCN12_read_image(filename_GM,Vref);
- fprintf(fid,'WM: %s\n',filename_WM);
- WMimg = LCN12_read_image(filename_WM,Vref);
- fprintf(fid,'CSF: %s\n',filename_CSF);
- CSFimg = LCN12_read_image(filename_CSF,Vref);
- end
- fprintf('... done\n');
- fprintf(fid,'reading data ended at %s\n',datetime('now'));
- if figures_on == 1 || save_figures == 1
- hfig3 = figure(3);
- hfig4 = figure(4);
- end
- % INITIATE VARIABLES FOR MODEL (COMPARISON) RESULTS
- for m = 1:nr_models
- modelname = model_list{m,1};
- if strcmp(modelname,'Logan_input')
- results_region_based_Logan_input_DV(subj,1) = {subjectname};
- results_region_based_Logan_input_error(subj,1) = {subjectname};
- if save_parcelimgs
- atlas_Logan_input_DV = zeros(size(atlas_orig));
- atlas_Logan_input_error = zeros(size(atlas_orig));
- end
- end
- if strcmp(modelname,'2T4k')
- results_region_based_2T4k_K1(subj,1) = {subjectname};
- results_region_based_2T4k_k2(subj,1) = {subjectname};
- results_region_based_2T4k_k3(subj,1) = {subjectname};
- results_region_based_2T4k_k4(subj,1) = {subjectname};
- results_region_based_2T4k_DV(subj,1) = {subjectname};
- results_region_based_2T4k_error(subj,1) = {subjectname};
- if save_parcelimgs
- atlas_2T4k_K1 = zeros(size(atlas_orig));
- atlas_2T4k_k2 = zeros(size(atlas_orig));
- atlas_2T4k_k3 = zeros(size(atlas_orig));
- atlas_2T4k_k4 = zeros(size(atlas_orig));
- atlas_2T4k_DV = zeros(size(atlas_orig));
- atlas_2T4k_error = zeros(size(atlas_orig));
- end
- end
- if strcmp(modelname,'2T4k_Vb')
- results_region_based_2T4k_Vb_K1(subj,1) = {subjectname};
- results_region_based_2T4k_Vb_k2(subj,1) = {subjectname};
- results_region_based_2T4k_Vb_k3(subj,1) = {subjectname};
- results_region_based_2T4k_Vb_k4(subj,1) = {subjectname};
- results_region_based_2T4k_Vb_Vb(subj,1) = {subjectname};
- results_region_based_2T4k_Vb_DV(subj,1) = {subjectname};
- results_region_based_2T4k_Vb_error(subj,1) = {subjectname};
- if save_parcelimgs
- atlas_2T4k_Vb_K1 = zeros(size(atlas_orig));
- atlas_2T4k_Vb_k2 = zeros(size(atlas_orig));
- atlas_2T4k_Vb_k3 = zeros(size(atlas_orig));
- atlas_2T4k_Vb_k4 = zeros(size(atlas_orig));
- atlas_2T4k_Vb_Vb = zeros(size(atlas_orig));
- atlas_2T4k_Vb_DV = zeros(size(atlas_orig));
- atlas_2T4k_Vb_error = zeros(size(atlas_orig));
- end
- end
- if strcmp(modelname,'2T4k_vasc1k')
- results_region_based_2T4k_vasc1k_K1(subj,1) = {subjectname};
- results_region_based_2T4k_vasc1k_k2(subj,1) = {subjectname};
- results_region_based_2T4k_vasc1k_k3(subj,1) = {subjectname};
- results_region_based_2T4k_vasc1k_k4(subj,1) = {subjectname};
- results_region_based_2T4k_vasc1k_Vb(subj,1) = {subjectname};
- results_region_based_2T4k_vasc1k_K1v(subj,1) = {subjectname};
- results_region_based_2T4k_vasc1k_DV(subj,1) = {subjectname};
- results_region_based_2T4k_vasc1k_error(subj,1) = {subjectname};
- if save_parcelimgs
- atlas_2T4k_vasc1k_K1 = zeros(size(atlas_orig));
- atlas_2T4k_vasc1k_k2 = zeros(size(atlas_orig));
- atlas_2T4k_vasc1k_k3 = zeros(size(atlas_orig));
- atlas_2T4k_vasc1k_k4 = zeros(size(atlas_orig));
- atlas_2T4k_vasc1k_Vb = zeros(size(atlas_orig));
- atlas_2T4k_vasc1k_K1v = zeros(size(atlas_orig));
- atlas_2T4k_vasc1k_DV = zeros(size(atlas_orig));
- atlas_2T4k_vasc1k_error = zeros(size(atlas_orig));
- end
- end
- if strcmp(modelname,'2T4k_vasc2k')
- results_region_based_2T4k_vasc2k_K1(subj,1) = {subjectname};
- results_region_based_2T4k_vasc2k_k2(subj,1) = {subjectname};
- results_region_based_2T4k_vasc2k_k3(subj,1) = {subjectname};
- results_region_based_2T4k_vasc2k_k4(subj,1) = {subjectname};
- results_region_based_2T4k_vasc2k_Vb(subj,1) = {subjectname};
- results_region_based_2T4k_vasc2k_K1v(subj,1) = {subjectname};
- results_region_based_2T4k_vasc2k_k2v(subj,1) = {subjectname};
- results_region_based_2T4k_vasc2k_DV(subj,1) = {subjectname};
- results_region_based_2T4k_vasc2k_error(subj,1) = {subjectname};
- if save_parcelimgs
- atlas_2T4k_vasc2k_K1 = zeros(size(atlas_orig));
- atlas_2T4k_vasc2k_k2 = zeros(size(atlas_orig));
- atlas_2T4k_vasc2k_k3 = zeros(size(atlas_orig));
- atlas_2T4k_vasc2k_k4 = zeros(size(atlas_orig));
- atlas_2T4k_vasc2k_Vb = zeros(size(atlas_orig));
- atlas_2T4k_vasc2k_K1v = zeros(size(atlas_orig));
- atlas_2T4k_vasc2k_k2v = zeros(size(atlas_orig));
- atlas_2T4k_vasc2k_DV = zeros(size(atlas_orig));
- atlas_2T4k_vasc2k_error = zeros(size(atlas_orig));
- end
- end
- end
- results_number_voxels_VOI(subj,1) = {subjectname};
- results_region_based_AIC(4*(subj-1)+1,1) = {subjectname};
- results_region_based_SC(4*(subj-1)+1,1) = {subjectname};
- % READ ATLAS DATA
- if pet_space_reference == 1
- % read the atlas in the matrix of the subject
- atlas = LCN12_read_image(atlas_filename,Vref);
- % atlas contains non-integer values in voxels which are a mixture. We focus
- % only on voxels which are of one specific type
- % therefore, set the value of other voxels to 0
- atlas(mod(atlas,1) > 0) = 0;
- end
- % adapt weight of the frames
- WEIGHTS_PET = ones(length(MIDSCANTIMES),1);
- WEIGHTS_PET(excluded_frames) = 0;
- WEIGHTS_PET = WEIGHTS_PET./sum(WEIGHTS_PET);
- fprintf('atlas based analysis started at %s \n',datetime('now'));
- fprintf(fid,'atlas based analysis started at %s \n',datetime('now'));
- % LOOP OVER VOIS
- for voi = 1:nr_VOIS
- clear index_value VOIimg VOIname C_MEASURED
- index_value = find(parcel_values_atlas == parcel_values(voi));
- VOIname = parcel_names{1,index_value};
- fprintf(fid,'VOI %i: %s\n',index_value,VOIname);
- VOIimg = (atlas == parcel_values(voi));
- % intersect VOI with subject specific GM or WM
- if intersect_GM == 1
- VOIimg = (VOIimg > 0.5).*(GMimg > GM_CUTOFF);
- elseif intersect_WM == 1
- VOIimg = (VOIimg > 0.5).*(WMimg > WM_CUTOFF);
- end
- final_VOI_mask = (VOIimg > 0.5).*brain_mask > 0;
- results_number_voxels_VOI(subj,1+voi) = {nnz(final_VOI_mask(:) > 0)};
- if nnz(final_VOI_mask(:) > 0) < min_number_voxels
- continue;
- end
- C_MEASURED = zeros(nr_frames,1);
- for frame = 1:nr_frames
- clear tmp values
- tmp = dydata(:,:,:,frame);
- values = tmp(final_VOI_mask > 0);
- C_MEASURED(frame) = mean(values(~isnan(values)));
- end
- if window_size > 0
- % temporal filtering using a median filter
- C_MEASURED = medfilt1(C_MEASURED, window_size);
- end
- if sum(abs(C_MEASURED)) == 0
- continue;
- end
- if sum(isnan(C_MEASURED)) > 0
- continue;
- end
- % CALCULATE ALL THE MODELS
- if figures_on == 1 || save_figures == 1
- close(3);
- hfig3 = figure(3);
- set(hfig3,'Name',[subjectname ' - ' VOIname]);
- close(4);
- hfig4 = figure(4);
- set(hfig4,'Name',[subjectname ' - ' VOIname]);
- end
- for m = 1:nr_models
- modelname = model_list{m,1};
- if strcmp(modelname,'Logan_input')
- clear VD error
- if figures_on == 1 || save_figures == 1
- figure(3);
- [DV,error] = LCN_LOGAN(MIDSCANTIMES(frames_ok),C_MEASURED(frames_ok),time_input,corrected_input,logan_start_time,3);
- title('Logan input');
- if save_figures == 1
- cd(dir_figures);
- saveas(hfig3,['fig_Logan_input_VOI_' VOIname '_' suffix '.fig']);
- else
- pause
- end
- else
- [DV,error] = LCN_LOGAN(MIDSCANTIMES(frames_ok),C_MEASURED(frames_ok),time_input,corrected_input,logan_start_time,0);
- end
- results_region_based_Logan_input_DV(subj,1+voi) = {DV};
- results_region_based_Logan_input_error(subj,1+voi) = {error};
- if save_parcelimgs
- atlas_Logan_input_DV(atlas_orig == parcel_values(voi)) = DV;
- atlas_Logan_input_error(atlas_orig == parcel_values(voi)) = error;
- Logan_outputname1 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_Logan_input_DV.nii']);
- Logan_outputname2 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_Logan_input_error.nii']);
- LCN12_write_image(atlas_Logan_input_DV,Logan_outputname1, '_' + suffix + '_Logan input DV',64,Vatlas_orig);
- LCN12_write_image(atlas_Logan_input_error,Logan_outputname2, '_' + suffix + '_Logan input error',64,Vatlas_orig);
- end
- end
- if strcmp(modelname,'2T4k')
- clear tmpA tmpB index_min kfit_2T4k cost_function axvalues k0
- % start new fit from different starting positions
- tmpA = zeros(nr_k0_2T4k,4);
- tmpB = zeros(nr_k0_2T4k,1);
- cost_function = @(params) norm(WEIGHTS_PET.*(LCN_calc2_model_2T4k(params,MIDSCANTIMES,FRAMEDURATION,CA_FINETIMES,FINETIMES,CALC_OPTION,STEP) - C_MEASURED));
- parfor j = 1:nr_k0_2T4k
- k0 = k0_2T4k_all_values(j,:);
- [tmpA(j,:),tmpB(j)] = fmincon(cost_function,k0,[],[],[],[],k0_2T4k_lower_bound,k0_2T4k_upper_bound,[],options);
- end
- index_min = find(tmpB == min(tmpB));
- kfit_2T4k = tmpA(index_min(1),:);
- results_region_based_2T4k_K1(subj,1+voi) = {kfit_2T4k(1)};
- results_region_based_2T4k_k2(subj,1+voi) = {kfit_2T4k(2)};
- results_region_based_2T4k_k3(subj,1+voi) = {kfit_2T4k(3)};
- results_region_based_2T4k_k4(subj,1+voi) = {kfit_2T4k(4)};
- results_region_based_2T4k_DV(subj,1+voi) = {kfit_2T4k(1)*(1+kfit_2T4k(3)/kfit_2T4k(4))/kfit_2T4k(2)};
- results_region_based_2T4k_error(subj,1+voi) = {tmpB(index_min(1))./mean(C_MEASURED)}; % relative error
- if save_parcelimgs
- atlas_2T4k_K1(atlas_orig == parcel_values(voi)) = kfit_2T4k(1);
- atlas_2T4k_k2(atlas_orig == parcel_values(voi)) = kfit_2T4k(2);
- atlas_2T4k_k3(atlas_orig == parcel_values(voi)) = kfit_2T4k(3);
- atlas_2T4k_k4(atlas_orig == parcel_values(voi)) = kfit_2T4k(4);
- atlas_2T4k_DV(atlas_orig == parcel_values(voi)) = kfit_2T4k(1)*(1+kfit_2T4k(3)/kfit_2T4k(4))/kfit_2T4k(2);
- atlas_2T4k_error(atlas_orig == parcel_values(voi)) = tmpB(index_min(1))./mean(C_MEASURED);
- twoT4k_outputname1 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_K1.nii']);
- twoT4k_outputname2 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_k2.nii']);
- twoT4k_outputname3 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_k3.nii']);
- twoT4k_outputname4 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_k4.nii']);
- twoT4k_outputname6 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_DV.nii']);
- twoT4k_outputname7 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_error.nii']);
- LCN12_write_image(atlas_2T4k_K1,twoT4k_outputname1,'_' + suffix + '_2T4k_K1',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_k2,twoT4k_outputname2,'_' + suffix + '_2T4k_k2',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_k3,twoT4k_outputname3,'_' + suffix + '_2T4k_k3',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_k4,twoT4k_outputname4,'_' + suffix + '_2T4k_k4',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_DV,twoT4k_outputname6,'_' + suffix + '_2T4k_DV',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_error,twoT4k_outputname7,'_' + suffix + '_2T4k_error',64,Vatlas_orig);
- end
- [AIC,SC] = LCN_calc_model_selection(nnz(WEIGHTS_PET),tmpB(index_min(1)).^2,nr_params_2T4k);
- results_region_based_AIC((subj-1)*4+1,2) = {modelname};
- results_region_based_SC((subj-1)*4+1,2) = {modelname};
- results_region_based_AIC((subj-1)*4+1,2+voi) = {AIC};
- results_region_based_SC((subj-1)*4+1,2+voi) = {SC};
- if figures_on == 1 || save_figures == 1
- figure(4)
- subplot(221)
- plot(MIDSCANTIMES,C_MEASURED,'ob:');
- hold on
- plot(MIDSCANTIMES(excluded_frames),C_MEASURED(excluded_frames),'*r'); % indicating unreliable data due to head movements
- xlabel('time in min');
- ylabel('kBq/ml');
- title('2T4k');
- plot(MIDSCANTIMES,LCN_calc2_model_2T4k(kfit_2T4k,MIDSCANTIMES,FRAMEDURATION,CA_FINETIMES,FINETIMES,CALC_OPTION,STEP),'k')
- axvalues = axis;
- text(axvalues(2)*0.5,axvalues(3)+0.1*(axvalues(4)-axvalues(3)),['VD = ' num2str(kfit_2T4k(1)*(1+kfit_2T4k(3)/kfit_2T4k(4))/kfit_2T4k(2))]);
- end
- end
- if strcmp(modelname,'2T4k_Vb')
- clear tmpA tmpB index_min kfit_2T4k_Vb cost_function axvalues k0
- % start new fit from different starting positions
- tmpA = zeros(nr_k0_2T4k_Vb,5);
- tmpB = zeros(nr_k0_2T4k_Vb,1);
- cost_function = @(params) norm(WEIGHTS_PET.*(LCN_calc2_model_2T4k_Vb(params,MIDSCANTIMES,FRAMEDURATION,CA_FINETIMES,CA_WB_FINETIMES,FINETIMES,CALC_OPTION,STEP) - C_MEASURED));
- parfor j = 1:nr_k0_2T4k_Vb
- k0 = k0_2T4k_Vb_all_values(j,:);
- [tmpA(j,:),tmpB(j)] = fmincon(cost_function,k0,[],[],[],[],k0_2T4k_Vb_lower_bound,k0_2T4k_Vb_upper_bound,[],options);
- end
- index_min = find(tmpB == min(tmpB));
- kfit_2T4k_Vb = tmpA(index_min(1),:);
- results_region_based_2T4k_Vb_K1(subj,1+voi) = {kfit_2T4k_Vb(1)};
- results_region_based_2T4k_Vb_k2(subj,1+voi) = {kfit_2T4k_Vb(2)};
- results_region_based_2T4k_Vb_k3(subj,1+voi) = {kfit_2T4k_Vb(3)};
- results_region_based_2T4k_Vb_k4(subj,1+voi) = {kfit_2T4k_Vb(4)};
- results_region_based_2T4k_Vb_Vb(subj,1+voi) = {kfit_2T4k_Vb(5)};
- results_region_based_2T4k_Vb_DV(subj,1+voi) = {kfit_2T4k_Vb(1)*(1+kfit_2T4k_Vb(3)/kfit_2T4k_Vb(4))/kfit_2T4k_Vb(2)};
- results_region_based_2T4k_Vb_error(subj,1+voi) = {tmpB(index_min(1))./mean(C_MEASURED)}; % relative error
- if save_parcelimgs
- atlas_2T4k_Vb_K1(atlas_orig == parcel_values(voi)) = kfit_2T4k_Vb(1);
- atlas_2T4k_Vb_k2(atlas_orig == parcel_values(voi)) = kfit_2T4k_Vb(2);
- atlas_2T4k_Vb_k3(atlas_orig == parcel_values(voi)) = kfit_2T4k_Vb(3);
- atlas_2T4k_Vb_k4(atlas_orig == parcel_values(voi)) = kfit_2T4k_Vb(4);
- atlas_2T4k_Vb_Vb(atlas_orig == parcel_values(voi)) = kfit_2T4k_Vb(5);
- atlas_2T4k_Vb_DV(atlas_orig == parcel_values(voi)) = kfit_2T4k_Vb(1)*(1+kfit_2T4k_Vb(3)/kfit_2T4k_Vb(4))/kfit_2T4k_Vb(2);
- atlas_2T4k_Vb_error(atlas_orig == parcel_values(voi)) = tmpB(index_min(1))./mean(C_MEASURED);
- twoT4k_Vb_outputname1 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_Vb_K1.nii']);
- twoT4k_Vb_outputname2 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_Vb_k2.nii']);
- twoT4k_Vb_outputname3 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_Vb_k3.nii']);
- twoT4k_Vb_outputname4 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_Vb_k4.nii']);
- twoT4k_Vb_outputname5 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_Vb_Vb.nii']);
- twoT4k_Vb_outputname6 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_Vb_DV.nii']);
- twoT4k_Vb_outputname7 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_Vb_error.nii']);
- LCN12_write_image(atlas_2T4k_Vb_K1,twoT4k_Vb_outputname1,'_' + suffix + '2T4k_Vb_K1',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_Vb_k2,twoT4k_Vb_outputname2,'_' + suffix + '2T4k_Vb_k2',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_Vb_k3,twoT4k_Vb_outputname3,'_' + suffix + '2T4k_Vb_k3',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_Vb_k4,twoT4k_Vb_outputname4,'_' + suffix + '2T4k_Vb_k4',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_Vb_Vb,twoT4k_Vb_outputname5,'_' + suffix + '2T4k_Vb_Vb',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_Vb_DV,twoT4k_Vb_outputname6,'_' + suffix + '2T4k_Vb_DV',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_Vb_error,twoT4k_Vb_outputname7,'_' + suffix + '2T4k_Vb_error',64,Vatlas_orig);
- end
- [AIC,SC] = LCN_calc_model_selection(nnz(WEIGHTS_PET),tmpB(index_min(1)).^2,nr_params_2T4k_Vb);
- results_region_based_AIC((subj-1)*4+2,2) = {modelname};
- results_region_based_SC((subj-1)*4+2,2) = {modelname};
- results_region_based_AIC((subj-1)*4+2,2+voi) = {AIC};
- results_region_based_SC((subj-1)*4+2,2+voi) = {SC};
- if figures_on == 1 || save_figures == 1
- figure(4)
- subplot(222)
- plot(MIDSCANTIMES,C_MEASURED,'ob:');
- hold on
- plot(MIDSCANTIMES(excluded_frames),C_MEASURED(excluded_frames),'*r'); % indicating unreliable data due to head movements
- xlabel('time in min');
- ylabel('kBq/ml');
- title('2T4k\_Vb');
- plot(MIDSCANTIMES,LCN_calc2_model_2T4k_Vb(kfit_2T4k_Vb,MIDSCANTIMES,FRAMEDURATION,CA_FINETIMES,CA_WB_FINETIMES,FINETIMES,CALC_OPTION,STEP),'k')
- axvalues = axis;
- text(axvalues(2)*0.5,axvalues(3)+0.1*(axvalues(4)-axvalues(3)),['VD = ' num2str(kfit_2T4k_Vb(1)*(1+kfit_2T4k_Vb(3)/kfit_2T4k_Vb(4))/kfit_2T4k_Vb(2))]);
- end
- end
- if strcmp(modelname,'2T4k_vasc1k')
- clear tmpA tmpB index_min kfit_2T4k_vasc1k cost_function axvalues k0
- % start new fit from different starting positions
- tmpA = zeros(nr_k0_2T4k_vasc1k,6);
- tmpB = zeros(nr_k0_2T4k_vasc1k,1);
- cost_function = @(params) norm(WEIGHTS_PET.*(LCN_calc_model_2T4k_vasc1k(params,MIDSCANTIMES,FRAMEDURATION,CA_FINETIMES,CA_WB_FINETIMES,FINETIMES,CALC_OPTION,STEP) - C_MEASURED));
- parfor j = 1:nr_k0_2T4k_vasc1k
- k0 = k0_2T4k_vasc1k_all_values(j,:);
- [tmpA(j,:),tmpB(j)] = fmincon(cost_function,k0,[],[],[],[],k0_2T4k_vasc1k_lower_bound,k0_2T4k_vasc1k_upper_bound,[],options);
- end
- index_min = find(tmpB == min(tmpB));
- kfit_2T4k_vasc1k = tmpA(index_min(1),:);
- results_region_based_2T4k_vasc1k_K1(subj,1+voi) = {kfit_2T4k_vasc1k(1)};
- results_region_based_2T4k_vasc1k_k2(subj,1+voi) = {kfit_2T4k_vasc1k(2)};
- results_region_based_2T4k_vasc1k_k3(subj,1+voi) = {kfit_2T4k_vasc1k(3)};
- results_region_based_2T4k_vasc1k_k4(subj,1+voi) = {kfit_2T4k_vasc1k(4)};
- results_region_based_2T4k_vasc1k_Vb(subj,1+voi) = {kfit_2T4k_vasc1k(5)};
- results_region_based_2T4k_vasc1k_K1v(subj,1+voi) = {kfit_2T4k_vasc1k(6)};
- results_region_based_2T4k_vasc1k_DV(subj,1+voi) = {kfit_2T4k_vasc1k(1)*(1+kfit_2T4k_vasc1k(3)/kfit_2T4k_vasc1k(4))/kfit_2T4k_vasc1k(2)};
- results_region_based_2T4k_vasc1k_error(subj,1+voi) = {tmpB(index_min(1))./mean(C_MEASURED)}; % relative error
- if save_parcelimgs
- atlas_2T4k_vasc1k_K1(atlas_orig == parcel_values(voi)) = kfit_2T4k_vasc1k(1);
- atlas_2T4k_vasc1k_k2(atlas_orig == parcel_values(voi)) = kfit_2T4k_vasc1k(2);
- atlas_2T4k_vasc1k_k3(atlas_orig == parcel_values(voi)) = kfit_2T4k_vasc1k(3);
- atlas_2T4k_vasc1k_k4(atlas_orig == parcel_values(voi)) = kfit_2T4k_vasc1k(4);
- atlas_2T4k_vasc1k_Vb(atlas_orig == parcel_values(voi)) = kfit_2T4k_vasc1k(5);
- atlas_2T4k_vasc1k_K1v(atlas_orig == parcel_values(voi)) = kfit_2T4k_vasc1k(6);
- atlas_2T4k_vasc1k_DV(atlas_orig == parcel_values(voi)) = kfit_2T4k_vasc1k(1)*(1+kfit_2T4k_vasc1k(3)/kfit_2T4k_vasc1k(4))/kfit_2T4k_vasc1k(2);
- atlas_2T4k_vasc1k_error(atlas_orig == parcel_values(voi)) = tmpB(index_min(1))./mean(C_MEASURED);
- twoT4k_vasc1k_outputname1 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_vasc1k_K1.nii']);
- twoT4k_vasc1k_outputname2 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_vasc1k_k2.nii']);
- twoT4k_vasc1k_outputname3 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_vasc1k_k3.nii']);
- twoT4k_vasc1k_outputname4 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_vasc1k_k4.nii']);
- twoT4k_vasc1k_outputname5 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_vasc1k_Vb.nii']);
- twoT4k_vasc1k_outputname6 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_vasc1k_K1v.nii']);
- twoT4k_vasc1k_outputname7 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_vasc1k_DV.nii']);
- twoT4k_vasc1k_outputname8 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_vasc1k_error.nii']);
- LCN12_write_image(atlas_2T4k_vasc1k_K1,twoT4k_vasc1k_outputname1,'_' + suffix + '2T4k_vasc1k_K1',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_vasc1k_k2,twoT4k_vasc1k_outputname2,'_' + suffix + '2T4k_vasc1k_k2',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_vasc1k_k3,twoT4k_vasc1k_outputname3,'_' + suffix + '2T4k_vasc1k_k3',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_vasc1k_k4,twoT4k_vasc1k_outputname4,'_' + suffix + '2T4k_vasc1k_k4',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_vasc1k_Vb,twoT4k_vasc1k_outputname5,'_' + suffix + '2T4k_vasc1k_Vb',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_vasc1k_K1v,twoT4k_vasc1k_outputname6,'_' + suffix + '2T4k_vasc1k_K1v',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_vasc1k_DV,twoT4k_vasc1k_outputname7,'_' + suffix + '2T4k_vasc1k_DV',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_vasc1k_error,twoT4k_vasc1k_outputname8,'_' + suffix + '2T4k_vasc1k_error',64,Vatlas_orig);
- end
- [AIC,SC] = LCN_calc_model_selection(nnz(WEIGHTS_PET),tmpB(index_min(1)).^2,nr_params_2T4k_Vb);
- results_region_based_AIC((subj-1)*4+3,2) = {modelname};
- results_region_based_SC((subj-1)*4+3,2) = {modelname};
- results_region_based_AIC((subj-1)*4+3,2+voi) = {AIC};
- results_region_based_SC((subj-1)*4+3,2+voi) = {SC};
- if figures_on == 1 || save_figures == 1
- figure(4)
- subplot(223)
- plot(MIDSCANTIMES,C_MEASURED,'ob:');
- hold on
- plot(MIDSCANTIMES(excluded_frames),C_MEASURED(excluded_frames),'*r'); % indicating unreliable data due to head movements
- xlabel('time in min');
- ylabel('kBq/ml');
- title('2T4K\_vasc1k');
- plot(MIDSCANTIMES,LCN_calc_model_2T4k_vasc1k(kfit_2T4k_vasc1k,MIDSCANTIMES,FRAMEDURATION,CA_FINETIMES,CA_WB_FINETIMES,FINETIMES,CALC_OPTION,STEP),'k')
- axvalues = axis;
- text(axvalues(2)*0.5,axvalues(3)+0.1*(axvalues(4)-axvalues(3)),['VD = ' num2str(kfit_2T4k_vasc1k(1)*(1+kfit_2T4k_vasc1k(3)/kfit_2T4k_vasc1k(4))/kfit_2T4k_vasc1k(2))]);
- end
- end
- if strcmp(modelname,'2T4k_vasc2k')
- clear tmpA tmpB index_min kfit_2T4k_vasc2k cost_function axvalues k0
- % start new fit from different starting positions
- tmpA = zeros(nr_k0_2T4k_vasc2k,7);
- tmpB = zeros(nr_k0_2T4k_vasc2k,1);
- cost_function = @(params) norm(WEIGHTS_PET.*(LCN_calc_model_2T4k_vasc2k(params,MIDSCANTIMES,FRAMEDURATION,CA_FINETIMES,CA_WB_FINETIMES,FINETIMES,CALC_OPTION,STEP) - C_MEASURED));
- parfor j = 1:nr_k0_2T4k_vasc2k
- k0 = k0_2T4k_vasc2k_all_values(j,:);
- [tmpA(j,:),tmpB(j)] = fmincon(cost_function,k0,[],[],[],[],k0_2T4k_vasc2k_lower_bound,k0_2T4k_vasc2k_upper_bound,[],options);
- end
- index_min = find(tmpB == min(tmpB));
- kfit_2T4k_vasc2k = tmpA(index_min(1),:);
- results_region_based_2T4k_vasc2k_K1(subj,1+voi) = {kfit_2T4k_vasc2k(1)};
- results_region_based_2T4k_vasc2k_k2(subj,1+voi) = {kfit_2T4k_vasc2k(2)};
- results_region_based_2T4k_vasc2k_k3(subj,1+voi) = {kfit_2T4k_vasc2k(3)};
- results_region_based_2T4k_vasc2k_k4(subj,1+voi) = {kfit_2T4k_vasc2k(4)};
- results_region_based_2T4k_vasc2k_Vb(subj,1+voi) = {kfit_2T4k_vasc2k(5)};
- results_region_based_2T4k_vasc2k_K1v(subj,1+voi) = {kfit_2T4k_vasc2k(6)};
- results_region_based_2T4k_vasc2k_k2v(subj,1+voi) = {kfit_2T4k_vasc2k(7)};
- results_region_based_2T4k_vasc2k_DV(subj,1+voi) = {kfit_2T4k_vasc2k(1)*(1+kfit_2T4k_vasc2k(3)/kfit_2T4k_vasc2k(4))/kfit_2T4k_vasc2k(2)};
- results_region_based_2T4k_vasc2k_error(subj,1+voi) = {tmpB(index_min(1))./mean(C_MEASURED)}; % relative error
- if save_parcelimgs
- atlas_2T4k_vasc2k_K1(atlas_orig == parcel_values(voi)) = kfit_2T4k_vasc2k(1);
- atlas_2T4k_vasc2k_k2(atlas_orig == parcel_values(voi)) = kfit_2T4k_vasc2k(2);
- atlas_2T4k_vasc2k_k3(atlas_orig == parcel_values(voi)) = kfit_2T4k_vasc2k(3);
- atlas_2T4k_vasc2k_k4(atlas_orig == parcel_values(voi)) = kfit_2T4k_vasc2k(4);
- atlas_2T4k_vasc2k_Vb(atlas_orig == parcel_values(voi)) = kfit_2T4k_vasc2k(5);
- atlas_2T4k_vasc2k_K1v(atlas_orig == parcel_values(voi)) = kfit_2T4k_vasc2k(6);
- atlas_2T4k_vasc2k_k2v(atlas_orig == parcel_values(voi)) = kfit_2T4k_vasc2k(7);
- atlas_2T4k_vasc2k_DV(atlas_orig == parcel_values(voi)) = kfit_2T4k_vasc2k(1)*(1+kfit_2T4k_vasc2k(3)/kfit_2T4k_vasc2k(4))/kfit_2T4k_vasc2k(2);
- atlas_2T4k_vasc2k_error(atlas_orig == parcel_values(voi)) = tmpB(index_min(1))./mean(C_MEASURED);
- twoT4k_vasc2k_outputname1 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_vasc2k_K1.nii']);
- twoT4k_vasc2k_outputname2 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_vasc2k_k2.nii']);
- twoT4k_vasc2k_outputname3 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_vasc2k_k3.nii']);
- twoT4k_vasc2k_outputname4 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_vasc2k_k4.nii']);
- twoT4k_vasc2k_outputname5 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_vasc2k_Vb.nii']);
- twoT4k_vasc2k_outputname6 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_vasc2k_K1v.nii']);
- twoT4k_vasc2k_outputname7 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_vasc2k_k2v.nii']);
- twoT4k_vasc2k_outputname8 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_vasc2k_DV.nii']);
- twoT4k_vasc2k_outputname9 = fullfile(dir_firstlevel,['w' subjectname '_' suffix '_atlas_2T4k_vasc2k_error.nii']);
- LCN12_write_image(atlas_2T4k_vasc2k_K1,twoT4k_vasc2k_outputname1,'_' + suffix + '2T4k_vasc2k_K1',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_vasc2k_k2,twoT4k_vasc2k_outputname2,'_' + suffix + '2T4k_vasc2k_k2',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_vasc2k_k3,twoT4k_vasc2k_outputname3,'_' + suffix + '2T4k_vasc2k_k3',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_vasc2k_k4,twoT4k_vasc2k_outputname4,'_' + suffix + '2T4k_vasc2k_k4',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_vasc2k_Vb,twoT4k_vasc2k_outputname5,'_' + suffix + '2T4k_vasc2k_Vb',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_vasc2k_K1v,twoT4k_vasc2k_outputname6,'_' + suffix + '2T4k_vasc2k_K1v',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_vasc2k_k2v,twoT4k_vasc2k_outputname7,'_' + suffix + '2T4k_vasc2k_k2v',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_vasc2k_DV,twoT4k_vasc2k_outputname8,'_' + suffix + '2T4k_vasc2k_DV',64,Vatlas_orig);
- LCN12_write_image(atlas_2T4k_vasc2k_error,twoT4k_vasc2k_outputname9,'_' + suffix + '2T4k_vasc2k_error',64,Vatlas_orig);
- end
- [AIC,SC] = LCN_calc_model_selection(nnz(WEIGHTS_PET),tmpB(index_min(1)).^2,nr_params_2T4k_Vb);
- results_region_based_AIC((subj-1)*4+4,2) = {modelname};
- results_region_based_SC((subj-1)*4+4,2) = {modelname};
- results_region_based_AIC((subj-1)*4+4,2+voi) = {AIC};
- results_region_based_SC((subj-1)*4+4,2+voi) = {SC};
- if figures_on == 1 || save_figures == 1
- figure(4)
- subplot(224)
- plot(MIDSCANTIMES,C_MEASURED,'ob:');
- hold on
- plot(MIDSCANTIMES(excluded_frames),C_MEASURED(excluded_frames),'*r'); % indicating unreliable data due to head movements
- xlabel('time in min');
- ylabel('kBq/ml');
- title('2T4K\_vasc2k');
- plot(MIDSCANTIMES,LCN_calc_model_2T4k_vasc2k(kfit_2T4k_vasc2k,MIDSCANTIMES,FRAMEDURATION,CA_FINETIMES,CA_WB_FINETIMES,FINETIMES,CALC_OPTION,STEP),'k')
- axvalues = axis;
- text(axvalues(2)*0.5,axvalues(3)+0.1*(axvalues(4)-axvalues(3)),['VD = ' num2str(kfit_2T4k_vasc2k(1)*(1+kfit_2T4k_vasc2k(3)/kfit_2T4k_vasc2k(4))/kfit_2T4k_vasc2k(2))]);
- end
- end
- end % for loop models
- if save_figures == 1
- cd(dir_figures);
- saveas(hfig4,['fig_4models_' VOIname '_' suffix '.fig']);
- else
- pause
- end
- end % for loop VOIs
- fprintf('atlas based analysis ended at %s \n',datetime('now'));
- fprintf(fid,'atlas based analysis ended at %s \n',datetime('now'));
- % GENERATE A VOXEL-BASED PARAMETRIC IMAGE FOR LOGAN INPUT
- if do_voxelwise_logan
- clear DV_Logan DV_Logan_error outputname1 outputname2 Vout1 Vout2
- dimx = Vref.dim(1);
- dimy = Vref.dim(2);
- dimz = Vref.dim(3);
- fprintf('start additional smoothing at %s \n',datetime('now'));
- fprintf(fid,'start additional smoothing at %s \n',datetime('now'));
- % smooth the images
- sdydata = zeros(dimx*dimy*dimz,size(dydata,4));
- if intersect_GM == 1
- brain_mask = (brain_mask > 0).*(GMimg > GM_CUTOFF);
- end
- if intersect_WM == 1
- brain_mask = (brain_mask > 0).*(WMimg > WM_CUTOFF);
- end
- for frame = 1:nr_frames
- clear tmp stmp
- tmp = squeeze(dydata(:,:,:,frame)).*(brain_mask > 0);
- stmp = LCN12_smooth(tmp,[additional_smooth_parametric additional_smooth_parametric additional_smooth_parametric]./voxelsize_wPET,brain_mask);
- sdydata(:,frame) = stmp(:);
- end
- fprintf('additional smoothing ended at %s \n',datetime('now'));
- fprintf(fid,'additional smoothing ended at %s \n',datetime('now'));
- % run voxel-based Logan analysis
- indexlist = find(brain_mask(:) == 1);
- datavalues = sdydata(indexlist,:);
- tmpA = [];
- tmpB = [];
- tmp1 = zeros(dimx*dimy*dimz,1);
- tmp2 = zeros(dimx*dimy*dimz,1);
- fprintf('voxel based analysis for Logan_input started at %s \n',datetime('now'));
- fprintf(fid,'voxel based analysis for Logan_input started at %s \n',datetime('now'));
- datavalues_ok = datavalues(:,frames_ok);
- midscantimes_ok = MIDSCANTIMES(frames_ok);
- parfor i = 1:length(indexlist)
- C_MEASURED = datavalues_ok(i,:)';
- [DV,error] = LCN_LOGAN(midscantimes_ok,C_MEASURED,time_input,corrected_input,logan_start_time,0);
- tmpA(i) = DV;
- tmpB(i) = error;
- end
- tmp1(indexlist) = tmpA;
- tmp2(indexlist) = tmpB;
- DV_Logan = reshape(tmp1,dimx,dimy,dimz);
- DV_Logan_error = reshape(tmp2,dimx,dimy,dimz);
- % save images
- outputname1 = fullfile(dir_firstlevel,['w' subjectname '_Logan_input_DV.nii']);
- outputname2 = fullfile(dir_firstlevel,['w' subjectname '_Logan_input_error.nii']);
- Vout1 = LCN12_write_image(DV_Logan,outputname1,'DV Logan',Vref.dt(1),Vref);
- Vout2 = LCN12_write_image(DV_Logan_error,outputname2,'DV Logan error',Vref.dt(1),Vref);
- fprintf('voxel based analysis for Logan_input ended at %s \n',datetime('now'));
- fprintf(fid,'voxel based analysis for Logan_input ended at %s \n',datetime('now'));
- end
- end % for loop over subjects
- %% SAVE THE RESULTS FOR THE REGION-BASED ANALYSIS
- %--------------------------------------------------------------------------
- for m = 1:nr_models
- modelname = model_list{m,1};
- if strcmp(modelname,'Logan_input')
- outputfile_excel = [outputfile_excel_region_based '_' suffix '_Logan_input.xlsx'];
- writetable(results_region_based_Logan_input_DV,outputfile_excel,'Sheet','DV');
- writetable(results_region_based_Logan_input_error,outputfile_excel,'Sheet','error');
- end
- if strcmp(modelname,'2T4k')
- outputfile_excel = [outputfile_excel_region_based '_' suffix '_2T4k.xlsx'];
- writetable(results_region_based_2T4k_K1,outputfile_excel,'Sheet','K1');
- writetable(results_region_based_2T4k_k2,outputfile_excel,'Sheet','k2');
- writetable(results_region_based_2T4k_k3,outputfile_excel,'Sheet','k3');
- writetable(results_region_based_2T4k_k4,outputfile_excel,'Sheet','k4');
- writetable(results_region_based_2T4k_DV,outputfile_excel,'Sheet','DV');
- writetable(results_region_based_2T4k_error,outputfile_excel,'Sheet','error');
- end
- if strcmp(modelname,'2T4k_Vb')
- outputfile_excel = [outputfile_excel_region_based '_' suffix '_2T4k_Vb.xlsx'];
- writetable(results_region_based_2T4k_Vb_K1,outputfile_excel,'Sheet','K1');
- writetable(results_region_based_2T4k_Vb_k2,outputfile_excel,'Sheet','k2');
- writetable(results_region_based_2T4k_Vb_k3,outputfile_excel,'Sheet','k3');
- writetable(results_region_based_2T4k_Vb_k4,outputfile_excel,'Sheet','k4');
- writetable(results_region_based_2T4k_Vb_Vb,outputfile_excel,'Sheet','Vb');
- writetable(results_region_based_2T4k_Vb_DV,outputfile_excel,'Sheet','DV');
- writetable(results_region_based_2T4k_Vb_error,outputfile_excel,'Sheet','error');
- end
- if strcmp(modelname,'2T4k_vasc1k')
- outputfile_excel = [outputfile_excel_region_based '_' suffix '_2T4k_vasc1k.xlsx'];
- writetable(results_region_based_2T4k_vasc1k_K1,outputfile_excel,'Sheet','K1');
- writetable(results_region_based_2T4k_vasc1k_k2,outputfile_excel,'Sheet','k2');
- writetable(results_region_based_2T4k_vasc1k_k3,outputfile_excel,'Sheet','k3');
- writetable(results_region_based_2T4k_vasc1k_k4,outputfile_excel,'Sheet','k4');
- writetable(results_region_based_2T4k_vasc1k_Vb,outputfile_excel,'Sheet','Vb');
- writetable(results_region_based_2T4k_vasc1k_K1v,outputfile_excel,'Sheet','K1v');
- writetable(results_region_based_2T4k_vasc1k_DV,outputfile_excel,'Sheet','DV');
- writetable(results_region_based_2T4k_vasc1k_error,outputfile_excel,'Sheet','error');
- end
- if strcmp(modelname,'2T4k_vasc2k')
- outputfile_excel = [outputfile_excel_region_based '_' suffix '_2T4k_vasc2k.xlsx'];
- writetable(results_region_based_2T4k_vasc2k_K1,outputfile_excel,'Sheet','K1');
- writetable(results_region_based_2T4k_vasc2k_k2,outputfile_excel,'Sheet','k2');
- writetable(results_region_based_2T4k_vasc2k_k3,outputfile_excel,'Sheet','k3');
- writetable(results_region_based_2T4k_vasc2k_k4,outputfile_excel,'Sheet','k4');
- writetable(results_region_based_2T4k_vasc2k_Vb,outputfile_excel,'Sheet','Vb');
- writetable(results_region_based_2T4k_vasc2k_K1v,outputfile_excel,'Sheet','K1v');
- writetable(results_region_based_2T4k_vasc2k_k2v,outputfile_excel,'Sheet','k2v');
- writetable(results_region_based_2T4k_vasc2k_DV,outputfile_excel,'Sheet','DV');
- writetable(results_region_based_2T4k_vasc2k_error,outputfile_excel,'Sheet','error');
- end
- end
- outputfile_excel = [outputfile_excel_region_based '_' suffix '_model_comparison_' char(datetime('today')) '.xlsx'];
- writetable(results_region_based_AIC,outputfile_excel,'Sheet','AIC');
- writetable(results_region_based_SC,outputfile_excel,'Sheet','SC');
- outputfile_excel = [outputfile_excel_region_based '_' suffix '_nr_voxels_used_' char(datetime('today')) '.xlsx'];
- writetable(results_number_voxels_VOI,outputfile_excel,'Sheet','nr of voxels');
- cd(curdir);
- fprintf('ALL DONE\n');
LaBGAScore_pet_model_TSPO_DPA714.m at commit 75a8bc9, under GPL-3.0 · at the source
Overview
15 affiliations
- Laboratory for Brain-Gut Axis Studies (LaBGAS), Translational Research in Gastrointestinal Disorders (TARGID), Department of Chronic Diseases and Metabolism (CHROMETA), KU Leuven, Leuven, Belgium
- REVAL – Rehabilitation Research Center, Faculty of Rehabilitation Sciences, Hasselt University, Diepenbeek, Belgium
- Leuven Brain Institute, KU Leuven, Leuven, Belgium
- Pain in Motion Research Group (PAIN), Department of Physiotherapy, Faculty of Physical Education and Physiotherapy, Vrije Universiteit Brussel, Brussels, Belgium
- Experimental Health Psychology Research Group, Faculty of Psychology and Neuroscience, Maastricht University, Maastricht, 6211 LK, the Netherlands
- University Psychiatric Center KU Leuven, University Hospitals Leuven, Leuven, Belgium
- Mind Body Research, Psychiatry Research Group, Department of Neurosciences, KU Leuven, Leuven, Belgium
- Laboratory for Cognitive Neurology, Department of Neurosciences, KU Leuven, Leuven, Belgium
- Translational MRI, Department of Imaging & Pathology, KU Leuven, Leuven, Belgium
- Movement Control & Neuroplasticity Research Group, Department of Movement Sciences, Group Biomedical Sciences, KU Leuven, Heverlee, Belgium
- Institute of Medical Psychology and Behavioral Immunobiology, Center for Translational Neuro- and Behavioral Sciences (C-TNBS), University Hospital Essen, University of Duisburg-Essen, Essen, Germany
- Laboratory of Digestion and Absorption (DigALab), Translational Research Center in Gastrointestinal Disorders (TARGID), Department of Chronic Diseases and Metabolism (CHROMETA), KU Leuven, Leuven, Belgium
- Health Psychology, Faculty of Psychology and Educational Sciences, KU Leuven, Leuven, Belgium
- Laboratory of Molecular Bacteriology, Rega Institute, KU Leuven, Leuven, Belgium
- Cognitive & Affective Neuroscience Lab (CANLab), Department of Psychological and Brain Sciences, Dartmouth College, Hanover, NH, USA
Abstract
The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.
Repositories
Its files are read in the Code ↔ Paper reader above, with 16 matches between paragraphs and lines of code.
labgas/labgascore
75a8bc9e5bc708c2d5ca78efd2c05602220140b2, 24 September 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
162 files
- atlas_mask_tools/
LaBGAScore_atlas_binary_ , MATLAB, 261 linesmask_from_atlas.m - atlas_mask_tools/
LaBGAScore_atlas_rois_fr , MATLAB, 434 linesom_atlas.m - clean/
LaBGAScore_check_all_scr , MATLAB, 114 linesipts.m - clean/
LaBGAScore_check_display , MATLAB, 200 lines.m - clean/
LaBGAScore_clean_gzip_al , MATLAB, 83 linesl_nii.m - clean/
LaBGAScore_clean_sourced , MATLAB, 34 linesata.m - clean/
LaBGAScore_dep_build_ind , MATLAB, 319 linesex.m - clean/
LaBGAScore_dep_map.m , MATLAB, 682 lines - clean/
LaBGAScore_dep_report.m , MATLAB, 368 lines - clean/
LaBGAScore_move_repos_ma , MATLAB, 21 linestlabpath.m - clean/
LaBGAScore_prov_gitinfo. , MATLAB, 259 linesm - clean/
LaBGAScore_prov_gitstatu , MATLAB, 268 liness.m - clean/
LaBGAScore_prov_protect_ , MATLAB, 210 linesreflogs.m - clean/
LaBGAScore_prov_publish. , MATLAB, 439 linesm - clean/
LaBGAScore_prov_resolve_ , MATLAB, 1,237 linesretrospective.m - clean/
LaBGAScore_prov_snapshot , MATLAB, 533 lines.m - clean/
LaBGAScore_run_reports.m , MATLAB, 284 lines - clean/
LaBGAScore_smart_paralle , MATLAB, 54 linesl_pool_setup.m - clean/
checker_positive_control , MATLAB, 137 liness/ control_mvpa_reg_cov_per mutation.m - clean/
checker_positive_control , MATLAB, 36 liness/ control_set_after_use.m - clean/
checker_positive_control , MATLAB, 32 liness/ control_use_before_def.m - clean/
checker_positive_control , Shell, 34 liness/ run_controls.sh - clean/
labgascore_prov_protect_ , Shell, 66 linesreflogs.sh - clean/
labgascore_run_headless. , Shell, 230 linessh - clean/
set_after_use.py , Python, 87 lines - clean/
use_before_def.py , Python, 69 lines - cosmomvpa/
LaBGAScore_cosmomvpa_sea , MATLAB, 626 linesrchlight_rsa.m - decoding_toolbox/
LaBGAScore_decoding_SVM_ , MATLAB, 2,004 lines, 1 matchbetween_subjects.m - decoding_toolbox/
LaBGAScore_decoding_temp , MATLAB, 412 lineslate_xclass_acc.m - decoding_toolbox/
LaBGAScore_export_scaled , MATLAB, 119 lines_contrasts.m - figures/
canlabCmap.m , MATLAB, 3 lines - figures/
cluster_surface_plots.m , MATLAB, 81 lines - figures/
plugin_set_figure_size.m , MATLAB, 381 lines - figures/
save_all_open_figures_sm , MATLAB, 199 linesart.m - firstlevel/
LaBGAScore_firstlevel_s1 , MATLAB, 462 lines_options_dsgn_struct.m - firstlevel/
LaBGAScore_firstlevel_s1 , MATLAB, 475 linesa_options_dsgn_multisess _multitask.m - firstlevel/
LaBGAScore_firstlevel_s1 , MATLAB, 569 linesb_fit_phMRI_model.m - firstlevel/
LaBGAScore_firstlevel_s2 , MATLAB, 1,102 lines_fit_model.m - firstlevel/
LaBGAScore_firstlevel_s2 , MATLAB, 2,019 linesa_fit_model_multisess_mu ltitask.m - firstlevel/
LaBGAScore_firstlevel_s2 , MATLAB, 326 linesb_phMRI_covar_contrasts. m - firstlevel/
LaBGAScore_firstlevel_s3 , MATLAB, 98 lines_diagnose_model.m - firstlevel/
LaBGAScore_firstlevel_s3 , MATLAB, 254 linesb_phMRI_signature_respon ses.m - firstlevel/
LaBGAScore_firstlevel_s3 , MATLAB, 261 linesc_phMRI_neurotransmitter _maps.m - firstlevel/
functions/ , MATLAB, 111 linesLaBGAScore_firstlevel_fi nd_events.m - firstlevel/
functions/ , MATLAB, 710 linesLaBGAScore_firstlevel_re fit_motion_comparison.m - firstlevel/
functions/ , MATLAB, 680 linesLaBGAScore_firstlevel_ta sk_motion_diagnostics.m - firstlevel/
functions/ , MATLAB, 690 linescanlab_glm_subject_level s_old.m - firstlevel/
functions/ , MATLAB, 766 linescanlab_glm_subject_level s_run1subject_old.m - graphvar/
LaBGAScore_prep_graphvar , MATLAB, 360 lines_input_from_conn.m - juspace/
LaBGAScore_juspace_corr_ , MATLAB, 141 linesbehav.m - juspace/
LaBGAScore_prep_juspace_ , MATLAB, 308 linesinput.m - mrs/
LaBGAScore_mrs_osprey_jo , MATLAB, 393 linesbfile_GE.m - mrs/
LaBGAScore_mrs_osprey_jo , MATLAB, 395 lines, 1 matchbfile_Philips.m - mrs/
LaBGAScore_mrs_osprey_si , MATLAB, 383 linesngle_sess_jobfile_GE.m - mrs/
LaBGAScore_mrs_osprey_si , MATLAB, 385 lines, 1 matchngle_sess_jobfile_Philip s.m - mrs/
LaBGAScore_mrs_run_ospre , MATLAB, 317 lines, 1 matchy_GE.m - mrs/
LaBGAScore_mrs_run_ospre , MATLAB, 317 lines, 1 matchy_Philips.m - mrs/
LaBGAScore_prep_mrs2bids , MATLAB, 392 lines.m - pet/
functions/ , MATLAB, 430 lines, 2 matchesLCN12_PET_preprocessing. m - pet/
functions/ , MATLAB, 128 linesLCN12_analyze_headmoveme nt_PET.m - pet/
functions/ , MATLAB, 44 linesLCN12_generate_qc_from4D .m - pet/
functions/ , MATLAB, 57 linesLCN12_read_image.m - pet/
functions/ , MATLAB, 146 linesLCN12_realign2_dy_PET.m - pet/
functions/ , MATLAB, 178 linesLCN12_realign_dy_PET.m - pet/
functions/ , MATLAB, 56 linesLCN12_smooth.m - pet/
functions/ , MATLAB, 85 lines, 1 matchLCN12_write_image.m - pet/
functions/ , MATLAB, 28 linesLCN_3Dimage_dilate.m - pet/
functions/ , MATLAB, 86 linesLCN_LOGAN.m - pet/
functions/ , MATLAB, 57 linesLCN_calc2_model_2T4k.m - pet/
functions/ , MATLAB, 62 linesLCN_calc2_model_2T4k_Vb. m - pet/
functions/ , MATLAB, 21 linesLCN_calc_intact_tracer_h ill.m - pet/
functions/ , MATLAB, 63 linesLCN_calc_model_2T4k_vasc 1k.m - pet/
functions/ , MATLAB, 62 linesLCN_calc_model_2T4k_vasc 2k.m - pet/
functions/ , MATLAB, 22 linesLCN_calc_model_selection .m - pet/
functions/ , MATLAB, 23 linesLCN_check_filename.m - pet/
functions/ , MATLAB, 32 linesLCN_cost_intact_tracer_h ill.m - pet/
functions/ , MATLAB, 30 linesLCN_string.m - pet/
scripts/ , MATLAB, 333 linesLaBGAScore_pet_a2_set_de fault_options.m - pet/
scripts/ , MATLAB, 252 linesLaBGAScore_pet_a_set_up_ paths_always_run_first.m - pet/
scripts/ , MATLAB, 137 linesLaBGAScore_pet_dcm2bids. m - pet/
scripts/ , MATLAB, 1,435 lines, 2 matchesLaBGAScore_pet_model_TSP O_DPA714.m - pet/
scripts/ , MATLAB, 140 linesLaBGAScore_pet_prep_1_da t_behavioral_data.m - pet/
scripts/ , MATLAB, 309 linesLaBGAScore_pet_prep_2_lo ad_image_data_and_save.m - pet/
scripts/ , MATLAB, 137 linesLaBGAScore_pet_prep_4_ap ply_signatures_and_save. m - pet/
scripts/ , MATLAB, 221 linesLaBGAScore_pet_preproces s_data.m - pet/
scripts/ , MATLAB, 531 linesLaBGAScore_pet_run_plot_ PLS_ENet_pipeline.m - power/
holmthreshold.m , MATLAB, 18 lines - power/
medianIQR_to_meanSD.m , MATLAB, 47 lines - power/
print_LEAR_matrix.m , MATLAB, 57 lines - power/
sd_from_ci.m , MATLAB, 32 lines - prep/
LaBGAScore_prep_parrec2b , MATLAB, 430 linesids.m - prep/
LaBGAScore_prep_s0_defin , MATLAB, 111 linese_directories.m - prep/
LaBGAScore_prep_s1_write , MATLAB, 411 lines_events_tsv.m - prep/
LaBGAScore_prep_s1_write , MATLAB, 1,029 lines_events_tsv_multisess_mu ltitask.m - prep/
LaBGAScore_prep_s2_smoot , MATLAB, 134 linesh.m - prep/
LaBGAScore_prep_s2_smoot , MATLAB, 156 linesh_multisess.m - qr_code/
QRtoPDF.py , Python, 22 lines - qr_code/
emailQR.py , Python, 21 lines - qr_code/
email_QR_Input.py , Python, 22 lines - secondlevel/
LaBGAScore_pdm_regenerat , MATLAB, 85 linese_reports.m - secondlevel/
classes/ , MATLAB, 64 linesProgressTracker.m - secondlevel/
functions/ , MATLAB, 729 linesENet_neuroimaging_pipeli ne.m - secondlevel/
functions/ , MATLAB, 91 linesLaBGAScore_blob_montage. m - secondlevel/
functions/ , MATLAB, 111 linesLaBGAScore_pdm_report.m - secondlevel/
functions/ , MATLAB, 94 linesLaBGAScore_pdm_report_im age.m - secondlevel/
functions/ , MATLAB, 558 linesLaBGAScore_region_table. m - secondlevel/
functions/ , MATLAB, 109 linesLaBGAScore_region_table_ safe.m - secondlevel/
functions/ , MATLAB, 647 linesPLSDA_neuroimaging_pipel ine.m - secondlevel/
functions/ , MATLAB, 468 linesPLSDA_paired_neuroimagin g_pipeline.m - secondlevel/
functions/ , MATLAB, 669 linesPLSR_neuroimaging_pipeli ne.m - secondlevel/
functions/ , MATLAB, 47 linesapplyScaling.m - secondlevel/
functions/ , MATLAB, 238 linesbootstrapOOB_ENet.m - secondlevel/
functions/ , MATLAB, 122 linesbootstrapOOB_PLSDA.m - secondlevel/
functions/ , MATLAB, 125 linesbootstrapOOB_PLSR.m - secondlevel/
functions/ , MATLAB, 37 linescapLV.m - secondlevel/
functions/ , MATLAB, 113 linesdice_statistic_image.m - secondlevel/
functions/ , MATLAB, 158 linesdice_statistic_image_by_ roi.m - secondlevel/
functions/ , MATLAB, 32 linesenetLambdaGrid.m - secondlevel/
functions/ , MATLAB, 62 linesfoldPreprocess.m - secondlevel/
functions/ , MATLAB, 123 linesglobalBaselineCV.m - secondlevel/
functions/ , MATLAB, 402 linesgroup_tfce_from_subject_ maps.m - secondlevel/
functions/ , MATLAB, 13 lineslogitSafe.m - secondlevel/
functions/ , MATLAB, 27 linesmakeGroupedFolds.m - secondlevel/
functions/ , MATLAB, 83 linesmaskToSignificant.m - secondlevel/
functions/ , MATLAB, 659 linesplot_ENet_diagnostics_ne uroimaging.m - secondlevel/
functions/ , MATLAB, 552 linesplot_PLSDA_diagnostics_n euroimaging.m - secondlevel/
functions/ , MATLAB, 1,006 linesplot_PLSR_diagnostics_ne uroimaging.m - secondlevel/
functions/ , MATLAB, 333 linesquickCV_ENet.m - secondlevel/
functions/ , MATLAB, 334 linesquickCV_ENet_PR.m - secondlevel/
functions/ , MATLAB, 23 linesquickCV_PLSDA.m - secondlevel/
functions/ , MATLAB, 20 linesquickCV_PLSDA_PR.m - secondlevel/
functions/ , MATLAB, 163 linesquickCV_PLSDA_core.m - secondlevel/
functions/ , MATLAB, 134 linesquickCV_PLSR.m - secondlevel/
functions/ , MATLAB, 50 linesquickGroupedCV.m - secondlevel/
functions/ , MATLAB, 107 linesresidualizeFold.m - secondlevel/
functions/ , MATLAB, 42 linesresidualizeY.m - secondlevel/
functions/ , MATLAB, 167 linesselectENetHyperparams.m - secondlevel/
functions/ , MATLAB, 46 linessetParforStream.m - secondlevel/
functions/ , MATLAB, 38 linesswapWithinSubjectLabels. m - secondlevel/
functions/ , MATLAB, 58 linestfce_fwe_from_null.m - secondlevel/
functions/ , MATLAB, 49 linestfce_one_fmri_dat.m - secondlevel/
functions/ , MATLAB, 69 lines, 1 matchtfce_transform_3d.m - secondlevel/
functions/ , MATLAB, 93 lines, 1 matchtfce_volume.m - secondlevel/
functions/ , MATLAB, 111 linesthresholded_fmri_data_fr om_pval_nii.m - secondlevel/
functions/ , MATLAB, 110 linesthresholded_fmri_data_fr om_statistic_image.m - secondlevel/
functions/ , MATLAB, 78 linesvalidateAtlasLabels.m - secondlevel/
functions/ , MATLAB, 100 linesvalidateCovariates.m - secondlevel/
functions/ , MATLAB, 47 lineswarnUnknownOptions.m - secondlevel/
scripts/ , MATLAB, 148 linesLaBGAScore_secondlevel_M S_mat_pipeline.m - secondlevel/
scripts/ , MATLAB, 223 linesLaBGAScore_secondlevel_e xtractparcels_sessions.m - secondlevel/
scripts/ , MATLAB, 583 linesLaBGAScore_secondlevel_m vpa_beta_maps_conn.m - secondlevel/
scripts/ , MATLAB, 233 linesLaBGAScore_secondlevel_o oFmriDataObjML_example.m - secondlevel/
scripts/ , MATLAB, 364 linesLaBGAScore_secondlevel_r oi_run_plot_PLSR_pipelin e.m - secondlevel/
scripts/ , MATLAB, 413 linesLaBGAScore_secondlevel_r oi_run_plot_PLS_ENet_pip eline.m - stats_tools/
functions/ , MATLAB, 652 lines, 1 matchLaBGAScore_Storey_FDR.m - stats_tools/
functions/ , MATLAB, 73 linesLaBGAScore_combat_apply. m - stats_tools/
functions/ , MATLAB, 148 linesLaBGAScore_combat_fit.m - stats_tools/
functions/ , MATLAB, 78 linesLaBGAScore_dummy_code.m - stats_tools/
sas_macros/ , SAS, 381 lineses_identify.sas - stats_tools/
sas_macros/ , SAS, 1,000 linesmixed_effectsize.sas - LICENSE, License, 674 lines
- README.md, Text, 342 lines
labgas/CANlab_help_examples
9c03690272e0e4cb534333588b19c337e5e4b228, 24 September 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
237 files
- Canlab_simple_image_load
_prep/ , MATLAB, 26 linescanlab_simple_find_outli ers.m - Canlab_simple_image_load
_prep/ , MATLAB, 25 linescanlab_simple_mean_image _montage_by_condition.m - Canlab_simple_image_load
_prep/ , MATLAB, 53 linescanlab_simple_reload.m - Canlab_simple_image_load
_prep/ , MATLAB, 38 linescanlab_simple_set_condit ions_contrasts_colors.m - Canlab_simple_image_load
_prep/ , MATLAB, 62 linescanlab_simple_set_paths. m - Canlab_simple_image_load
_prep/ , MATLAB, 45 linescanlab_simple_workflow.m - RSA_example/
plot_rsa_results.m , MATLAB, 25 lines - RSA_example/
reorder_studies_and_subj , MATLAB, 19 linesects.m - RSA_example/
rsa_analysis_example.m , MATLAB, 36 lines - Second_level_analysis_te
mplate_scripts/ , MATLAB, 293 linesa0_begin_here_readme.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 207 linesa2_second_level_toolbox_ check_dependencies.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 92 linesa_set_up_new_analysis_fo lder_and_scripts.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 446 lines, 1 matchb_copy_to_local_scripts_ dir_and_modify/ a2_set_default_options.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 310 linesb_copy_to_local_scripts_ dir_and_modify/ a_set_up_paths_always_ru n_first.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 90 linesb_copy_to_local_scripts_ dir_and_modify/ b1_behavioral_analysis.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 26 linesb_copy_to_local_scripts_ dir_and_modify/ prep_0_batch_run_once.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 295 linesb_copy_to_local_scripts_ dir_and_modify/ prep_1_set_conditions_co ntrasts_colors.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 419 linesb_copy_to_local_scripts_ dir_and_modify/ prep_1b_prep_behavioral_ data.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 115 linesb_copy_to_local_scripts_ dir_and_modify/ prep_1b_prep_behavioral_ data_example2.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 63 linesb_copy_to_local_scripts_ dir_and_modify/ prep_1c_normalize_to_MNI .m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 28 linescore_scripts_to_run_with out_modifying/ b2_show_data_vs_underlay .m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 57 linescore_scripts_to_run_with out_modifying/ b3_eliminate_subjects_wi th_outlier_images.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 164 linescore_scripts_to_run_with out_modifying/ b_reload_saved_matfiles. m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 258 linescore_scripts_to_run_with out_modifying/ c2_SVM_contrasts.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 946 linescore_scripts_to_run_with out_modifying/ c2_SVM_contrasts_masked. m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 1,883 linescore_scripts_to_run_with out_modifying/ c2a_second_level_regress ion.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 147 linescore_scripts_to_run_with out_modifying/ c2b_SVM_betweenperson_co ntrasts.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 175 linescore_scripts_to_run_with out_modifying/ c2c_SVM_between_conditio n_contrasts.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 139 linescore_scripts_to_run_with out_modifying/ c2d_lassoPCR_contrasts.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 290 linescore_scripts_to_run_with out_modifying/ c2e_second_level_robust_ parcelwise_regression.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 1,573 linescore_scripts_to_run_with out_modifying/ c2f_run_MVPA_regression_ single_trial.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 896 linescore_scripts_to_run_with out_modifying/ c2g_run_multivariate_med iation_single_trial.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 430 linescore_scripts_to_run_with out_modifying/ c2h_run_multivariate_med iation.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 63 linescore_scripts_to_run_with out_modifying/ c3_univariate_contrast_m aps_scaleddata.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 61 linescore_scripts_to_run_with out_modifying/ c4_univ_contrast_wedge_p lot_and_lateralization_t est.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 61 linescore_scripts_to_run_with out_modifying/ c5_univ_contrast_wedge_p lot_and_lateralization_t est_scaled_data.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 179 linescore_scripts_to_run_with out_modifying/ c_univariate_contrast_ma ps.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 168 linescore_scripts_to_run_with out_modifying/ c_univariate_contrast_ma ps_scaledcontrastdata.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 180 linescore_scripts_to_run_with out_modifying/ c_univariate_contrast_ma ps_scaleddata.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 23 linescore_scripts_to_run_with out_modifying/ c_univariate_ttests_each _condition.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 241 linescore_scripts_to_run_with out_modifying/ d10_signature_riverplots .m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 166 linescore_scripts_to_run_with out_modifying/ d11_signature_similarity _barplots.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 5 linescore_scripts_to_run_with out_modifying/ d12_kragel_emotion_signa ture_responses.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 77 linescore_scripts_to_run_with out_modifying/ d13_kragel_emotion_river plots.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 166 linescore_scripts_to_run_with out_modifying/ d14_kragel_emotion_signa ture_similarity_barplots .m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 15 linescore_scripts_to_run_with out_modifying/ d15_plot_local_nps_respo nses_by_region.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 5 linescore_scripts_to_run_with out_modifying/ d1_pain_signature_respon ses_dotproduct.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 5 linescore_scripts_to_run_with out_modifying/ d1b_FAPS_signature_respo nse_dotproduct.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 5 linescore_scripts_to_run_with out_modifying/ d2_pain_signature_respon ses.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 107 linescore_scripts_to_run_with out_modifying/ d3_plot_nps_subregions.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 208 linescore_scripts_to_run_with out_modifying/ d3_plot_nps_subregions_b ars.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 74 linescore_scripts_to_run_with out_modifying/ d4_compare_NPS_SIIPS_sca ling_similarity_metrics. m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 5 linescore_scripts_to_run_with out_modifying/ d5_emotion_signature_res ponses.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 5 linescore_scripts_to_run_with out_modifying/ d6_empathy_signature_res ponses.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 5 linescore_scripts_to_run_with out_modifying/ d7_autonomic_signature_r esponses.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 5 linescore_scripts_to_run_with out_modifying/ d8_fibromyalgia_signatur e_responses.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 89 linescore_scripts_to_run_with out_modifying/ d9_nps_correlations_with _global_signal.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 166 linescore_scripts_to_run_with out_modifying/ d_signature_responses_ge neric.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 395 linescore_scripts_to_run_with out_modifying/ e1_corr_patterns.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 174 linescore_scripts_to_run_with out_modifying/ f2_bucknerlab_network_ba rplots.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 180 linescore_scripts_to_run_with out_modifying/ f2_bucknerlab_network_we dgeplots.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 78 linescore_scripts_to_run_with out_modifying/ g2_bucknerlab_network_ri verplots.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 90 linescore_scripts_to_run_with out_modifying/ h1_group_differences_FAP S.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 90 linescore_scripts_to_run_with out_modifying/ h2_group_differences_emo signatures.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 91 linescore_scripts_to_run_with out_modifying/ h2_group_differences_emo signatures_conditions.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 111 linescore_scripts_to_run_with out_modifying/ h3_kragel_patterns_group _differences.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 236 linescore_scripts_to_run_with out_modifying/ h_group_differences_cond itions.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 1,815 linescore_scripts_to_run_with out_modifying/ h_signature_responses_gr oup_diff.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 41 linescore_scripts_to_run_with out_modifying/ j1_display_parcels.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 372 linescore_scripts_to_run_with out_modifying/ k2_neurosynth_cogcontrol _pattern_and_region_anal yses.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 348 linescore_scripts_to_run_with out_modifying/ k_emotionmeta_pattern_an d_region_analyses.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 142 linescore_scripts_to_run_with out_modifying/ mvpa_reg_cov_benchmark_a lgorithms.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 181 linescore_scripts_to_run_with out_modifying/ mvpa_reg_cov_predictive_ model.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 38 linescore_scripts_to_run_with out_modifying/ older/ z_batch_publish_svm_anal yses.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 145 linescore_scripts_to_run_with out_modifying/ plugin_add_metadata_to_D ATA_OBJ.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 309 linescore_scripts_to_run_with out_modifying/ plugin_canlab_condition_ contrast_plot.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 33 linescore_scripts_to_run_with out_modifying/ plugin_check_or_create_s lice_display.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 30 linescore_scripts_to_run_with out_modifying/ plugin_check_required_fi elds.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 54 linescore_scripts_to_run_with out_modifying/ plugin_display_study_inf o_json.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 145 linescore_scripts_to_run_with out_modifying/ plugin_extract_local_nps _region_vals.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 12 linescore_scripts_to_run_with out_modifying/ plugin_find_master_scrip t_directory.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 62 linescore_scripts_to_run_with out_modifying/ plugin_get_group_names_c olors.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 78 linescore_scripts_to_run_with out_modifying/ plugin_get_holdout_sets. m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 99 linescore_scripts_to_run_with out_modifying/ plugin_get_holdout_sets_ balanced_groups.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 70 linescore_scripts_to_run_with out_modifying/ plugin_get_holdout_sets_ lasso.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 41 linescore_scripts_to_run_with out_modifying/ plugin_get_options_for_a nalysis_script.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 68 linescore_scripts_to_run_with out_modifying/ plugin_get_parcelwise_st atistic_images.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 436 linescore_scripts_to_run_with out_modifying/ plugin_oofmridataobj_svm _contrasts_get_results_p er_subject.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 103 linescore_scripts_to_run_with out_modifying/ plugin_plot_local_nps_re gion_vals.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 43 linescore_scripts_to_run_with out_modifying/ plugin_save_figure.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 298 linescore_scripts_to_run_with out_modifying/ plugin_signature_conditi on_contrast_plot.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 256 linescore_scripts_to_run_with out_modifying/ plugin_signature_conditi on_contrast_plot_kragel_ emotion.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 72 linescore_scripts_to_run_with out_modifying/ plugin_svm_contrasts_get _fitted_obs_per_subject. m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 388 linescore_scripts_to_run_with out_modifying/ plugin_svm_contrasts_get _results_per_subject.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 57 linescore_scripts_to_run_with out_modifying/ plugin_unzip_images_if_n eeded.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 805 linescore_scripts_to_run_with out_modifying/ prep_2_load_image_data_a nd_save.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 1,072 linescore_scripts_to_run_with out_modifying/ prep_3_calc_univariate_c ontrast_maps_and_save.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 3,283 linescore_scripts_to_run_with out_modifying/ prep_3a_run_second_level _regression_and_save.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 190 linescore_scripts_to_run_with out_modifying/ prep_3b_run_SVMs_on_cont rasts_and_save.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 288 linescore_scripts_to_run_with out_modifying/ prep_3b_run_second_level _regression_on_condition s_and_save.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 959 linescore_scripts_to_run_with out_modifying/ prep_3c_run_SVMs_on_cont rasts_masked.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 226 linescore_scripts_to_run_with out_modifying/ prep_3d_run_SVM_betweenp erson_contrasts.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 366 linescore_scripts_to_run_with out_modifying/ prep_3e_run_SVM_betweenp erson_contrasts_on_condi tions.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 444 linescore_scripts_to_run_with out_modifying/ prep_3f_create_fmri_data _single_trial_object.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 388 linescore_scripts_to_run_with out_modifying/ prep_3g_create_fmri_data _runwise_contrast_object .m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 316 linescore_scripts_to_run_with out_modifying/ prep_4_apply_signatures_ and_save.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 169 linescore_scripts_to_run_with out_modifying/ prep_5_apply_shen_parcel lation_and_save.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 176 linescore_scripts_to_run_with out_modifying/ prep_5b_apply_spmanatomy _parcellation_and_save.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 58 linescore_scripts_to_run_with out_modifying/ prep_6_apply_kragel_emot ion_signatures_and_save. m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 176 linescore_scripts_to_run_with out_modifying/ prep_7_extract_painpathw ays_data.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 2,138 linescore_scripts_to_run_with out_modifying/ test_figs_prep_3a_run_se cond_level_regression_an d_save.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 29 linescore_scripts_to_run_with out_modifying/ z_batch_bucknerlab_netwo rk_analyses.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 51 linescore_scripts_to_run_with out_modifying/ z_batch_coverage_and_con trasts.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 103 linescore_scripts_to_run_with out_modifying/ z_batch_load_and_prep.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 27 linescore_scripts_to_run_with out_modifying/ z_batch_meta_analysis_ma sk_analyses.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 243 linescore_scripts_to_run_with out_modifying/ z_batch_publish_analyses .m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 10 linescore_scripts_to_run_with out_modifying/ z_batch_publish_everythi ng.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 37 linescore_scripts_to_run_with out_modifying/ z_batch_publish_image_pr ep_and_qc.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 115 linescore_scripts_to_run_with out_modifying/ z_batch_signature_analys es.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 55 linescore_scripts_to_run_with out_modifying/ z_batch_svm_analysis.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 92 linesd_additional_optional_co py_to_local_dir/ h_NPS_contrasts_between_ person_correlations.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 148 linesd_additional_optional_co py_to_local_dir/ i_ancova_stimintensity_n ps.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 115 linesd_additional_optional_co py_to_local_dir/ prep_2_data_from_fmri_ob jects.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 129 lineslist_of_scripts_and_work flow.m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 145 linesmove_betas_to_secondlvl. m - Second_level_analysis_te
mplate_scripts/ , MATLAB, 298 linesolder/ 0_begin_here_readme.m - active_inference/
Simplified_Step_by_Step_ , MATLAB, not shown hereActive_Inference_Guide.m lx - bayes_factors/
bayes_factor_test_with_r , R, 34 linesstanarm.r - canlab_dataset/
create_a_canlab_dataset_ , MATLAB, 80 linesand_import_data.m - canlab_mixed_effects_mat
lab_demo1/ , MATLAB, 504 linescanlab_mixed_model_examp le.m - canlab_mixed_effects_mat
lab_demo1/ , MATLAB, not shown herecanlab_mixed_model_examp le.mlx - canlab_mixed_effects_mat
lab_demo1/ , R, 46 lines, 1 matchcanlab_mixed_model_examp le.r - example_help_files/
BIC_model_selection.mlx , MATLAB, not shown here - example_help_files/
Comparing_model_variance , MATLAB, 11 lines_explained_BMRK4_painTas teVision/ OLD/ anj_script1 copy.m - example_help_files/
Comparing_model_variance , MATLAB, 11 lines_explained_BMRK4_painTas teVision/ OLD/ anj_script1.m - example_help_files/
Comparing_model_variance , MATLAB, 232 lines_explained_BMRK4_painTas teVision/ OLD/ glmfit_multilevel_vardec omp_old.m - example_help_files/
Comparing_model_variance , MATLAB, 54 lines_explained_BMRK4_painTas teVision/ OLD/ tmp_varexp.m - example_help_files/
Comparing_model_variance , MATLAB, 135 lines_explained_BMRK4_painTas teVision/ bmrk4_PTV_variance_decom p.m - example_help_files/
Voxel_and_image_spaces_i , MATLAB, not shown heren_CANlab_fmri_data_objec ts.mlx - example_help_files/
atlas_2012_behavioral_pl , MATLAB, 152 linesot_example_figure.m - example_help_files/
canlab_dataset_basic_usa , MATLAB, 66 linesge.m - example_help_files/
canlab_dual_regression_e , MATLAB, not shown herexample.mlx - example_help_files/
canlab_help_10_BayesFact , MATLAB, 142 linesor_map_walkthrough.m - example_help_files/
canlab_help_1_installing , MATLAB, 210 lines_tools.m - example_help_files/
canlab_help_1b_getting_h , MATLAB, not shown hereelp.mlx - example_help_files/
canlab_help_2_load_a_sam , MATLAB, 199 linesple_dataset.m - example_help_files/
canlab_help_2b_basic_ima , MATLAB, 149 linesge_visualization.m - example_help_files/
canlab_help_2c_loading_d , MATLAB, 276 linesatasets.m - example_help_files/
canlab_help_2d_publish_a , MATLAB, 98 lines_report.m - example_help_files/
canlab_help_3_voxelwise_ , MATLAB, 222 linest_test_walkthrough.m - example_help_files/
canlab_help_3b_atlases_a , MATLAB, 319 linesnd_ROI_analysis.m - example_help_files/
canlab_help_4_masking_an , MATLAB, 163 linesd_writing_nifti_files.m - example_help_files/
canlab_help_4b_3D_visual , MATLAB, 531 linesization.m - example_help_files/
canlab_help_5_regression , MATLAB, 561 lines_walkthrough.m - example_help_files/
canlab_help_7_multivaria , MATLAB, 391 lineste_prediction_basics.m - example_help_files/
canlab_help_8_riverplot_ , MATLAB, 197 linescerebellar_atlas_example .m - example_help_files/
canlab_help_9_apply_a_mu , MATLAB, 103 lines, 1 matchltivariate_pattern_of_in terest.m - example_help_files/
canlab_help_MPathI_multi , MATLAB, not shown herevariate_pathway.mlx - example_help_files/
canlab_help_annotate_thr , MATLAB, 10 linesesholded_results_map.m - example_help_files/
canlab_help_connectivity , MATLAB, 147 lines_with_brainpathway_start er_demo.m - example_help_files/
canlab_help_discriminabl , MATLAB, 39 linese_cluster_identification .m - example_help_files/
canlab_help_prep_for_con , MATLAB, not shown herenectivity.mlx - example_help_files/
canlab_help_second_level , MATLAB, 30 lines_batch_example.m - example_help_files/
canlab_help_x_network_ba , MATLAB, 137 linessed_analysis_and_lateral ization.m - example_help_files/
canlab_mediation_walkthr , MATLAB, 20 linesough1.m - example_help_files/
canlab_meta_analysis_wal , MATLAB, 255 lineskthrough1.m - example_help_files/
canlab_meta_analysis_wal , MATLAB, 194 lineskthrough2.m - example_help_files/
cifti_image_loading_and_ , MATLAB, not shown hereplotting.mlx - example_help_files/
compare_pain_patterns_se , MATLAB, 78 linesns_spec.m - example_help_files/
conf_region_example.m , MATLAB, 57 lines - example_help_files/
first_level_design_matri , MATLAB, 463 linesx_exploration.m - example_help_files/
generalizability_example , MATLAB, 57 lines.m - example_help_files/
linear_filtering_a_times , MATLAB, 74 lineseries.m - example_help_files/
make_polar_wedge_plots_f , MATLAB, 143 linesor_signatures.m - example_help_files/
map_surface2volume_with_ , MATLAB, 23 linesCBIG_tools.m - example_help_files/
map_surface2volume_with_ , MATLAB, not shown hereCBIG_tools.mlx - example_help_files/
mediation_example_script , MATLAB, 109 lines_2.m - example_help_files/
mnisurf_projection_tutor , MATLAB, not shown hereial.mlx - example_help_files/
mnisurf_surface_projecti , MATLAB, not shown hereon_tutorial.mlx - example_help_files/
neurosynth_topic_similar , MATLAB, 93 linesity_and_wedge_plot.m - example_help_files/
older/ , MATLAB, 41 linesCANlab_set_paths_example _script.m - example_help_files/
older/ , MATLAB, not shown herecanlab_help_2_load_a_sam ple_dataset_v1.mlx - example_help_files/
older/ , MATLAB, 148 linescanlab_help_2b_using_the _plot_function.m - example_help_files/
older/ , MATLAB, 188 linescanlab_help_3_voxelwise_ t_test.m - example_help_files/
older/ , MATLAB, not shown herecanlab_help_3_voxelwise_ t_test_walkthrough_v1.ml x - example_help_files/
older/ , MATLAB, 342 linescanlab_help_4b_3D_visual ization_old.m - example_help_files/
older/ , MATLAB, 35 linescanlab_help_6_multilevel _regression.m - example_help_files/
older/ , MATLAB, 52 linescanlab_help_8_apply_patt ern_of_interest.m - example_help_files/
older/ , MATLAB, 414 linescreate_and_plot_a_design _matrix.m - example_help_files/
older/ , MATLAB, 29 linessurface_cutaways_walkthr ough_old.m - example_help_files/
plot_atlas_parcels_on_sl , MATLAB, 86 linesice_montage.m - example_help_files/
run_permutation_tests.m , MATLAB, 136 lines - example_help_files/
using_canlab_atlases.m , MATLAB, 661 lines - example_help_files/
variable_dur_and_param_m , MATLAB, not shown hereod_example_code.mlx - example_help_files/
visualize_neuroimaging_d , MATLAB, 155 linesata.m - figure_gallery/
CANlab_Dartmouth_logo/ , MATLAB, 176 linesCANlab_images/ canlab_dartmouth_brainlo go.m - figure_gallery/
CANlab_Dartmouth_logo/ , MATLAB, 142 linesDpine_viz_tor.m - figure_gallery/
CANlab_Dartmouth_logo/ , MATLAB, 166 linesDpine_viz_tor2.m - figure_gallery/
CANlab_Dartmouth_logo/ , MATLAB, 110 linesDpine_viz_tor3.m - figure_gallery/
CANlab_Dartmouth_logo/ , MATLAB, 218 linescanlab_dartmouth_brainlo go.m - figure_gallery/
NPS_SIIPS_surface_figure , MATLAB, not shown heres_2025.mlx - figure_gallery/
SPM_HRF_3_basis_function , MATLAB, 112 liness/ hrf_fits_3bf.m - hyp_opt_and_mlpcr/
hyp_opt_and_mlpcr_demo.m , MATLAB, 1,172 lines - nipype/
libraries/ , Python, 1 lineglm/ __init__.py - nipype/
libraries/ , Python, 520 linesglm/ designs.py - nipype/
libraries/ , Python, 349 linesglm/ preproc.py - nipype/
libraries/ , Python, 57 linesglm/ utils.py - nipype/
libraries/ , Python, 1 linenipype_ext/ __init__.py - nipype/
libraries/ , Python, 48 linesnipype_ext/ vifs.py - nipype/
libraries/ , Python, 576 linesnipype_ext/ workbench.py - nipype/
subjectlevel/ , Python, 486 lineshcp_glm_basic.py - nipype/
subjectlevel/ , Python, 804 lineshcp_glm_grayord.py - nipype/
subjectlevel/ , Python, 390 lineshcp_single_blocks_w_conf ounds_grayordinate.py - nipype/
subjectlevel/ , Python, 288 lineshcp_single_trials_w_conf ounds.py - publish_help_files/
CANlab_help_examples_TEM , MATLAB, 126 linesPLATE.m - publish_help_files/
canlab_help_publish.m , MATLAB, 30 lines - publish_help_files/
publish_canlab_help_set1 , MATLAB, 47 lines.m - published_html/
canlab_help_surface_proj , MATLAB, 343 linesection/ mnisurf_projection_tutor ial.m - published_html/
mlpcr_demo.m/ , MATLAB, 885 linesmlpcr_demo.m - published_html/
plotting_parcellations/ , MATLAB, 87 linesplotting_parcellations.m - unfinished_examples/
BayesFactorsDemo.m , MATLAB, 39 lines - unfinished_examples/
EmoReg_BayesFactor_walkt , MATLAB, 176 lineshrough.m - unfinished_examples/
Multivariate_Connectivit , MATLAB, 174 linesy_Walkthrough.m - unfinished_examples/
bmrk3_analysis_by_temp_w , MATLAB, 253 linesalkthrough.m - unfinished_examples/
bmrk3_compare_feature_se , MATLAB, 5 linests.m - unfinished_examples/
extract_and_prep_for_con , MATLAB, 32 linesnectomics.m - unfinished_examples/
extract_gray_white_csf_t , MATLAB, 13 linesissue_compartments.m - unfinished_examples/
fMRI2015_sim_walkthrough , MATLAB, 136 lines_wani_2.m - unfinished_examples/
fMRI_regression_walkthro , MATLAB, 129 linesugh1_3d.m - unfinished_examples/
misbie_mri_show_ROIs.m , MATLAB, 72 lines - unfinished_examples/
multidimensional_scaling , MATLAB, 63 lines_mds_example_vivek.m - unfinished_examples/
predict_example_wani.m , MATLAB, 98 lines - unfinished_examples/
publish_analysis_by_temp , MATLAB, 18 lines_walkthrough.m - unfinished_examples/
regression_walkthrough.m , MATLAB, 215 lines - unfinished_examples/
render_default_mode_netw , MATLAB, 65 linesork.m - LICENSE, License, 339 lines
- README.md, Text, 358 lines
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 395 scripts, each with its path and the digest of its content;
- 16 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Code and data availability statement
The paper has a code and data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- it points to the authors' code: labgas/
CANlab_help_examples , labgas/labgascore - it says that the data are available on request
- it says that the code is available on request
Read it in the paper: doi.org/10.1016/j.bbih.2026.101299.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 28 September 2026: the first record
Recorded: type, language, journal, volume, pages, dates, 16 authors, 5 keywords, 1 funder, 156 references, 3 RRIDs.
Cite
This paper
Dooms, Y., Qiu, L., Coppieters, I., Vergaelen, E., Claes, S., Dupont, P., Hehl, M., Cuypers, K., Engler, H., Dombrowski, K., Verbeke, K., Van den Bergh, O., Raes, J., Van Oudenhove, L., Van Den Houte, M., & Bogaerts, K. (2026). Multimodal approach to identify neuropsychophysiological
BibTeX
@article{dooms2026multim
author = {Dooms, Ynse and Qiu, Lixin and Coppieters, Iris and Vergaelen, Elfi and Claes, Stephan and Dupont, Patrick and Hehl, Melina and Cuypers, Koen and Engler, Harald and Dombrowski, Kirsten and Verbeke, Kristin and Van den Bergh, Omer and Raes, Jeroen and Van Oudenhove, Lukas and Van Den Houte, Maaike and Bogaerts, Katleen},
title = {{Multimodal approach to identify neuropsychophysiological
journal = {Brain, behavior, \& immunity - health},
year = {2026},
month = jul,
volume = {56},
pages = {101299},
publisher = {Elsevier},
issn = {2666-3546},
doi = {10.1016/
url = {https://
pmid = {42472232},
pmcid = {PMC13380062}
}
RIS
TY - JOUR
AU - Dooms, Ynse
AU - Qiu, Lixin
AU - Coppieters, Iris
AU - Vergaelen, Elfi
AU - Claes, Stephan
AU - Dupont, Patrick
AU - Hehl, Melina
AU - Cuypers, Koen
AU - Engler, Harald
AU - Dombrowski, Kirsten
AU - Verbeke, Kristin
AU - Van den Bergh, Omer
AU - Raes, Jeroen
AU - Van Oudenhove, Lukas
AU - Van Den Houte, Maaike
AU - Bogaerts, Katleen
TI - Multimodal approach to identify neuropsychophysiological
T2 - Brain, behavior, & immunity - health
J2 - Brain Behav Immun Health
PY - 2026
DA - 2026/
VL - 56
SP - 101299
SN - 2666-3546
PB - Elsevier
DO - 10.1016/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1016/
"type": "article-journal",
"title": "Multimodal approach to identify neuropsychophysiological
"container-title": "Brain, behavior, & immunity - health",
"author": [
{
"family": "Dooms",
"given": "Ynse"
},
{
"family": "Qiu",
"given": "Lixin"
},
{
"family": "Coppieters",
"given": "Iris"
},
{
"family": "Vergaelen",
"given": "Elfi"
},
{
"family": "Claes",
"given": "Stephan"
},
{
"family": "Dupont",
"given": "Patrick"
},
{
"family": "Hehl",
"given": "Melina"
},
{
"family": "Cuypers",
"given": "Koen"
},
{
"family": "Engler",
"given": "Harald"
},
{
"family": "Dombrowski",
"given": "Kirsten"
},
{
"family": "Verbeke",
"given": "Kristin"
},
{
"family": "Van den Bergh",
"given": "Omer"
},
{
"family": "Raes",
"given": "Jeroen"
},
{
"family": "Van Oudenhove",
"given": "Lukas"
},
{
"family": "Van Den Houte",
"given": "Maaike"
},
{
"family": "Bogaerts",
"given": "Katleen"
}
],
"container-title-short":
"volume": "56",
"page": "101299",
"DOI": "10.1016/
"PMID": "42472232",
"PMCID": "PMC13380062",
"ISSN": "2666-3546",
"publisher": "Elsevier",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
6
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1038/s41467-026-71151-2 [code]
- Common and distinct neural correlates of social interaction processing and theory of mind in narratives.Journal: Nature communicationsIn common: cifti-matlab, Nipype, Violinplot-Matlab, 12 other tools, 1 reference
- [2] doi:10.1038/s41467-026-74565-0 [code]
- The functional neurobiology of dispositions towards negative emotions.Journal: Nature communicationsIn common: cifti-matlab, Violinplot-Matlab, GIfTI library for MATLAB, 11 other tools, 1 reference
- [3] doi:10.1038/s41586-026-10631-3 [code]
- A prognostic human brain network for diffuse midline glioma.Journal: NatureIn common: cifti-matlab, GIfTI library for MATLAB, Tools for NIfTI and ANALYZE image (MATLAB), 10 other tools, clinical / translational
- [4] doi:10.1002/hbm.70577 [code]
- Disgust Propensity, Not Disgust Sensitivity, Shapes the Reactivity of a Subjective Disgust Circuit in Humans.Journal: Human brain mappingIn common: cifti-matlab, Violinplot-Matlab, GIfTI library for MATLAB, 10 other tools
- [5] doi:10.1038/s41467-026-71568-9 [code]
- Convergent and selective representations of pain, appetitive processes, aversive processes, and cognitive control in the insula.Journal: Nature communicationsIn common: Nipype, Parallel Computing Toolbox, FreeSurfer, 7 other tools, author Lukas Van Oudenhove
- [6] doi:10.1002/hbm.70602 [code]
- Neuroimaging Correlates of Post-Stroke Pain After Ischemic Stroke: Secondary Analysis of the INSPiRE-TMS Trial.Journal: Human brain mappingIn common: cifti-matlab, GIfTI library for MATLAB, Tools for NIfTI and ANALYZE image (MATLAB), 9 other tools, clinical / translational
- [7] doi:10.1111/ene.70678 [code]
- Who Falls After a Stroke? Evidence From a Prospective Stroke Cohort.Journal: European journal of neurologyIn common: cifti-matlab, GIfTI library for MATLAB, Tools for NIfTI and ANALYZE image (MATLAB), 9 other tools, clinical / translational
- [8] doi:10.1002/ana.78206 [code]
- Multimodal Image Guidance in Subthalamic Deep Brain Stimulation for Parkinson's Disease.Journal: Annals of neurologyIn common: cifti-matlab, GIfTI library for MATLAB, Tools for NIfTI and ANALYZE image (MATLAB), 9 other tools, clinical / translational
- [9] doi:10.1016/j.celrep.2026.117404 [code]
- Action and rest tremor map to distinct networks within the primary motor cortex.Journal: Cell reportsIn common: cifti-matlab, GIfTI library for MATLAB, Tools for NIfTI and ANALYZE image (MATLAB), 9 other tools
- [10] doi:10.1038/s42003-026-10276-y [code]
- The cellular correlates and adolescent reorganisation of cortical myelination networks in the common marmoset.Journal: Communications biologyIn common: Nipype, GIfTI library for MATLAB, Optimization Toolbox, 9 other tools
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 2 repositories of the authors' code, each at its verified commit and with its license, 395 scripts, and 16 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:353378348977d87f…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
