Skip to content

Commit f4c048c

Browse files
committed
SPM8 r3164
1 parent c6d6c5c commit f4c048c

File tree

449 files changed

+10047
-3337
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

449 files changed

+10047
-3337
lines changed

@file_array/private/file2mat.mexmaci

0 Bytes
Binary file not shown.
17.9 KB
Binary file not shown.

@file_array/private/mat2file.mexmaci

0 Bytes
Binary file not shown.
13.6 KB
Binary file not shown.

@gifti/export.m

+14-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
99

1010
% Guillaume Flandin
11-
% $Id: export.m 2587 2009-01-05 12:11:39Z vladimir $
11+
% $Id: export.m 3081 2009-04-22 20:15:38Z guillaume $
1212

1313
if numel(this) > 1, warning('Only handle scalar objects yet.'); end
1414

@@ -18,6 +18,18 @@
1818
case 'matlab'
1919
s = struct(this);
2020

21+
case 'patch'
22+
if isfield(this,'vertices')
23+
s.vertices = subsref(this, substruct('.', 'vertices'));
24+
end
25+
if isfield(this,'faces')
26+
s.faces = subsref(this, substruct('.', 'faces'));
27+
end
28+
if isfield(this,'cdata')
29+
s.facevertexcdata = subsref(this, substruct('.', 'cdata'));
30+
end
31+
try, s; catch, s = struct([]); end
32+
2133
case {'fieldtrip', 'ft'}
2234
s = struct('tri',[], 'pnt',[]);
2335
if isfield(this,'vertices')
@@ -32,7 +44,7 @@
3244
if isfield(this,'vertices')
3345
s.vert = double(subsref(this, substruct('.', 'vertices')));
3446
end
35-
if isfield(this,'faces')
47+
if isfield(this,'faces')
3648
s.face = uint16(subsref(this, substruct('.', 'faces')));
3749
end
3850

@meeg/condlist.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
77

88
% Vladimir Litvak
9-
% $Id: condlist.m 2877 2009-03-13 15:56:08Z vladimir $
9+
% $Id: condlist.m 3046 2009-04-02 14:28:31Z vladimir $
1010

1111
res = getset(this, 'trials', 'label');
1212
if ~iscell(res)
@@ -24,7 +24,7 @@
2424
if numel(res)>1 && isfield(this.other, 'condlist') &&...
2525
iscell(this.other.condlist) && ~isempty(this.other.condlist)
2626
[sel1, sel2] = spm_match_str(this.other.condlist, res);
27-
res = res([sel2 setdiff(1:numel(res), sel2)]);
27+
res = res([sel2(:)' setdiff(1:numel(res), sel2)]);
2828
end
2929
else
3030
if iscell(newcondlist) && ~isempty(intersect(newcondlist, res))

@meeg/pickconditions.m

+7-3
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,20 @@
88
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
99

1010
% Stefan Kiebel
11-
% $Id: pickconditions.m 2448 2008-11-07 16:56:07Z vladimir $
11+
% $Id: pickconditions.m 3146 2009-05-26 09:54:23Z vladimir $
1212

1313
if nargin<3
1414
rejectbad = 1;
1515
end
1616

1717
c = conditions(this);
1818

19-
res = strmatch(deblank(label), deblank(c), 'exact');
20-
19+
if isa(label, 'char')
20+
label = {label};
21+
end
22+
23+
res = find(ismember(c, label));
24+
2125
if rejectbad && ~isempty(res)
2226
res = res(~reject(this, res));
2327
end

@meeg/private/checkmeeg.m

+12-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
1010

1111
% Vladimir Litvak
12-
% $Id: checkmeeg.m 2978 2009-03-27 14:43:08Z guillaume $
12+
% $Id: checkmeeg.m 3068 2009-04-20 17:21:57Z vladimir $
1313

1414
if nargin==1
1515
option = 'basic';
@@ -255,6 +255,17 @@
255255

256256
if ~isfield(meegstruct, 'sensors')
257257
meegstruct.sensors = struct([]);
258+
else
259+
if isfield(meegstruct.sensors, 'eeg')
260+
if isempty(meegstruct.sensors.eeg) || isempty(meegstruct.sensors.eeg.pnt)
261+
meegstruct.sensors = rmfield(meegstruct.sensors, 'eeg');
262+
end
263+
end
264+
if isfield(meegstruct.sensors, 'meg')
265+
if isempty(meegstruct.sensors.meg) || isempty(meegstruct.sensors.meg.pnt)
266+
meegstruct.sensors = rmfield(meegstruct.sensors, 'meg');
267+
end
268+
end
258269
end
259270

260271
if ~isfield(meegstruct, 'fiducials')

@nifti/private/decode_qform0.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
55

66
%
7-
% $Id: decode_qform0.m 1143 2008-02-07 19:33:33Z spm $
7+
% $Id: decode_qform0.m 3131 2009-05-18 15:54:10Z guillaume $
88

99

1010
dim = double(hdr.dim);
@@ -15,9 +15,9 @@
1515
%disp('The images are in a form whereby it is not possible to');
1616
%disp('tell the left and right sides of the brain apart.');
1717
%if flp,
18-
% disp('They are assumed to be stored right-handed.');
19-
%else
2018
% disp('They are assumed to be stored left-handed.');
19+
%else
20+
% disp('They are assumed to be stored right-handed.');
2121
%end;
2222
%disp('------------------------------------------------------');
2323

@xmltree/private/xml_findstr.mexmaci

0 Bytes
Binary file not shown.
8.62 KB
Binary file not shown.

Contents.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
% Statistical Parametric Mapping
2-
% Version 3042 (SPM8) 02-Apr-2009
2+
% Version 3164 (SPM8) 29-May-09
33
%__________________________________________________________________________
44
% ___ ____ __ __
55
% / __)( _ \( \/ )
@@ -11,7 +11,7 @@
1111
%
1212
% SPM8 is written for MATLAB 7.1 (R14SP3) onwards under Windows and Unix.
1313
% ( Compiled binaries of external C-MEX functions are provided for: )
14-
% ( Windows (32 and 64 bit), Linux (32 and 64 bit) and Mac (32 bit) )
14+
% ( Windows (32 and 64 bit), Linux (32 and 64 bit) and Mac (32 and 64 bit))
1515
%
1616
% See spm.man for details of this release.
1717
% See README.txt for information on installation and getting started.
@@ -42,7 +42,7 @@
4242
%__________________________________________________________________________
4343
% Copyright (C) 1991,1994-2003,2005-2009 Wellcome Trust Centre for Neuroimaging
4444

45-
% $Id: Contents.m 3041 2009-04-02 10:14:17Z guillaume $
45+
% $Id: Contents.m 3163 2009-05-29 14:04:55Z guillaume $
4646

4747
%==========================================================================
4848
% PROGRAMMERS NOTE:

config/spm_cfg_eeg_convert.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
55

66
% Stefan Kiebel
7-
% $Id: spm_cfg_eeg_convert.m 2720 2009-02-09 19:50:46Z vladimir $
7+
% $Id: spm_cfg_eeg_convert.m 3059 2009-04-15 18:09:13Z guillaume $
88

99
dataset = cfg_files;
1010
dataset.tag = 'dataset';
@@ -207,8 +207,8 @@
207207

208208
S.usetrials = 0;
209209
[S.trl, S.conditionlabel] = spm_eeg_definetrial(S);
210-
211210
end
211+
S.continuous = 0;
212212
end
213213

214214
if isfield(S.channels, 'chanmeg')

config/spm_cfg_eeg_tf_rescale.m

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
function S = spm_cfg_eeg_tf_rescale
2+
% configuration file for rescaling spectrograms
3+
%_______________________________________________________________________
4+
% Copyright (C) 2009 Wellcome Trust Centre for Neuroimaging
5+
6+
% Will Penny
7+
% $Id: spm_cfg_eeg_tf_rescale.m 3090 2009-04-29 17:30:05Z will $
8+
9+
Fname = cfg_files;
10+
Fname.tag = 'Fname';
11+
Fname.name = 'File Names';
12+
Fname.filter = 'mat';
13+
Fname.num = [1 inf];
14+
Fname.help = {'Select the M/EEG mat file.'};
15+
16+
17+
S = cfg_exbranch;
18+
S.tag = 'eeg_tf_rescale';
19+
S.name = 'M/EEG TF Rescale';
20+
S.val = {Fname};
21+
S.help = {'Rescale spectrogram using eg Log Ratio operator'};
22+
S.prog = @eeg_tf_rescale;
23+
S.modality = {'EEG'};
24+
25+
26+
function out = eeg_tf_rescale(job)
27+
% construct the S struct
28+
S = job;
29+
S.Fname = strvcat(job.Fname);
30+

config/spm_cfg_factorial_design.m

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
function factorial_design = spm_cfg_factorial_design
2-
% SPM Configuration file
3-
% automatically generated by the MATLABBATCH utility function GENCODE
2+
% SPM Configuration file for 2nd-level models
43
%_______________________________________________________________________
54
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
65

7-
% $Id: spm_cfg_factorial_design.m 2975 2009-03-26 21:43:31Z guillaume $
6+
% Will Penny
7+
% $Id: spm_cfg_factorial_design.m 3067 2009-04-20 13:58:07Z guillaume $
88

9-
rev = '$Rev: 2975 $';
109
% ---------------------------------------------------------------------
1110
% dir Directory
1211
% ---------------------------------------------------------------------
@@ -17,6 +16,7 @@
1716
dir.filter = 'dir';
1817
dir.ufilter = '.*';
1918
dir.num = [1 1];
19+
2020
% ---------------------------------------------------------------------
2121
% scans Scans
2222
% ---------------------------------------------------------------------
@@ -35,6 +35,7 @@
3535
t1.name = 'One-sample t-test';
3636
t1.val = {scans };
3737
t1.help = {''};
38+
3839
% ---------------------------------------------------------------------
3940
% scans1 Group 1 scans
4041
% ---------------------------------------------------------------------
@@ -144,6 +145,7 @@
144145
t2.name = 'Two-sample t-test';
145146
t2.val = {scans1 scans2 dept variance gmsca ancova };
146147
t2.help = {''};
148+
147149
% ---------------------------------------------------------------------
148150
% scans Scans [1,2]
149151
% ---------------------------------------------------------------------
@@ -168,20 +170,18 @@
168170
generic = cfg_repeat;
169171
generic.tag = 'generic';
170172
generic.name = 'Pairs';
171-
generic.help = {
172-
''
173-
''
174-
}';
175-
generic.values = {pair };
173+
generic.help = {''};
174+
generic.values = {pair};
176175
generic.num = [1 Inf];
177176
% ---------------------------------------------------------------------
178177
% pt Paired t-test
179178
% ---------------------------------------------------------------------
180179
pt = cfg_branch;
181180
pt.tag = 'pt';
182181
pt.name = 'Paired t-test';
183-
pt.val = {generic dept variance gmsca ancova };
182+
pt.val = {generic gmsca ancova};
184183
pt.help = {''};
184+
185185
% ---------------------------------------------------------------------
186186
% scans Scans
187187
% ---------------------------------------------------------------------

config/spm_cfg_preproc.m

+23-23
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
%_______________________________________________________________________
55
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
66

7-
% $Id: spm_cfg_preproc.m 2834 2009-03-06 17:57:50Z john $
7+
% $Id: spm_cfg_preproc.m 3124 2009-05-18 08:13:52Z volkmar $
88

9-
rev = '$Rev: 2834 $';
9+
rev = '$Rev: 3124 $';
1010
% ---------------------------------------------------------------------
1111
% data Data
1212
% ---------------------------------------------------------------------
@@ -311,9 +311,6 @@
311311
%------------------------------------------------------------------------
312312
function dep = vout(job)
313313
opts = job.output;
314-
% This depends on job contents, which may not be present when virtual
315-
% outputs are calculated.
316-
sopts = [opts.GM;opts.WM;opts.CSF];
317314

318315
cdep(1) = cfg_dep;
319316
cdep(1).sname = 'Norm Params Subj->MNI';
@@ -329,25 +326,28 @@
329326
cdep(end).src_output = substruct('()',{1}, '.','biascorr','()',{':'});
330327
cdep(end).tgt_spec = cfg_findspec({{'filter','image','strtype','e'}});
331328
end;
329+
sonames = {'GM','WM','CSF'};
332330
for k1=1:3,
333-
if sopts(k1,3),
334-
cdep(end+1) = cfg_dep;
335-
cdep(end).sname = sprintf('c%d Images',k1);
336-
cdep(end).src_output = substruct('()',{1}, '.',sprintf('c%d',k1),'()',{':'});
337-
cdep(end).tgt_spec = cfg_findspec({{'filter','image','strtype','e'}});
338-
end;
339-
if sopts(k1,2),
340-
cdep(end+1) = cfg_dep;
341-
cdep(end).sname = sprintf('wc%d Images',k1);
342-
cdep(end).src_output = substruct('()',{1}, '.',sprintf('wc%d',k1),'()',{':'});
343-
cdep(end).tgt_spec = cfg_findspec({{'filter','image','strtype','e'}});
344-
end;
345-
if sopts(k1,1),
346-
cdep(end+1) = cfg_dep;
347-
cdep(end).sname = sprintf('mwc%d Images',k1);
348-
cdep(end).src_output = substruct('()',{1}, '.',sprintf('mwc%d',k1),'()',{':'});
349-
cdep(end).tgt_spec = cfg_findspec({{'filter','image','strtype','e'}});
350-
end;
331+
if ~strcmp(opts.(sonames{k1}),'<UNDEFINED>')
332+
if opts.(sonames{k1})(3),
333+
cdep(end+1) = cfg_dep;
334+
cdep(end).sname = sprintf('c%d Images',k1);
335+
cdep(end).src_output = substruct('()',{1}, '.',sprintf('c%d',k1),'()',{':'});
336+
cdep(end).tgt_spec = cfg_findspec({{'filter','image','strtype','e'}});
337+
end;
338+
if opts.(sonames{k1})(2),
339+
cdep(end+1) = cfg_dep;
340+
cdep(end).sname = sprintf('wc%d Images',k1);
341+
cdep(end).src_output = substruct('()',{1}, '.',sprintf('wc%d',k1),'()',{':'});
342+
cdep(end).tgt_spec = cfg_findspec({{'filter','image','strtype','e'}});
343+
end;
344+
if opts.(sonames{k1})(1),
345+
cdep(end+1) = cfg_dep;
346+
cdep(end).sname = sprintf('mwc%d Images',k1);
347+
cdep(end).src_output = substruct('()',{1}, '.',sprintf('mwc%d',k1),'()',{':'});
348+
cdep(end).tgt_spec = cfg_findspec({{'filter','image','strtype','e'}});
349+
end;
350+
end
351351
end;
352352
dep = cdep;
353353

config/spm_cfg_reorient.m

+23-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
%_______________________________________________________________________
55
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
66

7-
% $Id: spm_cfg_reorient.m 1299 2008-04-03 08:55:09Z volkmar $
7+
% $Id: spm_cfg_reorient.m 3130 2009-05-18 14:41:31Z volkmar $
88

9-
rev = '$Rev: 1299 $';
9+
rev = '$Rev: 3130 $';
1010
% ---------------------------------------------------------------------
1111
% srcfiles Images to reorient
1212
% ---------------------------------------------------------------------
@@ -70,13 +70,33 @@
7070
transform.val = {transM };
7171
transform.help = {'Specify reorientation method.'};
7272
transform.values = {transM transprm };
73+
% ---------------------------------------------------------------------
74+
% prefix Filename Prefix
75+
% ---------------------------------------------------------------------
76+
prefix = cfg_entry;
77+
prefix.tag = 'prefix';
78+
prefix.name = 'Filename Prefix';
79+
prefix.help = {['Specify the string to be prepended to the filenames ' ...
80+
'of the reoriented image file(s). If this is left ' ...
81+
'empty, the original files will be overwritten.']};
82+
prefix.strtype = 's';
83+
prefix.num = [0 Inf];
84+
% This should not be hardcoded here
85+
prefix.val = {''};
86+
% Final solution: defaults setting
87+
% prefix.def = @(val)spm_get_defaults('reorient.prefix', val{:});
88+
% The following 3 lines should go into spm_defaults.m
89+
% % Reorient defaults
90+
% %=======================================================================
91+
% defaults.reorient.prefix = ''; % Output filename prefix ('' == overwrite)
92+
7393
% ---------------------------------------------------------------------
7494
% reorient Reorient Images
7595
% ---------------------------------------------------------------------
7696
reorient = cfg_exbranch;
7797
reorient.tag = 'reorient';
7898
reorient.name = 'Reorient Images';
79-
reorient.val = {srcfiles transform };
99+
reorient.val = {srcfiles transform prefix};
80100
reorient.help = {'This facility allows to reorient images in a batch. The reorientation parameters can be given either as a 4x4 matrix or as parameters as defined for spm_matrix.m. The new image orientation will be computed by PRE-multiplying the original orientation matrix with the supplied matrix.'};
81101
reorient.prog = @spm_run_reorient;
82102
reorient.vout = @vout;

0 commit comments

Comments
 (0)