Browse code

spm2 compatibility, start change study

git-svn-id: https://svn.discofish.de/MATLAB/spmtoolbox/SVMCrossVal@195 83ab2cfd-5345-466c-8aeb-2b2739fb922d

Christoph Budziszewski authored on22/05/2009 11:16:41
Showing1 changed files
... ...
@@ -1,3 +1,20 @@
1 1
 function imageList = ui_selectRoiImage(formatstring,wd)
2
-imageList = spm_vol(spm_select([1 Inf],'image',formatstring,[],wd));
3
-end
4 2
\ No newline at end of file
3
+
4
+switch getSPMVersion
5
+    case 'SPM5'
6
+        imageList = spm_vol(spm_select([1 Inf],'image',formatstring,[],wd));
7
+    case 'SPM2'
8
+        imageList = spm_vol(spm_get([1 Inf],'img',formatstring,wd,0));
9
+    otherwise
10
+        [filematrix pathmatrix]= uigetfile(...
11
+           {'*.nii;*.img;', 'All NIFTI/ANALYZE Files (*.hdr, *.nii, )'; ...
12
+            '*.*',                  'All Files (*.*)'}, ...
13
+        formatstring,...
14
+        wd,...
15
+        'MultiSelect', 'off'); 
16
+        
17
+        imageList = spm_vol([pathmatrix filematrix]);
18
+end
19
+end
20
+
21
+
Browse code

roi image working

git-svn-id: https://svn.discofish.de/MATLAB/spmtoolbox/SVMCrossVal@137 83ab2cfd-5345-466c-8aeb-2b2739fb922d

Christoph Budziszewski authored on25/02/2009 13:40:40
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,3 @@
1
+function imageList = ui_selectRoiImage(formatstring,wd)
2
+imageList = spm_vol(spm_select([1 Inf],'image',formatstring,[],wd));
3
+end
0 4
\ No newline at end of file