pixeltype.hh
Go to the documentation of this file.
1 /* -*- mia-c++ -*-
2  *
3  * This file is part of MIA - a toolbox for medical image analysis
4  * Copyright (c) Leipzig, Madrid 1999-2017 Gert Wollny
5  *
6  * MIA is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with MIA; if not, see <http://www.gnu.org/licenses/>.
18  *
19  */
20 
21 #ifndef mia_core_pixeltype_hh
22 #define mia_core_pixeltype_hh
23 
24 #include <mia/core/dictmap.hh>
25 #include <miaconfig.h>
26 
28 
45 };
46 
61 
62 
65 
68 
71 
74 
79 template <typename T>
80 struct pixel_type {
81  static const EPixelType value = it_unknown;
82 };
83 
84 template <>
85 struct pixel_type<bool> {
86  static const EPixelType value = it_bit;
87 };
88 
89 template <>
90 struct pixel_type<int8_t> {
91  static const EPixelType value = it_sbyte;
92 };
93 
94 template <>
95 struct pixel_type<uint8_t> {
96  static const EPixelType value = it_ubyte;
97 };
98 
99 template <>
100 struct pixel_type<int16_t> {
101  static const EPixelType value = it_sshort;
102 };
103 
104 template <>
105 struct pixel_type<uint16_t> {
106  static const EPixelType value = it_ushort;
107 };
108 
109 template <>
110 struct pixel_type<int32_t> {
111  static const EPixelType value = it_sint;
112 };
113 
114 template <>
115 struct pixel_type<uint32_t> {
116  static const EPixelType value = it_uint;
117 };
118 
119 template <>
120 struct pixel_type<int64_t> {
121  static const EPixelType value = it_slong;
122 };
123 
124 template <>
125 struct pixel_type<uint64_t> {
126  static const EPixelType value = it_ulong;
127 };
128 
129 template <>
130 struct pixel_type<float> {
131  static const EPixelType value = it_float;
132 };
133 
134 template <>
135 struct pixel_type<double> {
136  static const EPixelType value = it_double;
137 };
138 
140 
142 
143 #endif
EPixelType
Definition: pixeltype.hh:32
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition: defines.hh:33
EXPORT_CORE const TDictMap< EPixelType > CPixelTypeDict
dictionary for the pixel types
EXPORT_CORE const TDictMap< EPixelConversion >::Table ConversionTypeTable[]
dictionary table for the pixel conversion types
EXPORT_CORE const TDictMap< EPixelConversion > CPixelConversionDict
dictionary for the pixel conversion types
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
Definition: defines.hh:101
EXPORT_CORE const TDictMap< EPixelType >::Table PixelTypeTable[]
dictionary table for the pixel types
EPixelConversion
Definition: pixeltype.hh:50
A mapper from emums to string values. - usefull for names flags.
Definition: dictmap.hh:45
#define NS_MIA_END
conveniance define to end the mia namespace
Definition: defines.hh:36