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

    Mark Woolrich, FMRIB Image Analysis Group

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

Stephen Smith's avatar
Stephen Smith committed
/*  CCOPYRIGHT  */
Stephen Smith's avatar
Stephen Smith committed

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

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

Mark Woolrich's avatar
Mark Woolrich committed
using namespace Utilities;
Stephen Smith's avatar
Stephen Smith committed

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

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

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

  string neffsfname;
  
  bool verbose;
  bool smoothACEst;
  bool fitAutoRegressiveModel;
Mark Woolrich's avatar
Mark Woolrich committed
  bool tukey;
  bool pava;
  bool multitaper;
  bool noest;
Mark Woolrich's avatar
Mark Woolrich committed
  bool ac_only;
Mark Woolrich's avatar
Mark Woolrich committed
  bool output_pwdata;
Mark Woolrich's avatar
Mark Woolrich committed

  int tukeysize;
  float multitapersize;

Stephen Smith's avatar
Stephen Smith committed
  int trimscans;
Mark Woolrich's avatar
Mark Woolrich committed
  float thresh;
Stephen Smith's avatar
Stephen Smith committed
  int ms;
  short maxshort;
Mark Woolrich's avatar
Mark Woolrich committed
  int epith;
Stephen Smith's avatar
Stephen Smith committed

Mark Woolrich's avatar
Mark Woolrich committed
  void parse_command_line(int argc, char** argv, Log& logger);
Stephen Smith's avatar
Stephen Smith committed

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

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

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

inline FilmGlsOptions::FilmGlsOptions()
{ 
  // set up defaults
  neffsfname = "neffs";
  datadir = "results";
  epifname = "epivolume";
  thresh = 0;
  inputfname = "";  
  paradigmfname = "";
Mark Woolrich's avatar
Mark Woolrich committed
  epith = 0;
Stephen Smith's avatar
Stephen Smith committed
  
  ms = 4;
  maxshort = 32000;
  fitAutoRegressiveModel = false;
Mark Woolrich's avatar
Mark Woolrich committed
  tukeysize = 0;  
  multitapersize = 4.0;
  
Stephen Smith's avatar
Stephen Smith committed
  smoothACEst = false;
  verbose = false;
Mark Woolrich's avatar
Mark Woolrich committed
  pava = false;
  tukey = true;
  multitaper = false;
  noest = false;  
Mark Woolrich's avatar
Mark Woolrich committed
  ac_only = false;
Mark Woolrich's avatar
Mark Woolrich committed
  output_pwdata = false;