API
 
Loading...
Searching...
No Matches
ImageStruct.hpp
Go to the documentation of this file.
1
2
3///\todo document this file
4
5#ifndef ImageStruct_hpp
6#define ImageStruct_hpp
7
8#include <ImageStreamIO/ImageStruct.h>
9
10#ifndef ULONGLONG_IMG
11#define ULONGLONG_IMG (80)
12#endif
13
14#define IMAGESTRUCT_UINT8 1
15#define IMAGESTRUCT_INT8 2
16#define IMAGESTRUCT_UINT16 3
17#define IMAGESTRUCT_INT16 4
18#define IMAGESTRUCT_UINT32 5
19#define IMAGESTRUCT_INT32 6
20#define IMAGESTRUCT_UINT64 7
21#define IMAGESTRUCT_INT64 8
22#define IMAGESTRUCT_FLOAT 9
23#define IMAGESTRUCT_DOUBLE 10
24#define IMAGESTRUCT_COMPLEX_FLOAT 11
25#define IMAGESTRUCT_COMPLEX_DOUBLE 12
26#define IMAGESTRUCT_EVENT_UI8_UI8_UI16_UI8 20
27
28template<int is_dt>
30
31template<>
33{
34 typedef uint8_t type;
35 constexpr static size_t size = sizeof(type);
36 constexpr static type max = std::numeric_limits<type>::max();
37
38 static void setPointer( IMAGE & im, void * mapv) { im.array.UI8 = static_cast<type*>(mapv);}
39};
40
41template<>
43{
44 typedef int8_t type;
45 constexpr static size_t size = sizeof(type);
46 constexpr static type max = std::numeric_limits<type>::max();
47
48 static void setPointer( IMAGE & im, void * mapv) { im.array.SI8 = static_cast<type*>(mapv);}
49};
50
51template<>
53{
54 typedef uint16_t type;
55 constexpr static size_t size = sizeof(type);
56 constexpr static type max = std::numeric_limits<type>::max();
57
58 static void setPointer( IMAGE & im, void * mapv) { im.array.UI16 = static_cast<type*>(mapv);}
59};
60
61template<>
63{
64 typedef int16_t type;
65 constexpr static size_t size = sizeof(type);
66 constexpr static type max = std::numeric_limits<type>::max();
67
68 static void setPointer( IMAGE & im, void * mapv) { im.array.SI16 = static_cast<type*>(mapv);}
69};
70
71template<>
73{
74 typedef uint32_t type;
75 constexpr static size_t size = sizeof(type);
76 constexpr static type max = std::numeric_limits<type>::max();
77
78 static void setPointer( IMAGE & im, void * mapv) { im.array.UI32 = static_cast<type*>(mapv);}
79};
80
81template<>
83{
84 typedef int32_t type;
85 constexpr static size_t size = sizeof(type);
86 constexpr static type max = std::numeric_limits<type>::max();
87
88 static void setPointer( IMAGE & im, void * mapv) { im.array.SI32 = static_cast<type*>(mapv);}
89};
90
91template<>
93{
94 typedef uint64_t type;
95 constexpr static size_t size = sizeof(type);
96 constexpr static type max = std::numeric_limits<type>::max();
97
98 static void setPointer( IMAGE & im, void * mapv) { im.array.UI64 = static_cast<type*>(mapv);}
99};
100
101template<>
103{
104 typedef int64_t type;
105 constexpr static size_t size = sizeof(type);
106 constexpr static type max = std::numeric_limits<type>::max();
107
108 static void setPointer( IMAGE & im, void * mapv) { im.array.SI64 = static_cast<type*>(mapv);}
109};
110
111template<>
113{
114 typedef float type;
115 constexpr static size_t size = sizeof(type);
116 constexpr static type max = std::numeric_limits<type>::max();
117
118 static void setPointer( IMAGE & im, void * mapv) { im.array.F = static_cast<type*>(mapv);}
119};
120
121template<>
123{
124 typedef double type;
125 constexpr static size_t size = sizeof(type);
126 constexpr static type max = std::numeric_limits<type>::max();
127
128 static void setPointer( IMAGE & im, void * mapv) { im.array.D = static_cast<type*>(mapv);}
129};
130
131template<>
133{
134 typedef complex_float type;
135 constexpr static size_t size = sizeof(type);
136 constexpr static type max = std::numeric_limits<type>::max();
137
138 static void setPointer( IMAGE & im, void * mapv) { im.array.CF = static_cast<type*>(mapv);}
139};
140
141template<>
143{
144 typedef complex_double type;
145 constexpr static size_t size = sizeof(type);
146
147 static void setPointer( IMAGE & im, void * mapv) { im.array.CD = static_cast<type*>(mapv);}
148};
149
150/*template<>
151struct imageStructDataType<IMAGESTRUCT_EVENT_UI8_UI8_UI16_UI8>
152{
153 typedef EVENT_UI8_UI8_UI16_UI8 type;
154 constexpr static size_t size = sizeof(type);
155
156 static void setPointer( IMAGE & im, void * mapv) { im.array.event1121 = static_cast<type*>(mapv);}
157};*/
158
159#endif //ImageStruct_hpp
#define IMAGESTRUCT_UINT16
#define IMAGESTRUCT_INT64
#define IMAGESTRUCT_FLOAT
#define IMAGESTRUCT_INT32
#define IMAGESTRUCT_UINT32
#define IMAGESTRUCT_COMPLEX_DOUBLE
#define IMAGESTRUCT_COMPLEX_FLOAT
#define IMAGESTRUCT_INT8
#define IMAGESTRUCT_DOUBLE
#define IMAGESTRUCT_UINT8
#define IMAGESTRUCT_INT16
#define IMAGESTRUCT_UINT64
static void setPointer(IMAGE &im, void *mapv)
static void setPointer(IMAGE &im, void *mapv)
static void setPointer(IMAGE &im, void *mapv)
static void setPointer(IMAGE &im, void *mapv)
static void setPointer(IMAGE &im, void *mapv)
static void setPointer(IMAGE &im, void *mapv)
static void setPointer(IMAGE &im, void *mapv)
static void setPointer(IMAGE &im, void *mapv)
static void setPointer(IMAGE &im, void *mapv)
static void setPointer(IMAGE &im, void *mapv)
static void setPointer(IMAGE &im, void *mapv)
static void setPointer(IMAGE &im, void *mapv)