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

    Mark Woolrich, FMRIB Image Analysis Group

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

/*  CCOPYRIGHT  */

Mark Woolrich's avatar
Mark Woolrich committed
#if !defined(__BandPassOptions_h)
#define __BandPassOptions_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 BandPassOptions {
 public:
  static BandPassOptions& getInstance();
  ~BandPassOptions() { delete gopt; }

  string inputfname;
  string datadir;

  bool verbose;
  int thresh;
  int lowcut;
  int highcut;

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

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

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

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

inline BandPassOptions::BandPassOptions()
{
  // set up defaults
  datadir = "results";  
  inputfname = "";  

  highcut = 0;
  lowcut = 0;

  thresh = 0;
  verbose = false;
}