47 #ifndef OME_COMMON_UNITS_LENGTH_H 48 #define OME_COMMON_UNITS_LENGTH_H 50 #include <ome/common/config.h> 51 #include <ome/common/units/types.h> 53 #include <boost/units/base_units/astronomical/astronomical_unit.hpp> 54 #include <boost/units/base_units/astronomical/light_year.hpp> 55 #include <boost/units/base_units/astronomical/parsec.hpp> 56 #include <boost/units/base_units/imperial/thou.hpp> 57 #include <boost/units/base_units/imperial/inch.hpp> 58 #include <boost/units/base_units/imperial/foot.hpp> 59 #include <boost/units/base_units/imperial/yard.hpp> 60 #include <boost/units/base_units/imperial/mile.hpp> 61 #include <boost/units/base_units/metric/micron.hpp> 62 #include <boost/units/base_units/metric/angstrom.hpp> 63 #include <boost/units/unit.hpp> 64 #include <boost/units/quantity.hpp> 65 #include <boost/units/systems/si.hpp> 82 typedef make_scaled_unit<si::length,scale<10,static_rational<-24>>>::type
yoctometre_unit;
84 typedef make_scaled_unit<si::length,scale<10,static_rational<-21>>>::type
zeptometre_unit;
86 typedef make_scaled_unit<si::length,scale<10,static_rational<-18>>>::type
attometre_unit;
88 typedef make_scaled_unit<si::length,scale<10,static_rational<-15>>>::type
femtometre_unit;
90 typedef make_scaled_unit<si::length,scale<10,static_rational<-12>>>::type
picometre_unit;
92 typedef make_scaled_unit<si::length,scale<10,static_rational< -9>>>::type
nanometre_unit;
94 typedef make_scaled_unit<si::length,scale<10,static_rational< -6>>>::type
micrometre_unit;
96 typedef make_scaled_unit<si::length,scale<10,static_rational< -3>>>::type
millimetre_unit;
98 typedef make_scaled_unit<si::length,scale<10,static_rational< -2>>>::type
centimetre_unit;
100 typedef make_scaled_unit<si::length,scale<10,static_rational< -1>>>::type
decimetre_unit;
102 typedef make_scaled_unit<si::length,scale<10,static_rational< 0>>>::type
metre_unit;
104 typedef make_scaled_unit<si::length,scale<10,static_rational< 1>>>::type
dekametre_unit;
106 typedef make_scaled_unit<si::length,scale<10,static_rational< 1>>>::type
decametre_unit;
108 typedef make_scaled_unit<si::length,scale<10,static_rational< 2>>>::type
hectometre_unit;
110 typedef make_scaled_unit<si::length,scale<10,static_rational< 3>>>::type
kilometre_unit;
112 typedef make_scaled_unit<si::length,scale<10,static_rational< 6>>>::type
megametre_unit;
114 typedef make_scaled_unit<si::length,scale<10,static_rational< 9>>>::type
gigametre_unit;
116 typedef make_scaled_unit<si::length,scale<10,static_rational< 12>>>::type
terametre_unit;
118 typedef make_scaled_unit<si::length,scale<10,static_rational< 15>>>::type
petametre_unit;
120 typedef make_scaled_unit<si::length,scale<10,static_rational< 18>>>::type
exametre_unit;
122 typedef make_scaled_unit<si::length,scale<10,static_rational< 21>>>::type
zettametre_unit;
124 typedef make_scaled_unit<si::length,scale<10,static_rational< 24>>>::type
yottametre_unit;
451 typedef boost::units::imperial::thou_base_unit::unit_type
thou_unit;
460 typedef scaled_base_unit<boost::units::imperial::inch_base_unit, scale<12, static_rational<-1>>>
line_base_unit;
471 typedef boost::units::imperial::inch_base_unit::unit_type
inch_unit;
480 typedef boost::units::imperial::foot_base_unit::unit_type
foot_unit;
489 typedef boost::units::imperial::yard_base_unit::unit_type
yard_unit;
498 typedef boost::units::imperial::mile_base_unit::unit_type
mile_unit;
525 typedef boost::units::astronomical::parsec_base_unit::unit_type
parsec_unit;
534 typedef scaled_base_unit<boost::units::imperial::inch_base_unit, scale<72, static_rational<-1>>>
point_base_unit;
546 boost::units::length_dimension, 1> { };
548 typedef boost::units::make_system<
551 typedef boost::units::unit<boost::units::length_dimension, pixel_system>
pixel_unit;
561 boost::units::length_dimension, 2> { };
563 typedef boost::units::make_system<
588 static std::string
name() {
return "line"; }
593 static std::string
symbol() {
return "li"; }
603 static std::string
name() {
return "point"; }
608 static std::string
symbol() {
return "pt"; }
612 template<>
struct base_unit_info<
ome::common::units::pixel_base_unit>
618 static std::string
name() {
return "pixel"; }
623 static std::string
symbol() {
return "px"; }
627 template<>
struct base_unit_info<
ome::common::units::reference_frame_base_unit>
633 static std::string
name() {
return "reference frame"; }
638 static std::string
symbol() {
return "r.f."; }
644 #endif // OME_COMMON_UNITS_LENGTH_H quantity< decimeter_unit > decimeter_quantity
Measured quantity in decimeters.
Definition: length.h:415
decametre_unit decameter_unit
Unit definition for decameter length.
Definition: length.h:151
BOOST_UNITS_STATIC_CONSTANT(radian, radian_unit)
Numeric constant for radian.
gigametre_unit gigameter_unit
Unit definition for gigameter length.
Definition: length.h:159
quantity< attometer_unit > attometer_quantity
Measured quantity in attometers.
Definition: length.h:401
quantity< decameter_unit > decameter_quantity
Measured quantity in decameters.
Definition: length.h:421
make_scaled_unit< si::length, scale< 10, static_rational< 2 > > >::type hectometre_unit
Unit definition for hectometre length.
Definition: length.h:108
boost::units::astronomical::parsec_base_unit::unit_type parsec_unit
Unit definition for parsec length.
Definition: length.h:525
quantity< terameter_unit > terameter_quantity
Measured quantity in terameters.
Definition: length.h:431
make_scaled_unit< si::length, scale< 10, static_rational< 0 > > >::type metre_unit
Unit definition for metre length.
Definition: length.h:102
quantity< point_unit > point_quantity
Measured quantity in points.
Definition: length.h:542
quantity< hectometre_unit > hectometre_quantity
Measured quantity in hectometres.
Definition: length.h:378
make_scaled_unit< si::length, scale< 10, static_rational< -1 > > >::type decimetre_unit
Unit definition for decimetre length.
Definition: length.h:100
static std::string name()
Unit name.
Definition: length.h:633
yottametre_unit yottameter_unit
Unit definition for yottameter length.
Definition: length.h:169
static std::string symbol()
Unit symbol.
Definition: length.h:638
quantity< pixel_unit > pixel_quantity
Measured quantity in pixels.
Definition: length.h:557
centimetre_unit centimeter_unit
Unit definition for centimeter length.
Definition: length.h:143
Base unit for pixel length.
Definition: length.h:545
quantity< yoctometer_unit > yoctometer_quantity
Measured quantity in yoctometers.
Definition: length.h:397
quantity< zettametre_unit > zettametre_quantity
Measured quantity in zettametres.
Definition: length.h:392
dekametre_unit dekameter_unit
Unit definition for dekameter length.
Definition: length.h:149
Base unit for reference frame.
Definition: length.h:560
quantity< angstrom_unit > angstrom_quantity
Measured quantity in angstroms.
Definition: length.h:448
millimetre_unit millimeter_unit
Unit definition for millimeter length.
Definition: length.h:141
quantity< kilometer_unit > kilometer_quantity
Measured quantity in kilometers.
Definition: length.h:425
quantity< picometer_unit > picometer_quantity
Measured quantity in picometers.
Definition: length.h:405
boost::units::imperial::mile_base_unit::unit_type mile_unit
Unit definition for mile length.
Definition: length.h:498
femtometre_unit femtometer_unit
Unit definition for femtometer length.
Definition: length.h:133
quantity< decimetre_unit > decimetre_quantity
Measured quantity in decimetres.
Definition: length.h:370
quantity< petametre_unit > petametre_quantity
Measured quantity in petametres.
Definition: length.h:388
quantity< exameter_unit > exameter_quantity
Measured quantity in exameters.
Definition: length.h:435
make_scaled_unit< si::length, scale< 10, static_rational< 1 > > >::type dekametre_unit
Unit definition for dekametre length.
Definition: length.h:104
boost::units::imperial::yard_base_unit::unit_type yard_unit
Unit definition for yard length.
Definition: length.h:489
boost::units::unit< boost::units::length_dimension, pixel_system > pixel_unit
Unit definition for pixel length (undefined length, not convertible to other length units)...
Definition: length.h:551
quantity< exametre_unit > exametre_quantity
Measured quantity in exametres.
Definition: length.h:390
quantity< astronomical_unit_unit > astronomical_unit_quantity
Measured quantity in astronomical_unit.
Definition: length.h:513
boost::units::metric::angstrom_base_unit::unit_type angstrom_unit
Unit definition for angstrom length.
Definition: length.h:442
quantity< hectometer_unit > hectometer_quantity
Measured quantity in hectometers.
Definition: length.h:423
quantity< terametre_unit > terametre_quantity
Measured quantity in terametres.
Definition: length.h:386
decimetre_unit decimeter_unit
Unit definition for decimeter length.
Definition: length.h:145
micrometre_unit micrometer_unit
Unit definition for micrometer length.
Definition: length.h:139
make_scaled_unit< si::length, scale< 10, static_rational<-21 > > >::type zeptometre_unit
Unit definition for zeptometre length.
Definition: length.h:84
quantity< kilometre_unit > kilometre_quantity
Measured quantity in kilometres.
Definition: length.h:380
attometre_unit attometer_unit
Unit definition for attometer length.
Definition: length.h:131
quantity< yottameter_unit > yottameter_quantity
Measured quantity in yottameters.
Definition: length.h:439
point_base_unit::unit_type point_unit
Unit definition for point length.
Definition: length.h:536
static std::string symbol()
Unit symbol.
Definition: length.h:623
make_scaled_unit< si::length, scale< 10, static_rational<-12 > > >::type picometre_unit
Unit definition for picometre length.
Definition: length.h:90
quantity< femtometer_unit > femtometer_quantity
Measured quantity in femtometers.
Definition: length.h:403
petametre_unit petameter_unit
Unit definition for petameter length.
Definition: length.h:163
make_scaled_unit< si::length, scale< 10, static_rational< -3 > > >::type millimetre_unit
Unit definition for millimetre length.
Definition: length.h:96
quantity< petameter_unit > petameter_quantity
Measured quantity in petameters.
Definition: length.h:433
make_scaled_unit< si::length, scale< 10, static_rational< 6 > > >::type megametre_unit
Unit definition for megametre length.
Definition: length.h:112
scaled_base_unit< boost::units::imperial::inch_base_unit, scale< 72, static_rational<-1 > > > point_base_unit
Base unit definition for point length.
Definition: length.h:534
boost::units::imperial::inch_base_unit::unit_type inch_unit
Unit definition for inch length.
Definition: length.h:471
Open Microscopy Environment C++.
Definition: base64.h:48
quantity< gigameter_unit > gigameter_quantity
Measured quantity in gigameters.
Definition: length.h:429
quantity< decametre_unit > decametre_quantity
Measured quantity in decametres.
Definition: length.h:376
quantity< attometre_unit > attometre_quantity
Measured quantity in attometres.
Definition: length.h:356
megametre_unit megameter_unit
Unit definition for megameter length.
Definition: length.h:157
quantity< megameter_unit > megameter_quantity
Measured quantity in megameters.
Definition: length.h:427
quantity< si::length > length_quantity
Measured quantity (length, metres).
Definition: length.h:79
boost::units::unit< boost::units::length_dimension, reference_frame_system > reference_frame_unit
Unit definition for reference frame unit length (undefined unit length, not convertible to other leng...
Definition: length.h:566
boost::units::make_system< pixel_base_unit >::type pixel_system
Unit system for pixel length.
Definition: length.h:549
kilometre_unit kilometer_unit
Unit definition for kilometer length.
Definition: length.h:155
quantity< megametre_unit > megametre_quantity
Measured quantity in megametres.
Definition: length.h:382
si::length length_unit
Unit definition for length.
Definition: length.h:77
static std::string symbol()
Unit symbol.
Definition: length.h:608
quantity< yoctometre_unit > yoctometre_quantity
Measured quantity in yoctometres.
Definition: length.h:352
make_scaled_unit< si::length, scale< 10, static_rational< -6 > > >::type micrometre_unit
Unit definition for micrometre length.
Definition: length.h:94
nanometre_unit nanometer_unit
Unit definition for nanometer length.
Definition: length.h:137
static std::string symbol()
Unit symbol.
Definition: length.h:593
static std::string name()
Unit name.
Definition: length.h:618
boost::units::imperial::thou_base_unit::unit_type thou_unit
Unit definition for thou length.
Definition: length.h:451
quantity< femtometre_unit > femtometre_quantity
Measured quantity in femtometres.
Definition: length.h:358
quantity< inch_unit > inch_quantity
Measured quantity in inches.
Definition: length.h:477
quantity< picometre_unit > picometre_quantity
Measured quantity in picometres.
Definition: length.h:360
terametre_unit terameter_unit
Unit definition for terameter length.
Definition: length.h:161
quantity< micrometre_unit > micrometre_quantity
Measured quantity in micrometres.
Definition: length.h:364
quantity< centimeter_unit > centimeter_quantity
Measured quantity in centimeters.
Definition: length.h:413
boost::units::astronomical::astronomical_unit_base_unit::unit_type astronomical_unit_unit
Unit definition for astronomical unit length.
Definition: length.h:507
quantity< millimetre_unit > millimetre_quantity
Measured quantity in millimetres.
Definition: length.h:366
make_scaled_unit< si::length, scale< 10, static_rational< 3 > > >::type kilometre_unit
Unit definition for kilometre length.
Definition: length.h:110
zettametre_unit zettameter_unit
Unit definition for zettameter length.
Definition: length.h:167
make_scaled_unit< si::length, scale< 10, static_rational<-18 > > >::type attometre_unit
Unit definition for attometre length.
Definition: length.h:86
quantity< micrometer_unit > micrometer_quantity
Measured quantity in micrometers.
Definition: length.h:409
static std::string name()
Unit name.
Definition: length.h:588
quantity< light_year_unit > light_year_quantity
Measured quantity in light years.
Definition: length.h:522
quantity< mile_unit > mile_quantity
Measured quantity in miles.
Definition: length.h:504
make_scaled_unit< si::length, scale< 10, static_rational< 12 > > >::type terametre_unit
Unit definition for terametre length.
Definition: length.h:116
quantity< nanometre_unit > nanometre_quantity
Measured quantity in nanometres.
Definition: length.h:362
make_scaled_unit< si::length, scale< 10, static_rational< 21 > > >::type zettametre_unit
Unit definition for zettametre length.
Definition: length.h:122
line_base_unit::unit_type line_unit
Unit definition for line length (defined as 1/12 inch, used in botany).
Definition: length.h:462
boost::units::make_system< reference_frame_base_unit >::type reference_frame_system
Unit system for reference frame length.
Definition: length.h:564
quantity< dekametre_unit > dekametre_quantity
Measured quantity in dekametres.
Definition: length.h:374
quantity< yottametre_unit > yottametre_quantity
Measured quantity in yottametres.
Definition: length.h:394
metre_unit meter_unit
Unit definition for meter length.
Definition: length.h:147
quantity< line_unit > line_quantity
Measured quantity in lines.
Definition: length.h:468
boost::units::astronomical::light_year_base_unit::unit_type light_year_unit
Unit definition for light year length.
Definition: length.h:516
make_scaled_unit< si::length, scale< 10, static_rational< -2 > > >::type centimetre_unit
Unit definition for centimetre length.
Definition: length.h:98
static std::string name()
Unit name.
Definition: length.h:603
quantity< dekameter_unit > dekameter_quantity
Measured quantity in dekameters.
Definition: length.h:419
zeptometre_unit zeptometer_unit
Unit definition for zeptometer length.
Definition: length.h:129
make_scaled_unit< si::length, scale< 10, static_rational< 9 > > >::type gigametre_unit
Unit definition for gigametre length.
Definition: length.h:114
picometre_unit picometer_unit
Unit definition for picometer length.
Definition: length.h:135
make_scaled_unit< si::length, scale< 10, static_rational<-24 > > >::type yoctometre_unit
Unit definition for yoctometre length.
Definition: length.h:82
quantity< parsec_unit > parsec_quantity
Measured quantity in parsecs.
Definition: length.h:531
make_scaled_unit< si::length, scale< 10, static_rational< 1 > > >::type decametre_unit
Unit definition for decametre length.
Definition: length.h:106
quantity< reference_frame_unit > reference_frame_quantity
Measured quantity in reference frame units.
Definition: length.h:570
yoctometre_unit yoctometer_unit
Unit definition for yoctometer length.
Definition: length.h:127
make_scaled_unit< si::length, scale< 10, static_rational< 24 > > >::type yottametre_unit
Unit definition for yottametre length.
Definition: length.h:124
scaled_base_unit< boost::units::imperial::inch_base_unit, scale< 12, static_rational<-1 > > > line_base_unit
Base unit definition for line length (defined as 1/12 inch, used in botany).
Definition: length.h:460
make_scaled_unit< si::length, scale< 10, static_rational< 15 > > >::type petametre_unit
Unit definition for petametre length.
Definition: length.h:118
boost::units::imperial::foot_base_unit::unit_type foot_unit
Unit definition for foot length.
Definition: length.h:480
quantity< zettameter_unit > zettameter_quantity
Measured quantity in zettameters.
Definition: length.h:437
quantity< yard_unit > yard_quantity
Measured quantity in yards.
Definition: length.h:495
hectometre_unit hectometer_unit
Unit definition for hectometer length.
Definition: length.h:153
quantity< centimetre_unit > centimetre_quantity
Measured quantity in centimetres.
Definition: length.h:368
quantity< meter_unit > meter_quantity
Measured quantity in meters.
Definition: length.h:417
quantity< foot_unit > foot_quantity
Measured quantity in feet.
Definition: length.h:486
quantity< nanometer_unit > nanometer_quantity
Measured quantity in nanometers.
Definition: length.h:407
quantity< metre_unit > metre_quantity
Measured quantity in metres.
Definition: length.h:372
quantity< millimeter_unit > millimeter_quantity
Measured quantity in millimeters.
Definition: length.h:411
quantity< thou_unit > thou_quantity
Measured quantity in thous.
Definition: length.h:457
make_scaled_unit< si::length, scale< 10, static_rational<-15 > > >::type femtometre_unit
Unit definition for femtometre length.
Definition: length.h:88
quantity< zeptometre_unit > zeptometre_quantity
Measured quantity in zeptometres.
Definition: length.h:354
make_scaled_unit< si::length, scale< 10, static_rational< 18 > > >::type exametre_unit
Unit definition for exametre length.
Definition: length.h:120
quantity< gigametre_unit > gigametre_quantity
Measured quantity in gigametres.
Definition: length.h:384
exametre_unit exameter_unit
Unit definition for exameter length.
Definition: length.h:165
quantity< zeptometer_unit > zeptometer_quantity
Measured quantity in zeptometers.
Definition: length.h:399
make_scaled_unit< si::length, scale< 10, static_rational< -9 > > >::type nanometre_unit
Unit definition for nanometre length.
Definition: length.h:92