Ignore:
Timestamp:
Feb 19, 2009, 12:04:29 PM (10 years ago)
Author:
tjniskan
Message:
  • Fixed the resting state fMRI plugin to work with 3D data

M an2_revision.m
M plugins/fmri_plugins/resting_state_fc.m

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/fmri_plugins/resting_state_fc.m

    r78 r79  
    2121% Get the ROIs from current slice/volume
    2222if ndims(data)==3
    23   % Data slice upon which to show the maps
    24   slice = data(:,:,1);
     23  % Data volume upon which to show the maps
     24  vol = data(:,:,1);
    2525 
    2626  for ii=1:length(ROI)
     
    2828  end
    2929else
    30   slice = data(:,:,:,1);
     30  vol = data(:,:,:,1);
    3131  for ii=1:length(ROI)
    3232    ROI(ii).voxels{1} = ROI(ii).voxels{1}(:,:,:,AddInfo.CurrentVol);
     
    3838
    3939% Spatially smooth data
    40 data = fmri_smooth(data,[2 2]);
     40data = fmri_smooth(data,[2 2 1]);
    4141%aedes(data)
    4242
     
    4444% data = fmri_filter(data,2.039,'hipass',0.009,...
    4545%   'lowpass',0.08);
    46 data = fmri_filter(data,2.039,'detrending','on',...
     46data = fmri_filter(data,2,'detrending','on',...
    4747  'lowpass',0.08);
    4848%aedes(data)
     
    5252
    5353% Display results in a new Aedes window
    54 dt = repmat(slice,[1 1 length(corrmap)]);
     54dt = repmat(vol,[1 1 1 length(corrmap)]);
    5555rs_maps = zeros(size(corrmap(1).ccc,1),size(corrmap(1).ccc,2),...
    56   length(corrmap));
     56  size(corrmap(1).ccc,3),length(corrmap));
    5757for kk=1:length(corrmap)
    58   rs_maps(:,:,kk) = corrmap(kk).ccc;
     58  rs_maps(:,:,:,kk) = corrmap(kk).ccc;
    5959end
    6060aedes(dt,[],rs_maps)
Note: See TracChangeset for help on using the changeset viewer.

Powered by Trac 1.0.9.Copyright © Juha-Pekka Niskanen 2008