38 #ifndef OME_FILES_PLANEREGION_H 39 #define OME_FILES_PLANEREGION_H 41 #include <ome/files/Types.h> 43 #include <ome/xml/model/enums/PixelType.h> 46 #pragma push_macro("min") 48 #pragma push_macro("max") 149 if (l1 > r2 || l2 > r1)
158 if (t1 > b2 || t2 > b1)
196 if (l1 == l2 && r1 == r2 &&
197 (t1 == b2 || t2 == b1))
203 else if (t1 == t2 && b1 == b2 &&
204 (l1 == r2 || l2 == r1))
220 template<
class charT,
class traits>
221 inline std::basic_ostream<charT,traits>&
222 operator<< (std::basic_ostream<charT,traits>& os,
225 return os <<
"x=" << region.
x 228 <<
" h=" << region.h;
235 #pragma pop_macro("min") 236 #pragma pop_macro("max") 239 #endif // OME_FILES_PLANEREGION_H std::size_t dimension_size_type
Size type for image dimensions.
Definition: Types.h:58
dimension_size_type w
The width of the region.
Definition: PlaneRegion.h:70
PlaneRegion(dimension_size_type x, dimension_size_type y, dimension_size_type w, dimension_size_type h)
Construct from coordinates, width and height.
Definition: PlaneRegion.h:106
PlaneRegion operator &(const PlaneRegion &a, const PlaneRegion &b)
Intersect two regions.
Definition: PlaneRegion.h:140
dimension_size_type x
The X coordinate of the upper-left corner of the region.
Definition: PlaneRegion.h:66
bool valid() const
Is the region valid?
Definition: PlaneRegion.h:94
dimension_size_type area() const
Get area.
Definition: PlaneRegion.h:122
Open Microscopy Environment C++.
dimension_size_type y
The Y coordinate of the upper-left corner of the region.
Definition: PlaneRegion.h:68
dimension_size_type h
The height of the region.
Definition: PlaneRegion.h:72
PlaneRegion()
Default construct.
Definition: PlaneRegion.h:80
PlaneRegion operator|(const PlaneRegion &a, const PlaneRegion &b)
Combine (union) two regions.
Definition: PlaneRegion.h:181
A rectangular region.
Definition: PlaneRegion.h:63