Skip to content
Snippets Groups Projects
FilmOlsOptions.h 1.58 KiB
Newer Older
Stephen Smith's avatar
Stephen Smith committed
/*  FilmOlsOptions.h

    Mark Woolrich, FMRIB Image Analysis Group

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

/*  CCOPYRIGHT  */

Mark Woolrich's avatar
Mark Woolrich committed
#if !defined(__FilmOlsOptions_h)
#define __FilmOlsOptions_h

#include <string>
#include <math.h>
#include <iostream.h>
#include <fstream.h>
#include <stdlib.h>
#include <stdio.h>
Stephen Smith's avatar
Stephen Smith committed

Mark Woolrich's avatar
Mark Woolrich committed
namespace FILM {
Stephen Smith's avatar
Stephen Smith committed

class FilmOlsOptions {
 public:
  static FilmOlsOptions& getInstance();
  ~FilmOlsOptions() { delete gopt; }

  string inputfname;
  string paradigmfname;
  string datadir;
  string epifname;
  string susanpath;

  bool verbose;
  bool detrend;
  bool smoothACEst;
  bool fitAutoRegressiveModel;
  bool globalEst;
  bool prewhiten;
  bool noest;

  int trimscans;
  int thresh;
  int ms;
  int epith;
  short maxshort;

  void parse_command_line(int argc, char** argv, ofstream& logfile);

 private:
  FilmOlsOptions();
  
  const FilmOlsOptions& operator=(FilmOlsOptions&);
  FilmOlsOptions(FilmOlsOptions&);
      
  static FilmOlsOptions* gopt;

  void print_usage(int argc, char *argv[]);
  
};

inline FilmOlsOptions& FilmOlsOptions::getInstance(){
  if(gopt == NULL)
    gopt = new FilmOlsOptions();
  
  return *gopt;
}

inline FilmOlsOptions::FilmOlsOptions()
{
  // set up defaults
  datadir = "results";  
  epifname = "epivolume";
  inputfname = "";  
  paradigmfname = "";
  susanpath = "/usr/local/fsl/bin/susan_smooth";
  
  thresh = 0;
  ms = 4;
  epith = 100;
  maxshort = 32000;
  fitAutoRegressiveModel = false;

  prewhiten = false;
  smoothACEst = false;
  verbose = false;
  detrend = false;
  globalEst = false;
  noest = false;
}