58 #include <pcl/Diagnostics.h>
109 using crop_mode = CropMode::value_type;
115 Crop(
double left = 0,
double top = 0,
double right = 0,
double bottom = 0 )
116 : m_margins( left, top, right, bottom )
117 , m_mode( CropMode::RelativeMargins )
125 template <
typename T>
128 , m_mode( CropMode::RelativeMargins )
155 template <
typename T>
167 m_margins =
Rect( left, top, right, bottom );
185 return m_mode == CropMode::RelativeMargins;
195 return !IsRelative();
231 m_fillValues = fillValues;
Image cropping/expansion algorithm
void Apply(pcl::DComplexImage &) const override
void GetNewSizes(int &width, int &height) const override
void SetMargins(int left, int top, int right, int bottom)
void SetMargins(const GenericRectangle< T > &r)
void Apply(pcl::UInt16Image &) const override
Crop(const GenericRectangle< T > &r)
Crop(double left=0, double top=0, double right=0, double bottom=0)
Crop(const Crop &)=default
void Apply(pcl::ComplexImage &) const override
const DVector & FillValues() const
void Apply(pcl::DImage &) const override
void Apply(pcl::UInt8Image &) const override
void SetMode(crop_mode mode)
void Apply(pcl::Image &) const override
void SetFillValues(const DVector &fillValues)
void Apply(pcl::UInt32Image &) const override
Implements a generic, two-dimensional, shared or local image.
A generic rectangle in the two-dimensional space.
Generic vector of arbitrary length.