baseline.cpp
835 Bytes
#include <iostream>
#include <time.h>
#include <thread>
#include "stim/envi/envi_header.h"
#include "stim/envi/bip.h"
#include "stim/envi/bil.h"
#include "stim/envi/bsq.h"
#include "stim/envi/envi.h"
void progress_thread_envi(stim::envi* e);
extern stim::envi ENVI;
//perform the appropriate baseline correction, depending on file type
void baseline(std::string infile, std::string outfile, std::string headerfile, std::vector<double> points, unsigned char* mask){
std::cout<<"Performing linear baseline correction using "<<points.size()<<" points..."<<std::endl;
std::thread t1(progress_thread_envi, &ENVI); //start the progress bar thread
ENVI.baseline(outfile,points, mask, true); //perform baseline correction
//ENVI.close();
t1.join(); //wait for the progress bar thread to finish (it probably already is)
}