-
Notifications
You must be signed in to change notification settings - Fork 0
/
numerictype.h
67 lines (52 loc) · 1.37 KB
/
numerictype.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
#ifndef NUMERICTYPE_H
#define NUMERICTYPE_H
#include <QDebug>
enum class DataType : int
{
None = -1,
Bool = 0,
UnsignedChar,
Char,
UnsignedShort,
Short,
UnsignedInt,
Int,
UnsignedLong,
Long,
Float,
Double,
Count
};
#ifndef NUMERIC_TYPE_NO_OPENGL
#include <QOpenGLFunctions_3_3_Core>
#endif // NUMERIC_TYPE_NO_OPENGL
#ifndef NUMERIC_TYPE_NO_OPENCV
#include <opencv2/opencv.hpp>
#endif // NUMERIC_TYPE_NO_OPENCV
#ifndef NUMERIC_TYPE_NO_NIFTI
#include <nifti1.h>
#include <nifti1_io.h>
#endif // NUMERIC_TYPE_NO_NIFTI
struct NumericType
{
NumericType(DataType type_, GLenum openGLFormat_, GLenum openGLType_, int openCVType_, int openCVTypeNoChannel_, int NIFTIType_);
const DataType type;
double getMin() const;
double getMax() const;
#ifndef NUMERIC_TYPE_NO_OPENGL
const GLenum openGLFormat;
const GLenum openGLType;
static const NumericType *OpenGL(GLenum format, GLenum type);
#endif // NUMERIC_TYPE_NO_OPENGL
#ifndef NUMERIC_TYPE_NO_OPENCV
const int openCVType;
const int openCVTypeNoChannel;
static const NumericType *OpenCV(int type);
static const NumericType *OpenCV(int type, int numChannels);
#endif // NUMERIC_TYPE_NO_OPENCV
#ifndef NUMERIC_TYPE_NO_NIFTI
const int NIFTIType;
static const NumericType *NIFTI(int type);
#endif // NUMERIC_TYPE_NO_NIFTI
};
#endif // NUMERICTYPE_H