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 
63 
66 
69 
72 
75 
80 template <typename T>
81 struct pixel_type {
82  static const EPixelType value = it_unknown;
83 };
84 
85 template <>
86 struct pixel_type<bool> {
87  static const EPixelType value = it_bit;
88 };
89 
90 template <>
91 struct pixel_type<int8_t> {
92  static const EPixelType value = it_sbyte;
93 };
94 
95 template <>
96 struct pixel_type<uint8_t> {
97  static const EPixelType value = it_ubyte;
98 };
99 
100 template <>
101 struct pixel_type<int16_t> {
102  static const EPixelType value = it_sshort;
103 };
104 
105 template <>
106 struct pixel_type<uint16_t> {
107  static const EPixelType value = it_ushort;
108 };
109 
110 template <>
111 struct pixel_type<int32_t> {
112  static const EPixelType value = it_sint;
113 };
114 
115 template <>
116 struct pixel_type<uint32_t> {
117  static const EPixelType value = it_uint;
118 };
119 
120 template <>
121 struct pixel_type<int64_t> {
122  static const EPixelType value = it_slong;
123 };
124 
125 template <>
126 struct pixel_type<uint64_t> {
127  static const EPixelType value = it_ulong;
128 };
129 
130 template <>
131 struct pixel_type<float> {
132  static const EPixelType value = it_float;
133 };
134 
135 template <>
136 struct pixel_type<double> {
137  static const EPixelType value = it_double;
138 };
139 
141 
143 
144 #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:55
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