source: plugins/map_plugins/t1_saturation_recovery.m @ 80

Last change on this file since 80 was 80, checked in by tjniskan, 10 years ago
  • Changed the historical "an2_" prefix to "aedes_" in all files. NOTE:

Any script or function relying to Aedes functions will be broken
because of this. Just do a search/replace from "an2_" to "aedes_" in
your files and all should be well...

  • Changed the name of an2_readtab.m to a more informative

aedes_readphasetable.m

File size: 1.6 KB
RevLine 
[78]1function t1_saturation_recovery(DATA,ROI,AddInfo)
2% This Aedes plugin calculates T1 saturation recovery maps
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);
25end
26
27
[80]28resp = aedes_inputdlg('Type fit values','Input dialog',...
[78]29  {mat2str(fit_vals)});
30if isempty(resp)
31  return
32else
33  resp=resp{1};
34  fit_vals = str2num(resp);
35end
36
37% Prompt for file name
38[fname,fpath,findex]=uiputfile({'*.t1;*.T1;*.s1;*.S1',...
39                    'T1-Files (*.t1, *.s1)';...
40                    '*.*','All Files (*.*)'},...
41                               'Save T1-file',[DATA{1}.HDR.fpath, ...
42                    't1_sr_map']);
43if isequal(fname,0) || isequal(fpath,0)
44  return
45end
46
47% Calculate the map
48[fp,fn,fe]=fileparts([fpath,fname]);
49try
[80]50  aedes_fitmaps(DATA,'T1_SR',fit_vals,'FileName',[fp,filesep,fn]);
[78]51catch
52  errordlg({'Could not calculate T1 SR maps. The following error was returned',...
53           '',lasterr},'modal')
54end
Note: See TracBrowser for help on using the repository browser.

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