// Calculates the surface normals for a mask, using a smoothed
// gradient calculation (all non-surface points get zero ouput)
#define _GNU_SOURCE 1
#define POSIX_SOURCE 1
#include<vector>
#include<algorithm>
#include"newimage/newimageall.h"
#include"miscmaths/miscmaths.h"
#include"utils/options.h"
#include"miscmaths/t2z.h"
usingnamespaceMISCMATHS;
usingnamespaceNEWIMAGE;
usingnamespaceUtilities;
// The two strings below specify the title and example usage that is
// printed out as the help or usage message
stringtitle="groupttest (Version 1.1)\nCopyright(c) 2004, University of Oxford (Mark Jenkinson)";
stringexamples="groupttest --na=<number in group A> --nb=<number in group B> -m <maskvol> -o <groupres> [options] <list of images for group A> <list of images for group B>\ne.g. groupttest --na=15 --nb=15 -m maskvol -o groupres groupA/*.hdr* groupB/*.hdr*";
// Each (global) object below specificies as option and can be accessed
// anywhere in this file (since they are global). The order of the
// arguments needed is: name(s) of option, default value, help message,
// whether it is compulsory, whether it requires arguments
// Note that they must also be included in the main() function or they