Skip to content
Snippets Groups Projects
contrast_mgr.cc 1.14 KiB
Newer Older
Stephen Smith's avatar
Stephen Smith committed
/*  contrast_mgr.cc

    Mark Woolrich, FMRIB Image Analysis Group

    Copyright (C) 1999-2000 University of Oxford  */

/*  CCOPYRIGHT  */

#include <iostream>
#include <fstream>
#include <sstream>
Stephen Smith's avatar
Stephen Smith committed
#define WANT_STREAM
#define WANT_MATH

#include "newmatap.h"
#include "newmatio.h"
David Flitney's avatar
David Flitney committed
#include "miscmaths/volumeseries.h"
#include "miscmaths/volume.h"
Stephen Smith's avatar
Stephen Smith committed
#include "ContrastMgr.h"
#include "miscmaths/miscmaths.h"
#include "utils/log.h"
Stephen Smith's avatar
Stephen Smith committed
#include "ContrastMgrOptions.h"
#include "utils/tracer_plus.h"
#include <string>
Stephen Smith's avatar
Stephen Smith committed

using namespace NEWMAT;
David Flitney's avatar
David Flitney committed
using namespace MISCMATHS;
Mark Woolrich's avatar
Mark Woolrich committed
using namespace FILM;
using namespace Utilities;
Stephen Smith's avatar
Stephen Smith committed

int main(int argc, char *argv[])
{
  try{
    
    // Setup logging:
Mark Woolrich's avatar
Mark Woolrich committed
    Log& logger = LogSingleton::getInstance();
Stephen Smith's avatar
Stephen Smith committed

Mark Woolrich's avatar
Mark Woolrich committed

    // parse command line
    ContrastMgrOptions& globalopts = ContrastMgrOptions::getInstance();
    globalopts.parse_command_line(argc, argv, logger);

Mark Woolrich's avatar
Mark Woolrich committed
    if(globalopts.debug)
      Tracer_Plus::setrunningstackon();
Mark Woolrich's avatar
Mark Woolrich committed
    ContrastMgr conMgr;
Mark Woolrich's avatar
Mark Woolrich committed
    conMgr.run();
    
Stephen Smith's avatar
Stephen Smith committed
  }
Mark Woolrich's avatar
Mark Woolrich committed
  catch(Exception& p_excp) 
Stephen Smith's avatar
Stephen Smith committed
    {
      cerr << p_excp.what() << endl;
    }
  catch(...)
    {
      cerr << "Uncaught exception!" << endl;
    }

Stephen Smith's avatar
Stephen Smith committed
  return 0;
}