My Project
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
pc_copy
@ pc_copy
Definition: pixeltype.hh:50
it_float
@ it_float
Definition: pixeltype.hh:41
NS_MIA_BEGIN
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition: defines.hh:33
pc_unknown
@ pc_unknown
Definition: pixeltype.hh:60
dictmap.hh
it_bit
@ it_bit
Definition: pixeltype.hh:32
it_sint
@ it_sint
Definition: pixeltype.hh:37
NS_MIA_END
#define NS_MIA_END
conveniance define to end the mia namespace
Definition: defines.hh:36
pc_range
@ pc_range
Definition: pixeltype.hh:52
it_ushort
@ it_ushort
Definition: pixeltype.hh:36
pc_linear
@ pc_linear
Definition: pixeltype.hh:51
it_sbyte
@ it_sbyte
Definition: pixeltype.hh:33
TDictMap::Table
Definition: dictmap.hh:54
it_double
@ it_double
Definition: pixeltype.hh:42
TDictMap
A mapper from emums to string values. - usefull for names flags.
Definition: dictmap.hh:45
it_none
@ it_none
Definition: pixeltype.hh:43
pc_opt_stat
@ pc_opt_stat
Definition: pixeltype.hh:57
it_ubyte
@ it_ubyte
Definition: pixeltype.hh:34
CPixelConversionDict
const EXPORT_CORE TDictMap< EPixelConversion > CPixelConversionDict
dictionary for the pixel conversion types
EXPORT_CORE
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
Definition: defines.hh:101
EPixelConversion
EPixelConversion
Definition: pixeltype.hh:50
CPixelTypeDict
const EXPORT_CORE TDictMap< EPixelType > CPixelTypeDict
dictionary for the pixel types
ConversionTypeTable
const EXPORT_CORE TDictMap< EPixelConversion >::Table ConversionTypeTable[]
dictionary table for the pixel conversion types
PixelTypeTable
const EXPORT_CORE TDictMap< EPixelType >::Table PixelTypeTable[]
dictionary table for the pixel types
EPixelType
EPixelType
Definition: pixeltype.hh:32
it_ulong
@ it_ulong
Definition: pixeltype.hh:40
it_uint
@ it_uint
Definition: pixeltype.hh:38
pc_opt
@ pc_opt
Definition: pixeltype.hh:55
it_sshort
@ it_sshort
Definition: pixeltype.hh:35
it_slong
@ it_slong
Definition: pixeltype.hh:39
it_unknown
@ it_unknown
Definition: pixeltype.hh:44