Skip to content

Commit 61d19bb

Browse files
committed
SPM12 r6470
1 parent f6948ff commit 61d19bb

File tree

721 files changed

+38557
-15419
lines changed

Some content is hidden

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

721 files changed

+38557
-15419
lines changed

@file_array/private/init.c

+24-16
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,37 @@
11
/*
2-
* $Id: init.c 6076 2014-06-30 13:41:11Z guillaume $
2+
* $Id: init.c 6428 2015-05-06 14:09:04Z guillaume $
33
* Guillaume Flandin
44
*/
55

66
#ifndef MATLAB_MEX_FILE
7-
#undef _LARGEFILE64_SOURCE
8-
#define _LARGEFILE64_SOURCE
9-
#include <stdio.h>
10-
#include <sys/stat.h>
11-
#define structStat struct stat64
12-
#define getFileFstat fstat64
13-
#define getFilePos fgetpos64
14-
#define setFilePos fsetpos64
15-
#define fpos_T fpos64_t
7+
# undef _LARGEFILE64_SOURCE
8+
# define _LARGEFILE64_SOURCE
9+
# include <stdio.h>
10+
# include <sys/stat.h>
11+
# if defined(__APPLE__)
12+
# define structStat struct stat
13+
# define getFileFstat fstat
14+
# define getFilePos fgetpos
15+
# define setFilePos fsetpos
16+
# define fpos_T fpos_t
17+
# else
18+
# define structStat struct stat64
19+
# define getFileFstat fstat64
20+
# define getFilePos fgetpos64
21+
# define setFilePos fsetpos64
22+
# define fpos_T fpos64_t
23+
# endif
1624
#else
17-
#include "io64.h"
25+
# include "io64.h"
1826
#endif
1927
#include "mex.h"
2028
#ifdef SPM_WIN32
21-
#include <io.h>
22-
#define snprintf _snprintf
23-
#define ftruncate _chsize_s
29+
# include <io.h>
30+
# define snprintf _snprintf
31+
# define ftruncate _chsize_s
2432
#else
25-
#include <unistd.h>
26-
#include <sys/types.h>
33+
# include <unistd.h>
34+
# include <sys/types.h>
2735
#endif
2836

2937

@gifti/Contents.m

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@
88
% This MATLAB class is part of SPM:
99
% http://www.fil.ion.ucl.ac.uk/spm/
1010
%
11-
% It relies on external MATLAB code:
11+
% It relies on external libraries:
1212
% Base64, by Peter J. Acklam:
1313
% http://home.online.no/~pjacklam/
14-
% dzip, by Michael Kleder:
15-
% http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=8899
14+
% miniz, by Rich Geldreich:
15+
% http://code.google.com/p/miniz/
1616
% XMLTree, by Guillaume Flandin:
1717
% http://www.artefact.tk/software/matlab/xml/
1818
%__________________________________________________________________________
19-
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
19+
% Copyright (C) 2008-2015 Wellcome Trust Centre for Neuroimaging
2020

2121
% Guillaume Flandin
22-
% $Id: Contents.m 2076 2008-09-10 12:34:08Z guillaume $
22+
% $Id: Contents.m 6404 2015-04-13 14:29:53Z guillaume $
2323

2424
% GIfTI file format for MATLAB (The Mathworks, Inc.).
25-
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
25+
% Copyright (C) 2008-2015 Wellcome Trust Centre for Neuroimaging
2626
%
2727
% This program is free software; you can redistribute it and/or
2828
% modify it under the terms of the GNU General Public License

@gifti/export.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
% Export a GIfTI object into specific MATLAB struct
33
% FORMAT s = export(this,target)
44
% this - GIfTI object
5-
% target - string describing target output [default: Matlab]
5+
% target - string describing target output [default: MATLAB]
66
% s - a structure containing public fields of the object
77
%__________________________________________________________________________
88
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
99

1010
% Guillaume Flandin
11-
% $Id: export.m 5160 2012-12-21 16:58:38Z guillaume $
11+
% $Id: export.m 6401 2015-04-09 17:21:33Z guillaume $
1212

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

15-
if nargin <= 1, target = 'Matlab'; end
15+
if nargin <= 1, target = 'MATLAB'; end
1616

1717
switch lower(target)
1818
case 'matlab'

@gifti/fieldnames.m

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

99
% Guillaume Flandin
10-
% $Id: fieldnames.m 5608 2013-08-13 15:13:19Z guillaume $
10+
% $Id: fieldnames.m 6345 2015-02-20 12:25:50Z guillaume $
1111

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

14-
pfn = {'vertices' 'faces' 'normals' 'cdata' 'mat' 'labels'};
14+
pfn = {'vertices' 'faces' 'normals' 'cdata' 'mat' 'labels' 'indices'};
1515

1616
names = pfn(isintent(this,pfn));

@gifti/gifti.m

+3-3
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: gifti.m 5322 2013-03-13 15:04:14Z guillaume $
11+
% $Id: gifti.m 6347 2015-02-24 17:59:16Z guillaume $
1212

1313
switch nargin
1414

@@ -21,8 +21,8 @@
2121
this = varargin{1};
2222

2323
elseif isstruct(varargin{1})
24-
f = {'faces', 'face', 'tri' 'vertices', 'vert', 'pnt', 'cdata'};
25-
ff = {'faces', 'faces', 'faces', 'vertices', 'vertices', 'vertices', 'cdata'};
24+
f = {'faces', 'face', 'tri' 'vertices', 'vert', 'pnt', 'cdata', 'indices'};
25+
ff = {'faces', 'faces', 'faces', 'vertices', 'vertices', 'vertices', 'cdata', 'indices'};
2626
[c, ia] = intersect(f,fieldnames(varargin{1}));
2727
if ~isempty(c)
2828
this = gifti;

@gifti/private/Makefile

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/env make -f
2+
# GIfTI Makefile called by {SPM}/src/Makefile
3+
#
4+
# Copyright (C) 2015 Wellcome Trust Centre for Neuroimaging
5+
#
6+
# $Id: Makefile 6402 2015-04-09 18:11:06Z guillaume $
7+
8+
include ../../src/Makefile.var
9+
10+
SPMMEX = zstream.$(SUF)
11+
12+
ifeq (mex,$(SUF))
13+
export CFLAGS = $(shell $(MEX) -p CFLAGS) -std=c99
14+
else
15+
MEXOPTS += CFLAGS='$$CFLAGS -std=c99'
16+
endif
17+
18+
all: $(SPMMEX)
19+
@:
20+
21+
clean:
22+
@:
23+
24+
distclean: clean
25+
$(DEL) $(SPMMEX)
26+
27+
install:
28+
@:
29+
30+
tarball: all
31+
$(TAR) cf spm_mex.tar $(SPMMEX)
32+
33+
%.$(SUF) : %.c
34+
$(MEX) $< $(MEXEND)

@gifti/private/dunzip.m

-19
This file was deleted.

@gifti/private/dzip.m

-22
This file was deleted.

@gifti/private/isintent.m

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

1111
% Guillaume Flandin
12-
% $Id: isintent.m 5608 2013-08-13 15:13:19Z guillaume $
12+
% $Id: isintent.m 6345 2015-02-20 12:25:50Z guillaume $
1313

1414
a = [];
1515
b = [];
@@ -39,6 +39,12 @@
3939
a(end+1) = loc;
4040
b(end+1) = i;
4141
end
42+
case 'NODE_INDEX'
43+
[tf, loc] = ismember('indices',intent);
44+
if tf
45+
a(end+1) = loc;
46+
b(end+1) = i;
47+
end
4248
case cdata
4349
[tf, loc] = ismember('cdata',intent);
4450
if tf
@@ -101,7 +107,6 @@
101107
'TIME_SERIES'
102108
'RGB_VECTOR'
103109
'RGBA_VECTOR'
104-
'NODE_INDEX'
105110
'SHAPE'
106111
'CONNECTIVITY_DENSE'
107112
'CONNECTIVITY_DENSE_TIME'

0 commit comments

Comments
 (0)