![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <ecvPointCloud.h>


Public Types | |
| using | Shared = QSharedPointer< Grid > |
| Shared type. More... | |
Public Types inherited from ccSerializableObject | |
| enum | DeserializationFlags { DF_POINT_COORDS_64_BITS , DF_SCALAR_VAL_32_BITS = 2 } |
| Deserialization flags (bit-field) More... | |
| typedef QMultiMap< unsigned, unsigned > | LoadedIDMap |
| Map of loaded unique IDs (old ID --> new ID) More... | |
Public Member Functions | |
| Grid () | |
| Default constructor. More... | |
| Grid (const Grid &grid)=default | |
| Copy constructor. More... | |
| bool | init (unsigned rowCount, unsigned colCount, bool withRGB=false) |
| Inits the grid. More... | |
| void | setIndex (unsigned row, unsigned col, int index) |
| Sets an index at a given position inside the grid. More... | |
| void | setColor (unsigned row, unsigned col, const ecvColor::Rgb &rgb) |
| Sets a color at a given position inside the grid. More... | |
| void | updateMinAndMaxValidIndexes () |
| Updates the min and max valid indexes. More... | |
| QImage | toImage () const |
| Converts the grid to an RGB image (needs colors) More... | |
| bool | isSerializable () const override |
| Returns whether object is serializable of not. More... | |
| bool | toFile (QFile &out, short dataVersion) const override |
| Saves data to binary stream. More... | |
| bool | fromFile (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override |
| Loads data from binary stream. More... | |
| short | minimumFileVersion () const override |
| Returns the minimum file version required to save this instance. More... | |
Public Member Functions inherited from ccSerializableObject | |
| virtual | ~ccSerializableObject ()=default |
| Destructor. More... | |
Public Attributes | |
| unsigned | w |
| Grid width. More... | |
| unsigned | h |
| Grid height. More... | |
| unsigned | validCount |
| Number of valid indexes. More... | |
| unsigned | minValidIndex |
| Minimum valid index. More... | |
| unsigned | maxValidIndex |
| Maximum valid index. More... | |
| std::vector< int > | indexes |
| Grid indexes (size: w x h) More... | |
| std::vector< ecvColor::Rgb > | colors |
| Grid colors (size: w x h, or 0 = no color) More... | |
| ccGLMatrixd | sensorPosition |
| Sensor position (expressed relatively to the cloud points) More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from ccSerializableObject | |
| static bool | WriteError () |
| Sends a custom error message (write error) and returns 'false'. More... | |
| static bool | ReadError () |
| Sends a custom error message (read error) and returns 'false'. More... | |
| static bool | MemoryError () |
| Sends a custom error message (not enough memory) and returns 'false'. More... | |
| static bool | CorruptError () |
| Sends a custom error message (corrupted file) and returns 'false'. More... | |
Grid structure.
Definition at line 383 of file ecvPointCloud.h.
| using ccPointCloud::Grid::Shared = QSharedPointer<Grid> |
Shared type.
Definition at line 385 of file ecvPointCloud.h.
| ccPointCloud::Grid::Grid | ( | ) |
Default constructor.
|
default |
Copy constructor.
|
overridevirtual |
Loads data from binary stream.
| in | input file (already opened) |
| dataVersion | file version (for version-specific deserialization) |
| flags | deserialization flags (see ccSerializableObject::DeserializationFlags) |
| oldToNewIDMap | map to link old IDs with new IDs |
Note: When implementing, use dataVersion checks to handle differentversions:
Reimplemented from ccSerializableObject.
| bool ccPointCloud::Grid::init | ( | unsigned | rowCount, |
| unsigned | colCount, | ||
| bool | withRGB = false |
||
| ) |
Inits the grid.
|
inlineoverridevirtual |
Returns whether object is serializable of not.
Reimplemented from ccSerializableObject.
Definition at line 411 of file ecvPointCloud.h.
|
overridevirtual |
Returns the minimum file version required to save this instance.
To be overridden by subclasses to indicate their minimum required version. This enables the system to determine:
Implements ccSerializableObject.
| void ccPointCloud::Grid::setColor | ( | unsigned | row, |
| unsigned | col, | ||
| const ecvColor::Rgb & | rgb | ||
| ) |
Sets a color at a given position inside the grid.
| void ccPointCloud::Grid::setIndex | ( | unsigned | row, |
| unsigned | col, | ||
| int | index | ||
| ) |
Sets an index at a given position inside the grid.
|
overridevirtual |
Saves data to binary stream.
| out | output file (already opened) |
| dataVersion | target file version (for forward/backward compatibility) |
Reimplemented from ccSerializableObject.
| QImage ccPointCloud::Grid::toImage | ( | ) | const |
Converts the grid to an RGB image (needs colors)
| void ccPointCloud::Grid::updateMinAndMaxValidIndexes | ( | ) |
Updates the min and max valid indexes.
| std::vector<ecvColor::Rgb> ccPointCloud::Grid::colors |
Grid colors (size: w x h, or 0 = no color)
Definition at line 434 of file ecvPointCloud.h.
| unsigned ccPointCloud::Grid::h |
Grid height.
Definition at line 422 of file ecvPointCloud.h.
| std::vector<int> ccPointCloud::Grid::indexes |
Grid indexes (size: w x h)
Definition at line 432 of file ecvPointCloud.h.
| unsigned ccPointCloud::Grid::maxValidIndex |
Maximum valid index.
Definition at line 429 of file ecvPointCloud.h.
| unsigned ccPointCloud::Grid::minValidIndex |
Minimum valid index.
Definition at line 427 of file ecvPointCloud.h.
| ccGLMatrixd ccPointCloud::Grid::sensorPosition |
Sensor position (expressed relatively to the cloud points)
Definition at line 437 of file ecvPointCloud.h.
| unsigned ccPointCloud::Grid::validCount |
Number of valid indexes.
Definition at line 425 of file ecvPointCloud.h.
| unsigned ccPointCloud::Grid::w |
Grid width.
Definition at line 420 of file ecvPointCloud.h.