-
Notifications
You must be signed in to change notification settings - Fork 1
/
ioHandler.h
69 lines (48 loc) · 1.19 KB
/
ioHandler.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#pragma once
#include <QObject>
#include <QMessageBox>
#include <string>
#include <fstream>
#include <ctime>
#include <sstream>
#include "AtrialMachine2d.h"
#include "heartDefines.h"
#include "Model\cartesianGrid.h"
#include "DiffusionPainter.h"
#include "View\GLfunc.h"
#include <matio.h>
class SimpleHeart;
class ioHandler: public QObject
{
Q_OBJECT
public:
ioHandler(SimpleHeart* handle);
~ioHandler(void);
public slots:
// \brief Savess current structure to .mat file
bool saveCurrentStructure();
bool loadCurrentState();
CardiacMesh* loadCustomStructure();
bool saveCurrentState();
void saveAsBmp();
void setBmp();
void writeParametersToFile();
void getParametersFromFile();
void getDefaultParameters();
void savePotentialPlot();
void saveRRPlot_1();
void saveRRPlot_2();
void saveRRPlot_3();
public:
template <class Ttype> matvar_t* readMatVariable(const char *varname, mat_t *matfp, Ttype* &outvar);
mat_t * initMatlabLoad(const char *inname);
SimpleHeart* m_handle;
string paramFilename;
string filePrefix();
string m_prefix;
QString pathParameters;
ifstream inputParameters;
ofstream backupParameters;
string intToStr(int n);
int strToInt(string s);
};