Point Cloud Library (PCL)
1.11.1-dev
|
48 template <
class DATA_TYPE, std::
size_t NUM_OF_CHANNELS>
63 resize(std::size_t width, std::size_t height)
65 data_.resize(NUM_OF_CHANNELS * width * height);
85 operator()(
const std::size_t col_index,
const std::size_t row_index)
87 return &(data_[NUM_OF_CHANNELS * (row_index * width_ + col_index)]);
95 inline const DATA_TYPE*
96 operator()(
const std::size_t col_index,
const std::size_t row_index)
const
98 return &(data_[NUM_OF_CHANNELS * (row_index * width_ + col_index)]);
109 const std::size_t row_index,
110 const std::size_t channel)
112 return data_[NUM_OF_CHANNELS * (row_index * width_ + col_index) + channel];
121 inline const DATA_TYPE&
123 const std::size_t row_index,
124 const std::size_t channel)
const
126 return data_[NUM_OF_CHANNELS * (row_index * width_ + col_index) + channel];
131 std::vector<DATA_TYPE> data_;
139 template <
class DATA_TYPE, std::
size_t NUM_OF_CHANNELS>
154 addData(
const std::size_t width,
const std::size_t height)
158 data->
resize(width, height);
160 data_set_.push_back(data);
167 for (std::size_t data_set_index = 0; data_set_index < data_set_.size();
169 delete data_set_[data_set_index];
188 const std::size_t col,
189 const std::size_t row)
191 return (*data_set_[data_set_id])(col, row);
200 inline const DATA_TYPE*
202 const std::size_t col,
203 const std::size_t row)
const
205 return (*data_set_[data_set_id])(col, row);
217 const std::size_t col,
218 const std::size_t row,
219 const std::size_t channel)
221 return (*data_set_[data_set_id])(col, row, channel);
231 inline const DATA_TYPE&
233 const std::size_t col,
234 const std::size_t row,
235 const std::size_t channel)
const
237 return (*data_set_[data_set_id])(col, row, channel);
242 std::vector<MultiChannel2DData<DATA_TYPE, NUM_OF_CHANNELS>*> data_set_;
DATA_TYPE & operator()(const std::size_t data_set_id, const std::size_t col, const std::size_t row, const std::size_t channel)
Returns a reference to the specified data block at the specified location.
const DATA_TYPE & operator()(const std::size_t col_index, const std::size_t row_index, const std::size_t channel) const
Returns a reference to the internal data at the specified location.
void releaseDataSet()
Releases the data stored in the data set.
DATA_TYPE * operator()(const std::size_t col_index, const std::size_t row_index)
Returns a pointer to the internal data at the specified location.
const DATA_TYPE * operator()(const std::size_t data_set_id, const std::size_t col, const std::size_t row) const
Returns a pointer to the specified data block at the specified location.
MultiChannel2DData()
Constructor.
void resize(std::size_t width, std::size_t height)
Resizes the internal data storage.
void addData(const std::size_t width, const std::size_t height)
Adds a new two-dimensional data block to the data set.
void clear()
Releases the data stored in the data set.
virtual ~MultiChannel2DDataSet()
Destructor.
void clear()
Clears the internal data storage and sets width and height to 0.
DATA_TYPE * operator()(const std::size_t data_set_id, const std::size_t col, const std::size_t row)
Returns a pointer to the specified data block at the specified location.
virtual ~MultiChannel2DData()
Destructor.
Holds a set of two-dimensional multi-channel data.
const DATA_TYPE & operator()(const std::size_t data_set_id, const std::size_t col, const std::size_t row, const std::size_t channel) const
Returns a reference to the specified data block at the specified location.
const DATA_TYPE * operator()(const std::size_t col_index, const std::size_t row_index) const
Returns a pointer to the internal data at the specified location.
Holds two-dimensional multi-channel data.
DATA_TYPE & operator()(const std::size_t col_index, const std::size_t row_index, const std::size_t channel)
Returns a reference to the internal data at the specified location.
MultiChannel2DDataSet()
Constructor.