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

    Mark Woolrich, FMRIB Image Analysis Group

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

/*  CCOPYRIGHT  */

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

Stephen Smith's avatar
Stephen Smith committed
#include <iostream>
#include <fstream>
#include "newmatap.h"
#include "newmatio.h"
Stephen Smith's avatar
Stephen Smith committed
#include <string>

using namespace NEWMAT;
Mark Woolrich's avatar
Mark Woolrich committed
namespace FILM {
Stephen Smith's avatar
Stephen Smith committed
  
  class Paradigm
    {
    public:

      Paradigm() :
	designMatrix(),
Mark Woolrich's avatar
Mark Woolrich committed
	tcontrasts(0,0),
	fcontrasts(0,0)
Stephen Smith's avatar
Stephen Smith committed
	{}
 
      const Paradigm& operator=(Paradigm& par)
      {
	designMatrix = par.designMatrix;
Mark Woolrich's avatar
Mark Woolrich committed
	tcontrasts = par.tcontrasts;
	fcontrasts = par.fcontrasts;
Stephen Smith's avatar
Stephen Smith committed
	return *this;
      }
	
      Paradigm(Paradigm& par) { operator=(par); }

      // getters and setters:
      Matrix& getDesignMatrix() { return designMatrix; }
      void setDesignMatrix(const Matrix& pdesignMatrix) { designMatrix = pdesignMatrix; }

Mark Woolrich's avatar
Mark Woolrich committed
      Matrix& getTContrasts() { return tcontrasts; }
      Matrix& getFContrasts() { return fcontrasts; }
      //void setContrasts(const Matrix& pcontrasts) { contrasts = pcontrasts; }
Stephen Smith's avatar
Stephen Smith committed

      // useful functions:
Mark Woolrich's avatar
Mark Woolrich committed
      void load(const string& p_paradfname, const string& p_tcontrastfname, const string& p_contrastfname, bool p_blockdesign, int p_sizets);

      static void read_vest_waveform(string p_fname, Matrix& p_mat);
Stephen Smith's avatar
Stephen Smith committed

      ~Paradigm() {}
 
    private:
      
      Matrix designMatrix;
Mark Woolrich's avatar
Mark Woolrich committed
      Matrix tcontrasts;
      Matrix fcontrasts;
Stephen Smith's avatar
Stephen Smith committed
    };

}
Mark Woolrich's avatar
Mark Woolrich committed

#endif