68 template<
typename T,
int D>
81 template <
typename MatrixDerived>
109 template <
typename MatrixDerived>
118 explicit Size(
const cv::Size_<T> size) :
119 BaseType(size.width, size.height) {}
147 template<
typename Reflector>
150 reflector.property(
"Width", this->x(),
"The width");
151 reflector.property(
"Height", this->y(),
"The height");
167 operator cv::Size_<T>()
const 169 return cv::Size_<T>(this->x(), this->y());
175 (*this)[0] = other.width;
176 (*this)[1] = other.height;
206 template <
typename MatrixDerived>
211 Size(T width, T height, T depth) :
251 template<
typename Reflector>
254 reflector.property(
"Width", this->x(),
"The width");
255 reflector.property(
"Height", this->y(),
"The height");
256 reflector.property(
"Depth", this->z(),
"The depth");
268 return PointType(this->x(), this->y(), this->z());
void reflect(Reflector &reflector)
Definition: Size.h:148
T height() const
return the height
Definition: Size.h:133
Size(T width, T height)
a constructor with width and height for the 2D case
Definition: Size.h:114
General point class template.
Definition: Point.h:135
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
Size & operator=(const cv::Size_< T > &other)
converts from cv size
Definition: Size.h:173
Point< T, 3 > PointType
Definition: Size.h:195
Size< int, 2 > Size2i
The size type for 2D objects in integer precision.
Definition: Size.h:277
Class for 2D, 3D and N-dimensional points.
Size(const cv::Size_< T > size)
a copy constructor
Definition: Size.h:118
Size< double, 2 > Size2d
The size type for 2D objects in 64 bit floating point precision.
Definition: Size.h:283
Eigen::Matrix< T, 3, 1 > BaseType
Definition: Size.h:194
Specialization of Point for 2 dimensions with specialized constructors and converters.
Definition: Point.h:169
Specialization of Point for 3 dimensions with specialized constructors and converters.
Definition: Point.h:252
T & width()
return the width
Definition: Size.h:138
Size(T width, T height, T depth)
a constructor to initialize the size with width, height, and depth in the 3D case ...
Definition: Size.h:211
Size< float, 3 > Size3f
The size type for 3D objects in floating point precision.
Definition: Size.h:289
T & depth()
return the depth
Definition: Size.h:246
Size< int, 3 > Size3i
The size type for 3D objects in integer precision.
Definition: Size.h:286
T depth() const
return the depth
Definition: Size.h:231
By default, IsCheapToCopy<T>::value evaluates to true for fundamental types T, false for all other ty...
Definition: IsCheapToCopy.h:63
Eigen::Matrix< T, 2, 1 > BaseType
Definition: Size.h:97
Size()
the default constructor
Definition: Size.h:77
Size()
the default constructor
Definition: Size.h:202
Type trait to define if a class is cheap to copy.
Size(const Eigen::MatrixBase< MatrixDerived > &matrix)
a constructor to initialize width and height with a Eigen-matrix of correct dimension ...
Definition: Size.h:110
T & width()
return the width
Definition: Size.h:236
Point< T, 2 > PointType
Definition: Size.h:98
T & height()
return the height
Definition: Size.h:143
Size()
the default constructor
Definition: Size.h:105
Size(const Eigen::MatrixBase< MatrixDerived > &matrix)
a constructor to initialize width and height with a Eigen-matrix of correct dimension ...
Definition: Size.h:207
T & height()
return the height
Definition: Size.h:241
void reflect(Reflector &reflector)
the serialization definition
Definition: Size.h:252
Size(const Eigen::MatrixBase< MatrixDerived > &matrix)
a constructor to initialize width and height with a Eigen-matrix of correct dimension ...
Definition: Size.h:82
Size< double, 3 > Size3d
The size type for 3D objects in 64 bit floating point precision.
Definition: Size.h:292
T width() const
return the width
Definition: Size.h:221
Size class for defining sizes with different data types.
Definition: Size.h:69
Point< T, D > PointType
Definition: Size.h:73
Eigen::Matrix< T, D, 1 > BaseType
Definition: Size.h:72
Size< float, 2 > Size2f
The size type for 2D objects in floating point precision.
Definition: Size.h:280
T height() const
return the height
Definition: Size.h:226
T width() const
return the width
Definition: Size.h:128