38 #ifndef OME_FILES_PIXELPROPERTIES_H 39 #define OME_FILES_PIXELPROPERTIES_H 44 #include <ome/common/boolean.h> 47 #include <ome/files/Types.h> 49 #include <ome/xml/model/enums/PixelType.h> 86 return sizeof(
typename P::std_type);
129 static const bool is_signed =
true;
131 static const bool is_integer =
true;
133 static const bool is_complex =
false;
152 static const bool is_signed =
true;
154 static const bool is_integer =
true;
156 static const bool is_complex =
false;
175 static const bool is_signed =
true;
177 static const bool is_integer =
true;
179 static const bool is_complex =
false;
198 static const bool is_signed =
false;
200 static const bool is_integer =
true;
202 static const bool is_complex =
false;
208 public PixelPropertiesBase<struct PixelProperties<::ome::xml::model::enums::PixelType::UINT16>>
221 static const bool is_signed =
false;
223 static const bool is_integer =
true;
225 static const bool is_complex =
false;
244 static const bool is_signed =
false;
246 static const bool is_integer =
true;
248 static const bool is_complex =
false;
267 static const bool is_signed =
true;
269 static const bool is_integer =
false;
271 static const bool is_complex =
false;
290 static const bool is_signed =
true;
292 static const bool is_integer =
false;
294 static const bool is_complex =
false;
313 static const bool is_signed =
false;
315 static const bool is_integer =
true;
317 static const bool is_complex =
false;
335 public PixelPropertiesBase<PixelProperties<::ome::xml::model::enums::PixelType::COMPLEXFLOAT>>
341 typedef std::complex<boost::endian::big_float32_t>
big_type;
343 typedef std::complex<boost::endian::little_float32_t>
little_type;
345 typedef std::complex<boost::endian::native_float32_t>
native_type;
348 static const bool is_signed =
true;
350 static const bool is_integer =
false;
352 static const bool is_complex =
true;
358 public PixelPropertiesBase<PixelProperties<::ome::xml::model::enums::PixelType::COMPLEXDOUBLE>>
364 typedef std::complex<boost::endian::big_float64_t>
big_type;
366 typedef std::complex<boost::endian::little_float64_t>
little_type;
368 typedef std::complex<boost::endian::native_float64_t>
native_type;
371 static const bool is_signed =
true;
373 static const bool is_integer =
false;
375 static const bool is_complex =
true;
498 bool is_signed =
false,
499 bool is_integer =
true,
500 bool is_complex =
false);
518 bool is_signed =
false,
519 bool is_integer =
true,
520 bool is_complex =
false);
531 boost::endian::reverse(value);
545 value = std::complex<float>(reverse_value(value.real()),
546 reverse_value(value.imag()));
560 value = std::complex<double>(reverse_value(value.real()),
561 reverse_value(value.imag()));
567 #endif // OME_FILES_PIXELPROPERTIES_H
pixel_size_type bytesPerPixel(::ome::xml::model::enums::PixelType pixeltype)
Get the size of a PixelType, in bytes.
Definition: PixelProperties.cpp:65
boost::endian::little_uint8_t little_type
Pixel type (little endian).
Definition: PixelProperties.h:193
::ome::xml::model::enums::PixelType pixelTypeFromBytes(pixel_size_type size, bool is_signed, bool is_integer, bool is_complex)
Determine a likely pixel type from its the storage size in bytes.
Definition: PixelProperties.cpp:190
boost::endian::little_float64_t little_type
Pixel type (little endian).
Definition: PixelProperties.h:285
double std_type
Pixel type (standard language type).
Definition: PixelProperties.h:280
::ome::xml::model::enums::PixelType pixelTypeFromBits(pixel_size_type size, bool is_signed, bool is_integer, bool is_complex)
Determine a likely pixel type from its the storage size in bits.
Definition: PixelProperties.cpp:251
Properties common to all pixel types.
Definition: PixelProperties.h:76
PixelProperties< P >::little_type type
Pixel type (little endian).
Definition: PixelProperties.h:398
ome::common::boolean big_type
Pixel type (big endian).
Definition: PixelProperties.h:306
uint32_t pixel_size_type
Size type for pixel bit depths.
Definition: Types.h:61
pixel_size_type significantBitsPerPixel(::ome::xml::model::enums::PixelType pixeltype)
Get the significant (maximum bits used) size of a PixelType, in bits.
Definition: PixelProperties.cpp:105
boost::endian::little_int8_t little_type
Pixel type (little endian).
Definition: PixelProperties.h:124
static pixel_size_type pixel_byte_size()
Get size of pixel type, in bytes.
Definition: PixelProperties.h:84
std::complex< boost::endian::big_float64_t > big_type
Pixel type (big endian).
Definition: PixelProperties.h:364
Big endian.
Definition: Types.h:69
std::complex< boost::endian::native_float64_t > native_type
Pixel type (native endian).
Definition: PixelProperties.h:368
static pixel_size_type pixel_significant_bit_size()
Get significant (maximum bits used) size of pixel type, in bits.
Definition: PixelProperties.h:107
Map a given PixelPropertiesType enum to the corresponding language types.
Definition: PixelProperties.h:60
boost::endian::big_float32_t big_type
Pixel type (big endian).
Definition: PixelProperties.h:260
std::complex< float > std_type
Pixel type (standard language type).
Definition: PixelProperties.h:338
std::complex< boost::endian::native_float32_t > native_type
Pixel type (native endian).
Definition: PixelProperties.h:345
boost::endian::little_uint32_t little_type
Pixel type (little endian).
Definition: PixelProperties.h:239
boost::endian::native_uint8_t native_type
Pixel type (native endian).
Definition: PixelProperties.h:195
bool isInteger(::ome::xml::model::enums::PixelType pixeltype)
Check whether a PixelType is integer.
Definition: PixelProperties.cpp:145
uint8_t std_type
Pixel type (standard language type).
Definition: PixelProperties.h:188
static pixel_size_type pixel_bit_size()
Get size of pixel type, in bits.
Definition: PixelProperties.h:95
int32_t std_type
Pixel type (standard language type).
Definition: PixelProperties.h:165
boost::endian::big_int16_t big_type
Pixel type (big endian).
Definition: PixelProperties.h:145
uint16_t std_type
Pixel type (standard language type).
Definition: PixelProperties.h:211
boost::endian::little_float32_t little_type
Pixel type (little endian).
Definition: PixelProperties.h:262
bool isComplex(::ome::xml::model::enums::PixelType pixeltype)
Check whether a PixelType is complex.
Definition: PixelProperties.cpp:171
boost::endian::big_uint32_t big_type
Pixel type (big endian).
Definition: PixelProperties.h:237
std::complex< boost::endian::little_float32_t > little_type
Pixel type (little endian).
Definition: PixelProperties.h:343
float std_type
Pixel type (standard language type).
Definition: PixelProperties.h:257
Open Microscopy Environment C++.
boost::endian::native_int32_t native_type
Pixel type (native endian).
Definition: PixelProperties.h:172
boost::endian::little_int16_t little_type
Pixel type (little endian).
Definition: PixelProperties.h:147
Native endian.
Definition: Types.h:71
ome::common::boolean native_type
Pixel type (native endian).
Definition: PixelProperties.h:310
int16_t std_type
Pixel type (standard language type).
Definition: PixelProperties.h:142
boost::endian::native_float32_t native_type
Pixel type (native endian).
Definition: PixelProperties.h:264
void byteswap(T &value)
Byteswap value to switch endianness.
Definition: PixelProperties.h:529
boost::endian::little_uint16_t little_type
Pixel type (little endian).
Definition: PixelProperties.h:216
bool isFloatingPoint(::ome::xml::model::enums::PixelType pixeltype)
Check whether a PixelType is floating point.
Definition: PixelProperties.cpp:160
PixelProperties< P >::big_type type
Pixel type (big endian).
Definition: PixelProperties.h:390
bool isSigned(::ome::xml::model::enums::PixelType pixeltype)
Check whether a PixelType is signed.
Definition: PixelProperties.cpp:125
boost::endian::big_int8_t big_type
Pixel type (big endian).
Definition: PixelProperties.h:122
boost::endian::big_uint8_t big_type
Pixel type (big endian).
Definition: PixelProperties.h:191
PixelProperties< P >::native_type type
Pixel type (native endian).
Definition: PixelProperties.h:406
std::complex< boost::endian::little_float64_t > little_type
Pixel type (little endian).
Definition: PixelProperties.h:366
boost::endian::big_uint16_t big_type
Pixel type (big endian).
Definition: PixelProperties.h:214
boost::endian::native_int16_t native_type
Pixel type (native endian).
Definition: PixelProperties.h:149
Map the given PixelPropertiesType and Endian enums to the corresponding endian-specific language type...
Definition: PixelProperties.h:383
std::complex< double > std_type
Pixel type (standard language type).
Definition: PixelProperties.h:361
static pixel_size_type pixel_significant_bit_size()
Get significant (maximum bits used) size of pixel type, in bits.
Definition: PixelProperties.h:326
Little endian.
Definition: Types.h:70
boost::endian::native_int8_t native_type
Pixel type (native endian).
Definition: PixelProperties.h:126
uint32_t std_type
Pixel type (standard language type).
Definition: PixelProperties.h:234
boost::endian::big_int32_t big_type
Pixel type (big endian).
Definition: PixelProperties.h:168
boost::endian::little_int32_t little_type
Pixel type (little endian).
Definition: PixelProperties.h:170
boost::endian::native_float64_t native_type
Pixel type (native endian).
Definition: PixelProperties.h:287
ome::common::boolean little_type
Pixel type (little endian).
Definition: PixelProperties.h:308
std::complex< boost::endian::big_float32_t > big_type
Pixel type (big endian).
Definition: PixelProperties.h:341
bool std_type
Pixel type (standard language type).
Definition: PixelProperties.h:303
pixel_size_type bitsPerPixel(::ome::xml::model::enums::PixelType pixeltype)
Get the size of a PixelType, in bits.
Definition: PixelProperties.cpp:85
boost::endian::big_float64_t big_type
Pixel type (big endian).
Definition: PixelProperties.h:283
boost::endian::native_uint16_t native_type
Pixel type (native endian).
Definition: PixelProperties.h:218
boost::endian::native_uint32_t native_type
Pixel type (native endian).
Definition: PixelProperties.h:241
int8_t std_type
Pixel type (standard language type).
Definition: PixelProperties.h:119