42 #include <pcl/recognition/region_xy.h>
124 const int num_of_features =
static_cast<int> (
features.size ());
125 write (stream, num_of_features);
126 for (
int feature_index = 0; feature_index < num_of_features; ++feature_index)
128 features[feature_index].serialize (stream);
142 read (stream, num_of_features);
144 for (
int feature_index = 0; feature_index < num_of_features; ++feature_index)
146 features[feature_index].deserialize (stream);
void read(std::istream &stream, Type &value)
Function for reading data from a stream.
void write(std::ostream &stream, Type value)
Function for writing data to a stream.
Feature that defines a position and quantized value in a specific modality.
void deserialize(std::istream &stream)
Deserializes the object from the specified stream.
QuantizedMultiModFeature()=default
Constructor.
std::size_t modality_index
the index of the corresponding modality.
void serialize(std::ostream &stream) const
Serializes the object to the specified stream.
unsigned char quantized_value
the quantized value attached to the feature.
bool compareForEquality(const QuantizedMultiModFeature &base) const
Compares whether two features are the same.
Defines a region in XY-space.
void deserialize(::std::istream &stream)
Deserializes the object from the specified stream.
void serialize(std::ostream &stream) const
Serializes the object to the specified stream.
A multi-modality template constructed from a set of quantized multi-modality features.
RegionXY region
The region assigned to the template.
void deserialize(std::istream &stream)
Deserializes the object from the specified stream.
void serialize(std::ostream &stream) const
Serializes the object to the specified stream.
SparseQuantizedMultiModTemplate()=default
Constructor.
std::vector< QuantizedMultiModFeature > features
The storage for the multi-modality features.