On Tue, 2 May 2006, mintnuclear wrote:
> We have a SPM5 normalized image and would like to:
> Draw a ROI in the image
Try the ROI tool from the spm_orthviews plugins.
> Obtain the ROI mean and standard deviation (or standard error)
Extract&plot data from the spm_orthviews plugins together with the Volumes=
=20
toolbox might do that. Both are available from the SPM extensions page.
You will also need the attached file checkfields.m to run the Volumes=20
toolbox - I missed it during packaging of the latest published version.
Volkmar
function filled=checkfields(def, prov)
% Check fields from provided struct against default struct
% FORMAT filled=checkfields(def, prov)
% ======
% Input Arguments
% def - Struct containing all required fields and their default values
% prov - Struct array containing fields that will override defaults
% Output Argument
% filled - Struct array containing field values from prov, if given,
% otherwise from def struct.
% Only fields which are in def struct are checked and returned. Thus, prov
% can not add new fields to an existing default struct.
% If prov contains an struct array, fields are checked for each
% individual array member and a filled struct array is returned.
%_______________________________________________________________________
%
% @(#) $Id: checkfields.m,v 1.4 2004/06/11 13:40:26 lange Exp $
rev = '$Revision: 1.4 $';
if isempty(prov)
filled = def;
else
fnames = fieldnames(def);
filled(1:numel(prov)) = deal(def);
for k = 1:numel(fnames)
if isfield(prov(1),fnames{k})
% if 1st element has this field, then all in prov array have it
for l=1:numel(prov)
filled(l).(fnames{k}) = prov(l).(fnames{k});
end;
end;
end;
end;
return;
|