-
Notifications
You must be signed in to change notification settings - Fork 0
/
metadataparser.h
40 lines (34 loc) · 755 Bytes
/
metadataparser.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
#ifndef METADATAPARSER_H
#define METADATAPARSER_H
#include <QHash>
#include <QRegExp>
#include <QString>
enum MetaDataType {
NAME,
LAT,
LON,
ALT,
ROLL,
PITCH,
YAW,
NUM_META_DATA_TYPES // always the last element for robust iteration over types
};
struct MetaData {
MetaData() : dataIsValid(false) {}
bool dataIsValid;
QString imageName;
double data [NUM_META_DATA_TYPES];
};
class MetaDataParser
{
public:
MetaDataParser();
void setFileName(QString fileName);
MetaData searchForImage(QString fullImagePath);
private:
MetaData getDataFromElements(QStringList elements);
QString metaDataFileName;
QHash<MetaDataType, int> hashMap;
QRegExp regex;
};
#endif // METADATAPARSER_H