source: plugins/map_plugins/t1_inversion_recovery.m

Last change on this file was 129, checked in by tjniskan, 9 years ago
  • 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

File size: 1.8 KB
Line 
1function t1_inversion_recovery(DATA,ROI,AddInfo)
2% This Aedes plugin calculates T1 inversion 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
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
38
39resp = aedes_inputdlg('Type TI values','Input dialog',...
40  {mat2str(fit_vals)});
41if isempty(resp)
42  return
43else
44  resp=resp{1};
45  fit_vals = str2num(resp);
46end
47
48% Prompt for file name
49[fname,fpath,findex]=uiputfile({'*.t1;*.T1;*.s1;*.S1',...
50                    'T1-Files (*.t1, *.s1)';...
51                    '*.*','All Files (*.*)'},...
52                               'Save T1-file',[DATA{1}.HDR.fpath, ...
53                    default_filename]);
54if isequal(fname,0) || isequal(fpath,0)
55  return
56end
57
58% Calculate the map
59[fp,fn,fe]=fileparts([fpath,fname]);
60try
61  aedes_fitmaps(DATA,'T1_IR',fit_vals,'FileName',[fp,filesep,fn]);
62catch
63  errordlg({'Could not calculate T1 IR maps. The following error was returned',...
64           '',lasterr},'modal')
65end
Note: See TracBrowser for help on using the repository browser.

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