Changeset 129 for plugins


Ignore:
Timestamp:
Jun 10, 2010, 9:13:47 AM (9 years ago)
Author:
tjniskan
Message:
  • Added plugin for correlation mapping with filtering/other options
  • Added flipping of 3D ROIs in aedes.m
  • Added possibility of changing ROI color (in the ROI -uimenu)
  • Minor fixes/changes here and there...

M misclib/fmri_spm_volumes.m
M misclib/fmri_filter.m
M aedes_fitmaps.m
M aedes.m
M plugins/save_roi_as_mask.m
M plugins/calc_asl_cbf.m
A plugins/fmri_plugins/correlation_mapping.m
M plugins/fmri_plugins/resting_state_fc.m
M plugins/map_plugins/t1_inversion_recovery.m
M aedes_revision.m

Location:
plugins
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • plugins/calc_asl_cbf.m

    r80 r129  
    5656        return
    5757  end
    58   controlIm = DATA{1}.FTDATA(:,:,1:2:size(DATA{1}.FTDATA,3));
    59   labelIm = DATA{1}.FTDATA(:,:,2:2:size(DATA{1}.FTDATA,3));
    60   ParentFileName = fullfile(DATA{1}.HDR.fpath,DATA{1}.HDR.fname);
     58  if isfield(DATA{1}.PROCPAR,'ltype') && ...
     59      length(DATA{1}.PROCPAR.ltype)==size(DATA{1}.FTDATA,3)
     60    control_ind = find(strcmpi(DATA{1}.PROCPAR.ltype,'c'));
     61    label_ind = find(strcmpi(DATA{1}.PROCPAR.ltype,'l'));
     62    controlIm = DATA{1}.FTDATA(:,:,control_ind);
     63    labelIm = DATA{1}.FTDATA(:,:,label_ind);
     64    ParentFileName = fullfile(DATA{1}.HDR.fpath,DATA{1}.HDR.fname);
     65  else
     66    controlIm = DATA{1}.FTDATA(:,:,1:2:size(DATA{1}.FTDATA,3));
     67    labelIm = DATA{1}.FTDATA(:,:,2:2:size(DATA{1}.FTDATA,3));
     68    ParentFileName = fullfile(DATA{1}.HDR.fpath,DATA{1}.HDR.fname);
     69  end
    6170end
    6271
     
    124133
    125134% Convert milliseconds to seconds
    126 t1map=t1map./1000;
     135%t1map=t1map./1000;
    127136
    128137% Calculate difference fotr ASL
    129138mean_control = mean(controlIm,3);
    130139mean_label = mean(labelIm,3);
    131 asl_map = mean_label-mean_control;
     140asl_map = mean_control-mean_label;
    132141
    133142% Calculate CBF and save it into a MAT-file
  • plugins/fmri_plugins/resting_state_fc.m

    r79 r129  
    1212end
    1313
    14 % Don't include the reference image from EPIs
    15 %if isfield(DATA{1},'PROCPAR') && isfield(DATA{1}.PROCPAR,'readres')
    16 %  data = DATA{1}.FTDATA(:,:,:,2:end);
    17 %else
    18   data=DATA{1}.FTDATA;
    19 %end
     14data=DATA{1}.FTDATA;
     15
    2016
    2117% Get the ROIs from current slice/volume
     
    2319  % Data volume upon which to show the maps
    2420  vol = data(:,:,1);
    25  
    2621  for ii=1:length(ROI)
    2722    ROI(ii).voxels{1} = ROI(ii).voxels{1}(:,:,AddInfo.CurrentSlice(3));
     
    3934% Spatially smooth data
    4035data = fmri_smooth(data,[2 2 1]);
    41 %aedes(data)
    4236
    43 % Filter data
    44 % data = fmri_filter(data,2.039,'hipass',0.009,...
    45 %   'lowpass',0.08);
     37% Do fMRI filtering
    4638data = fmri_filter(data,2,'detrending','on',...
    4739  'lowpass',0.08);
    48 %aedes(data)
    4940
    5041% Correlate seeds
     
    6253
    6354
     55
     56
     57
     58
     59
     60
  • plugins/map_plugins/t1_inversion_recovery.m

    r80 r129  
    2525end
    2626
     27if isfield(DATA{1},'PROCPAR') && isfield(DATA{1}.PROCPAR,'ti')
     28  fit_vals = DATA{1}.PROCPAR.ti;
     29end
     30
     31if isfield(DATA{1},'DataFormat') && strcmp(DATA{1}.DataFormat,'vnmr')
     32  [fp,fn,fe]=fileparts(fileparts(DATA{1}.HDR.fpath));
     33  default_filename = fn;
     34else
     35  default_filename = 't1_ir_map';
     36end
     37
    2738
    2839resp = aedes_inputdlg('Type TI values','Input dialog',...
     
    4051                    '*.*','All Files (*.*)'},...
    4152                               'Save T1-file',[DATA{1}.HDR.fpath, ...
    42                     't1_ir_map']);
     53                    default_filename]);
    4354if isequal(fname,0) || isequal(fpath,0)
    4455  return
  • plugins/save_roi_as_mask.m

    r80 r129  
    5656  return
    5757end
     58setpref('Aedes','PutDataFileDir',fpath);
    5859[fp,fn,fe]=fileparts([fpath,fname]);
    5960filename = [fp,filesep,fn,'.nii'];
Note: See TracChangeset for help on using the changeset viewer.

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