66 template<
typename T,
int D>
79 template <
typename MatrixDerived>
107 template <
typename MatrixDerived>
116 explicit Size(
const cv::Size_<T> size) :
117 BaseType(size.width, size.height) {}
145 template<
typename Reflector>
148 reflector.property(
"Width", this->x(),
"The width");
149 reflector.property(
"Height", this->y(),
"The height");
165 operator cv::Size_<T>()
const 167 return cv::Size_<T>(this->x(), this->y());
173 (*this)[0] = other.width;
174 (*this)[1] = other.height;
204 template <
typename MatrixDerived>
209 Size(T width, T height, T depth) :
249 template<
typename Reflector>
252 reflector.property(
"Width", this->x(),
"The width");
253 reflector.property(
"Height", this->y(),
"The height");
254 reflector.property(
"Depth", this->z(),
"The depth");
266 return PointType(this->x(), this->y(), this->z());
void reflect(Reflector &reflector)
Definition: Size.h:146
T height() const
return the height
Definition: Size.h:131
Size(T width, T height)
a constructor with width and height for the 2D case
Definition: Size.h:112
General point class template.
Definition: Point.h:133
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:171
Point< T, 3 > PointType
Definition: Size.h:193
Size< int, 2 > Size2i
The size type for 2D objects in integer precision.
Definition: Size.h:275
Class for 2D, 3D and N-dimensional points.
Size(const cv::Size_< T > size)
a copy constructor
Definition: Size.h:116
Size< double, 2 > Size2d
The size type for 2D objects in 64 bit floating point precision.
Definition: Size.h:281
Eigen::Matrix< T, 3, 1 > BaseType
Definition: Size.h:192
Specialization of Point for 2 dimensions with specialized constructors and converters.
Definition: Point.h:167
Specialization of Point for 3 dimensions with specialized constructors and converters.
Definition: Point.h:239
T & width()
return the width
Definition: Size.h:136
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:209
Size< float, 3 > Size3f
The size type for 3D objects in floating point precision.
Definition: Size.h:287
T & depth()
return the depth
Definition: Size.h:244
Size< int, 3 > Size3i
The size type for 3D objects in integer precision.
Definition: Size.h:284
T depth() const
return the depth
Definition: Size.h:229
Eigen::Matrix< T, 2, 1 > BaseType
Definition: Size.h:95
Size()
the default constructor
Definition: Size.h:75
Size()
the default constructor
Definition: Size.h:200
Size(const Eigen::MatrixBase< MatrixDerived > &matrix)
a constructor to initialize width and height with a Eigen-matrix of correct dimension ...
Definition: Size.h:108
T & width()
return the width
Definition: Size.h:234
Point< T, 2 > PointType
Definition: Size.h:96
T & height()
return the height
Definition: Size.h:141
Size()
the default constructor
Definition: Size.h:103
Size(const Eigen::MatrixBase< MatrixDerived > &matrix)
a constructor to initialize width and height with a Eigen-matrix of correct dimension ...
Definition: Size.h:205
T & height()
return the height
Definition: Size.h:239
void reflect(Reflector &reflector)
the serialization definition
Definition: Size.h:250
Size(const Eigen::MatrixBase< MatrixDerived > &matrix)
a constructor to initialize width and height with a Eigen-matrix of correct dimension ...
Definition: Size.h:80
Size< double, 3 > Size3d
The size type for 3D objects in 64 bit floating point precision.
Definition: Size.h:290
T width() const
return the width
Definition: Size.h:219
Size class for defining sizes with different data types.
Definition: Size.h:67
Point< T, D > PointType
Definition: Size.h:71
Eigen::Matrix< T, D, 1 > BaseType
Definition: Size.h:70
Size< float, 2 > Size2f
The size type for 2D objects in floating point precision.
Definition: Size.h:278
T height() const
return the height
Definition: Size.h:224
T width() const
return the width
Definition: Size.h:126