source: plugins/map_plugins/t2_rho.m @ 78

Last change on this file since 78 was 78, checked in by tjniskan, 10 years ago
  • Moved fMRI related plugins to their own subdirectories
  • Created a subdirectory for map calculation plugins and added a few

basic plugins for those. At the moment these plugins do not support
masking etc. and I didn't test them at all so be cautious...

  • Made a minor memory optimation to an2_readfid.m
  • Fixed a few issues in files related updating via SVN
  • Disabled some annoying warnings that Matlab R2008a and higher

generate from uitree and uitreenode functions inan2_juigetfiles.m

  • Coded something minor to an2_maptool.m. This is still stub and does

not work at all. Please don't try to use it.

  • Fixed a bug that caused Aedes to fail without generating an error

when reading VNMR FID-files that don't have PROCPAR in the same folder.

  • Fixed a javaFrame -warning (with R2008a and higher) in aedes.m

M an2_revision.m
M an2_data_read.m
M an2_maptool.m
M aedes.m
D plugins/calculate_t2_map.m
D plugins/calculate_t1r_map.m
D plugins/basic_fmri_analysis.m
D plugins/resting_state_fc.m
A plugins/fmri_plugins
A plugins/fmri_plugins/basic_fmri_analysis.m
A plugins/fmri_plugins/resting_state_fc.m
A plugins/map_plugins
A plugins/map_plugins/t2.m
A plugins/map_plugins/t1_3_parameter_fit.m
A plugins/map_plugins/t1_saturation_recovery.m
A plugins/map_plugins/t1_rho.m
A plugins/map_plugins/t2_rho.m
A plugins/map_plugins/t1_inversion_recovery.m
M an2_readfid.m
M an2_check_updates.m
M an2_juigetfiles.m
M an2_update.m

File size: 1.7 KB
Line 
1function t2_rho(DATA,ROI,AddInfo)
2% This Aedes plugin calculates T1 rho map
3
4% This function is a part of Aedes - A graphical tool for analyzing
5% medical images
6%
7% Copyright (C) 2006 Juha-Pekka Niskanen <Juha-Pekka.Niskanen@uku.fi>
8%
9% Department of Physics, Department of Neurobiology
10% University of Kuopio, FINLAND
11%
12% This program may be used under the terms of the GNU General Public
13% License version 2.0 as published by the Free Software Foundation
14% and appearing in the file LICENSE.TXT included in the packaging of
15% this program.
16%
17% This program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
18% WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19
20fit_vals = [];
21if AddInfo.isDataMixed
22  nSlices = length(DATA);
23else
24  nSlices = size(DATA{1}.FTDATA,3);
25 
26  % Try to get fit values from PROCPAR.pi
27%   if isfield(DATA{1},'PROCPAR') && ~isempty(DATA{1}.PROCPAR) && ...
28%         isfield(DATA{1}.PROCPAR,'pi') && length(DATA{1}.PROCPAR.pi)>1
29%     fit_vals = DATA{1}.PROCPAR.pi./1000;
30%   end
31end
32
33resp = an2_inputdlg('Type spin-lock values');
34if isempty(resp)
35  return
36else
37  resp=resp{1};
38  fit_vals = str2num(resp);
39end
40
41
42% Prompt for file name
43[fname,fpath,findex]=uiputfile({'*.t2r;*.T2R;*.s2r;*.S2R',...
44                    'T2R-Files (*.t2r, *.s2r)';...
45                    '*.*','All Files (*.*)'},...
46                               'Save T2R-file',[DATA{1}.HDR.fpath, ...
47                    't2rho_map']);
48if isequal(fname,0) || isequal(fpath,0)
49  return
50end
51
52% Calculate the map
53[fp,fn,fe]=fileparts([fpath,fname]);
54try
55  an2_fitmaps(DATA,'t2r',fit_vals,'FileName',[fp,filesep,fn]);
56catch
57  errordlg({'Could not calculate T2 rho maps. The following error was returned',...
58           '',lasterr},'modal')
59end
60
Note: See TracBrowser for help on using the repository browser.

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