49 MaskMap(std::size_t width, std::size_t height);
54 resize(std::size_t width, std::size_t height);
71 return (data_.data());
74 inline const unsigned char*
77 return (data_.data());
85 set(
const std::size_t x,
const std::size_t y)
87 data_[y * width_ + x] = 255;
91 unset(
const std::size_t x,
const std::size_t y)
93 data_[y * width_ + x] = 0;
97 isSet(
const std::size_t x,
const std::size_t y)
const
99 return (data_[y * width_ + x] != 0);
105 data_.assign(data_.size(), 0);
108 inline unsigned char&
111 return (data_[y * width_ + x]);
114 inline const unsigned char&
117 return (data_[y * width_ + x]);
124 std::vector<unsigned char> data_;
125 std::size_t width_ = 0;
126 std::size_t height_ = 0;
std::size_t getWidth() const
void set(const std::size_t x, const std::size_t y)
virtual ~MaskMap()=default
bool isSet(const std::size_t x, const std::size_t y) const
unsigned char * getData()
void resize(std::size_t width, std::size_t height)
std::size_t getHeight() const
MaskMap(std::size_t width, std::size_t height)
void erode(MaskMap &eroded_mask) const
const unsigned char * getData() const
static PCL_NODISCARD MaskMap getDifferenceMask(const MaskMap &mask0, const MaskMap &mask1)
unsigned char & operator()(const std::size_t x, const std::size_t y)
void unset(const std::size_t x, const std::size_t y)
const unsigned char & operator()(const std::size_t x, const std::size_t y) const
Defines all the PCL and non-PCL macros used.