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> 142 if (l1 > r2 || l2 > r1)
151 if (t1 > b2 || t2 > b1)
189 if (l1 == l2 && r1 == r2 &&
190 (t1 == b2 || t2 == b1))
196 else if (t1 == t2 && b1 == b2 &&
197 (l1 == r2 || l2 == r1))
213 template<
class charT,
class traits>
214 inline std::basic_ostream<charT,traits>&
215 operator<< (std::basic_ostream<charT,traits>& os,
218 return os <<
"x=" << region.
x 221 <<
" h=" << region.h;
227 #endif // OME_FILES_PLANEREGION_H bool valid() const
Is the region valid?
Definition: PlaneRegion.h:87
std::size_t dimension_size_type
Size type for image dimensions.
Definition: Types.h:59
dimension_size_type w
The width of the region.
Definition: PlaneRegion.h:63
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:99
dimension_size_type x
The X coordinate of the upper-left corner of the region.
Definition: PlaneRegion.h:59
dimension_size_type y
The Y coordinate of the upper-left corner of the region.
Definition: PlaneRegion.h:61
dimension_size_type h
The height of the region.
Definition: PlaneRegion.h:65
PlaneRegion()
Default construct.
Definition: PlaneRegion.h:73
dimension_size_type area() const
Get area.
Definition: PlaneRegion.h:115
PlaneRegion operator&(const PlaneRegion &a, const PlaneRegion &b)
Intersect two regions.
Definition: PlaneRegion.h:133
PlaneRegion operator|(const PlaneRegion &a, const PlaneRegion &b)
Combine (union) two regions.
Definition: PlaneRegion.h:174
A rectangular region.
Definition: PlaneRegion.h:56