-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspm_global.m
35 lines (31 loc) · 1002 Bytes
/
spm_global.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
function GX = spm_global(V)
% Compute the global mean for a volume image - a compiled routine
% FORMAT GX = spm_global(V)
% V - image handle structure
% GX - global mean
%__________________________________________________________________________
%
% spm_global returns the mean counts integrated over all the slices from
% the volume.
%
% The mean is estimated after discounting voxels outside the object using
% a criteria of greater than > (global mean)/8.
%__________________________________________________________________________
% Copyright (C) 1996-2012 Wellcome Trust Centre for Neuroimaging
% Anonymous
% $Id: spm_global.m 4921 2012-09-13 11:16:21Z guillaume $
%-This is merely the help file for the compiled routine
error('spm_global.c not compiled - see Makefile')
% GX = zeros(numel(V),1);
%
% for i=1:numel(V)
%
% D = spm_data_read(V(i));
%
% iD = isfinite(D);
%
% S = mean(D(iD)) / 8;
%
% GX(i) = mean(D(iD & (D > S)));
%
% end