AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
November 18, 2020 09:27AM
I am trying to extract time series data from BRIK/HEAD files one of which contains raw data and another which contains a fit for the data. I have no issues loading in the files into MATLAB using BrikLoad; they load in successfully as 4D doubles. My issue is being able to take these 4D doubles and 1. apply an 85x85x85 mask to them, then 2. extract the time series data from the file and then save it as a .mat file. In sections of code written by one of my collaborators he was able to turn these 4D doubles into 85^3 when dealing with files containing beta values. He did this in code written as:

[err, raw_data, raw_info, ~] = BrikLoad(raw_data_BRIK);
split_BRIK_LABS = strsplit(beta_info.BRICK_LABS, '~');
case_betas = strcmpi(split_BRIK_LABS, 'avg_effect#0_Coef');
assert(sum(case_betas) == 1, 'Multiple/no case betas?');
brain_betas = beta_data(:, :, :, case_betas);,

but unfortunately this method does not work with the files containing the fit and raw data since the BRICK_LABS is different and contain no 'avg_effect#0_Coef'. Is there a simple method that I am overlooking to easily extract the time series data and apply a 85^3 mask to it or is it a more in depth process?

Thanks
Subject Author Posted

Extracting Time Series from Fit and Raw Data Files in MATLAB

Blankenshipak November 18, 2020 09:27AM

Re: Extracting Time Series from Fit and Raw Data Files in MATLAB

ptaylor November 19, 2020 01:50PM

Re: Extracting Time Series from Fit and Raw Data Files in MATLAB

Blankenshipak December 07, 2020 09:56AM

Re: Extracting Time Series from Fit and Raw Data Files in MATLAB

rick reynolds December 07, 2020 10:59AM