source: aedes_getfilefilter.m

Last change on this file was 181, checked in by tjniskan, 6 years ago
  • Added a workaround for the uigetfile-bug in OSX version of Matlab, where uigetfile in some situations returns a directory instead of a file. This bug seems to be present at least in R2011a version of Matlab.

M aedes_getfilefilter.m
M aedes_data_read.m
M aedes_revision.m

  • Property svn:executable set to *
File size: 2.8 KB
Line 
1function [filefilt,dataformats]=aedes_getfilefilter()
2% AEDES_GETFILEFILTER - Get File Filter for uigetfile and aedes_juigetfiles
3%   (this is a helper function)
4%
5% Synopsis:
6%       filefilt=aedes_data_read
7%
8% Description:
9%       Returns the correct file filter for Aedes.
10%
11% Examples:
12%
13% See also:
14%       AEDES, AEDES_DATA_READ
15
16% This function is a part of Aedes - A graphical tool for analyzing
17% medical images
18%
19% Copyright (C) 2006 Juha-Pekka Niskanen <Juha-Pekka.Niskanen@uku.fi>
20%
21% Department of Physics, Department of Neurobiology
22% University of Kuopio, FINLAND
23%
24% This program may be used under the terms of the GNU General Public
25% License version 2.0 as published by the Free Software Foundation
26% and appearing in the file LICENSE.TXT included in the packaging of
27% this program.
28%
29% This program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
30% WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
31
32
33filefilt = {['fid;2dseq;*.hdr;*.nii;*.nii.gz;*.sur;',...
34  '*.mri;*.dcm;',...
35  '*.xxm;*.mat;*.t1r;*.s1r;*.fdf;*.sgl;',...
36  '*.t2r;*.s2r;*.t1;*.t2;*.s1;*.s2;*.df;',...
37  '*.sf;*.r2;*.b1;*.roi'],'All Supported Files';...
38  'fid','Varian or Bruker FID-files (fid)';...
39        '2dseq','Bruker reconstructed files (2dseq)';...
40  '*.hdr;*.nii;*.nii.gz','NIfTI and Analyze 7.5 files (*.nii,*.nii.gz,*.hdr)';...
41  '*.sur','S.M.I.S. Image files (*.sur)';...
42  '*.mri','MRI-Files (*.mri)';...
43  '*.dcm','DICOM image files (*.dcm)'; ...
44  '*.hdr','SPECT/CT Header Files (*.hdr)';...
45  '*.xxm','Reconstruction parameter file (*.xxm)';...
46  '*.mat','Matlab MAT-Files (*.mat)';...
47  '*.roi','Aedes ROI-Files (*.roi)';...
48  '*.fdf','Varian FDF-Files (*.fdf)';...
49  '*.sgl','SWIFT reconstruction files (*.sgl)';...
50  '*.t1r','T1R-Files (*.t1r)';...
51  '*.s1r','S1R-Files (*.s1r)';...
52  '*.t2r','T2R-Files (*.t2r)';...
53  '*.s2r','S2R-Files (*.s2r)';...
54  '*.t1','T1-Files (*.t1)';...
55  '*.t2','T2-Files (*.t2)';...
56  '*.s1','S1-Files (*.s1)';...
57  '*.s2','S2-Files (*.s2)';...
58  '*.df','DF-Files (*.df)';...
59  '*.sf','SF-Files (*.sf)';...
60  '*.r2','R2-Files (*.r2)';...
61  '*.b1','B1-Files (*.b1)';...
62  '*.*', 'All Files (*.*)'};
63
64dataformats = {'',...
65  'vnmr',...
66  'nifti',...
67  'sur',...
68  'mri',...
69  'dcm',...
70  'spect/ct',...
71  'spect/ct',...
72  'mat',...
73  'roi',...
74  'fdf',...
75  'swift_sgl',...
76  'mri',...
77  'mri',...
78  'mri',...
79  'mri',...
80  'mri',...
81  'mri',...
82  'mri',...
83  'mri',...
84  'mri',...
85  'mri',...
86  'mri',...
87  'mri',...
88  ''}';
89
90% Uigetfile is broken in OSX version of Matlab (at least R2011a), and
91% doesn't work with filters that are not file extensions (e.g. fid or
92% 2dseq).
93if ismac
94        filefilt{1,1} = '*.*';
95        filefilt{1,2} = 'All Files';
96end
97
98% - EOF -
Note: See TracBrowser for help on using the repository browser.

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