Dear Freesurfer experts,
I'd appreciate any of your comments a lot!
I'm trying to extract BOLD signals from subfields of hippocampus but somehow I find resolution/size mismatch such that the assigned voxel number of subfield hippocampus is greater than voxel numbers of whole brain BOLD data.
I initially processed data using freesurfer version 5.3.0. but then recently created subfields of hippocampus using version 6.0 due to reviewer's request for additional analysis for hippocampus.
Below are the steps that I tried.
(1) creating subfields of hippocampus
recon-all -s subjectID -hippocampal-subfileds-T1
mri_extract_label lh.hippoSfLabels-T1.v10.FSvoxelSpace.mgz 206 leftCA1.mgz mri_extract_label rh.hippoSfLabels-T1.v10.FSvoxelSpace.mgz 206 rightCA1.mgz
mris_calc -o CA1.mgz leftCA1.mgz add rightCA1.mgz
mri_convert CA1.mgz CA1.nii.gz mri_convert CA1.nii.gz $DATA_DIR/$SUBJECT/roimask/CA1.nii
(2) extracting BOLD from subfield ROI using matlab code
% get roi mask roi = MRIread([homeDir epiDir subject '/' roiDir rois{ROI} '.nii']); roimask = find(fast_vol2mat(roi)>0); Nvoxel = length(roimask);
% loading BOLD data from run data = []; for RUN = 1 % read data from motion-corrected data f = MRIread([homeDir spider subject '/' boldDir dirs(RUN).name '/' boldFile '.nii']); fmat = fast_vol2mat(f); [numTR numVoxelAll] = size(fmat); data(:,:,:,RUN) = fmat(:,roimask)'; end
Below is the error:
Nvoxel(length of roimask) for CA1 is 1385 and for example, roimask(1) is 7576977 meaning that its voxel number is assigned to 7576977. Then size(fmat) = 150 175232. So fmat(:, roimask(1)) which is again fmat(:, 7576977) gives me an error that index exceeds matrix dimensions....
Why does it happen?
Please help me extract the BOLD signals from subfields of hippocampus!
Thanks for your help in advance.
Best, Ji Won
freesurfer@nmr.mgh.harvard.edu