The PointCloud class. More...
#include <yarp/sig/PointCloud.h>
Public Member Functions | |
PointCloud () | |
PointCloud, default constructor. | |
template<class T1 > | |
PointCloud (const PointCloud< T1 > &alt) | |
PointCloud, copy constructor. | |
virtual void | resize (size_t width, size_t height) |
Resize the PointCloud. | |
virtual void | resize (size_t width) |
Resize the PointCloud. | |
const char * | getRawData () const override |
Get the pointer to the data. | |
size_t | wireSizeBytes () const override |
Get the size of the data + the header in terms of number of bytes. | |
size_t | dataSizeBytes () const override |
Get the size of the data in terms of number of bytes. | |
size_t | size () const override |
T & | operator() (size_t u, size_t v) |
Obtain the point given by the (column, row) coordinates. | |
const T & | operator() (size_t u, size_t v) const |
Obtain the point given by the (column, row) coordinates (const version). | |
T & | operator() (size_t i) |
Obtain the point given by the index. | |
const T & | operator() (size_t i) const |
Obtain the point given by the index (const version). | |
template<class T1 > | |
const PointCloud< T > & | operator= (const PointCloud< T1 > &alt) |
Assignment operator. | |
PointCloud< T > & | operator+= (const PointCloud< T > &rhs) |
Concatenate a point cloud to the current cloud. | |
const PointCloud< T > | operator+ (const PointCloud< T > &rhs) |
Concatenate a point cloud to another cloud. | |
void | push_back (const T &pt) |
Insert a new point in the cloud, at the end of the container. | |
virtual void | clear () |
Clear the data. | |
virtual void | fromExternalPC (const char *source, int type, size_t width, size_t height, bool isDense=true) |
Copy the content of an external PointCloud. | |
template<class T1 > | |
void | copy (const PointCloud< T1 > &alt) |
Copy operator. | |
bool | read (yarp::os::ConnectionReader &connection) override |
Read this object from a network connection. | |
bool | write (yarp::os::ConnectionWriter &writer) const override |
Write this object to a network connection. | |
virtual std::string | toString (int precision=-1, int width=-1) const |
yarp::os::Bottle | toBottle () const |
Generate a yarp::os::Bottle filled with the PointCloud data. | |
bool | fromBottle (const yarp::os::Bottle &bt) |
Populate the PointCloud from a yarp::os::Bottle. | |
int | getBottleTag () const override |
Public Member Functions inherited from yarp::sig::PointCloudBase | |
virtual | ~PointCloudBase ()=default |
virtual size_t | height () const |
virtual size_t | width () const |
virtual int | getPointType () const |
yarp::os::Type | getType () const override |
virtual bool | isOrganized () const |
virtual bool | isDense () const |
Public Member Functions inherited from yarp::os::PortReader | |
virtual | ~PortReader () |
Destructor. | |
virtual Type | getReadType () const |
Public Member Functions inherited from yarp::os::PortWriter | |
virtual | ~PortWriter () |
Destructor. | |
virtual void | onCompletion () const |
This is called when the port has finished all writing operations. | |
virtual void | onCommencement () const |
This is called when the port is about to begin writing operations. | |
virtual yarp::os::Type | getWriteType () const |
Additional Inherited Members | |
Static Public Member Functions inherited from yarp::os::Portable | |
static bool | copyPortable (const PortWriter &writer, PortReader &reader) |
Copy one portable to another, via writing and reading. | |
Protected Member Functions inherited from yarp::sig::PointCloudBase | |
PointCloudBase ()=default | |
virtual void | copyFromRawData (const char *dst, const char *source, std::vector< int > &recipe) |
virtual std::vector< int > | getComposition (int type_composite) const |
virtual size_t | pointType2Size (int type) const |
virtual size_t | getOffset (int type_composite, int type_basic) const |
Protected Attributes inherited from yarp::sig::PointCloudBase | |
yarp::sig::PointCloudNetworkHeader | header |
The PointCloud class.
Definition at line 21 of file PointCloud.h.
|
inline |
PointCloud, default constructor.
Definition at line 36 of file PointCloud.h.
|
inline |
PointCloud, copy constructor.
Clones the content of another point cloud.
alt | the point cloud to clone. |
Definition at line 48 of file PointCloud.h.
|
inlinevirtual |
Clear the data.
Definition at line 216 of file PointCloud.h.
|
inline |
Copy operator.
clones the content of another point cloud
alt | the point cloud to clone |
Definition at line 251 of file PointCloud.h.
|
inlineoverridevirtual |
Get the size of the data in terms of number of bytes.
Implements yarp::sig::PointCloudBase.
Definition at line 100 of file PointCloud.h.
|
inline |
Populate the PointCloud from a yarp::os::Bottle.
[in] | bt,the | yarp::os::Bottle to read from. It has to be formatted in the same way it is generated by the toBottle() method. |
Definition at line 364 of file PointCloud.h.
|
inlinevirtual |
Copy the content of an external PointCloud.
source,pointer | to the source data. |
type,enum | representing the type of the source cloud. |
width,width | of the source cloud. |
height,height | of the source cloud. |
isDense |
Definition at line 231 of file PointCloud.h.
|
inlineoverridevirtual |
Implements yarp::sig::PointCloudBase.
Definition at line 388 of file PointCloud.h.
|
inlineoverridevirtual |
Get the pointer to the data.
Implements yarp::sig::PointCloudBase.
Definition at line 80 of file PointCloud.h.
|
inline |
Obtain the point given by the index.
i,index |
Definition at line 136 of file PointCloud.h.
|
inline |
Obtain the point given by the index (const version).
i,index |
Definition at line 145 of file PointCloud.h.
|
inline |
Obtain the point given by the (column, row) coordinates.
Only works on organized clouds (those that have height != 1).
u,column | coordinate |
v,row | coordinate |
Definition at line 116 of file PointCloud.h.
|
inline |
Obtain the point given by the (column, row) coordinates (const version).
Only works on organized clouds (those that have height != 1).
u,column | coordinate |
v,row | coordinate |
Definition at line 127 of file PointCloud.h.
|
inline |
Concatenate a point cloud to another cloud.
rhs | the cloud to add to the current cloud |
Definition at line 196 of file PointCloud.h.
|
inline |
Concatenate a point cloud to the current cloud.
rhs | the cloud to add to the current cloud |
Definition at line 169 of file PointCloud.h.
|
inline |
Assignment operator.
Clones the content of another image.
alt | the image to clone |
Definition at line 156 of file PointCloud.h.
|
inline |
Insert a new point in the cloud, at the end of the container.
[in] | pt | the point to insert. |
Definition at line 206 of file PointCloud.h.
|
inlineoverridevirtual |
Read this object from a network connection.
Override this for your particular class.
reader | an interface to the network connection for reading |
Implements yarp::sig::PointCloudBase.
Definition at line 263 of file PointCloud.h.
|
inlinevirtual |
Resize the PointCloud.
width. |
Definition at line 73 of file PointCloud.h.
|
inlinevirtual |
|
inlineoverridevirtual |
Implements yarp::sig::PointCloudBase.
Definition at line 105 of file PointCloud.h.
|
inline |
Generate a yarp::os::Bottle filled with the PointCloud data.
Definition at line 343 of file PointCloud.h.
|
inlinevirtual |
Definition at line 317 of file PointCloud.h.
|
inlineoverridevirtual |
Get the size of the data + the header in terms of number of bytes.
Implements yarp::sig::PointCloudBase.
Definition at line 90 of file PointCloud.h.
|
inlineoverridevirtual |
Write this object to a network connection.
Override this for your particular class. Be aware that depending on the nature of the connections a port has, and what protocol they use, and how efficient the YARP implementation is, this method may be called once, twice, or many times, as the result of a single call to Port::write
writer | an interface to the network connection for writing |
Implements yarp::sig::PointCloudBase.
Definition at line 311 of file PointCloud.h.