pointCloud¶

class
itom.
pointCloud
([type]  pointCloud [,indices]  width, height [,point]  point) → creates new point cloud.¶ Parameters: type : pointtype (e.g. point.PointXYZ, see Notes)
pointCloud : {pointCloud}
another pointCloud instance which is appended at this point cloud
indices : {sequence}, optional
only the indices of the given pointCloud will be appended to this point cloud
width : {int}
width of the new point cloud
height : {int}
height of the new point cloud (the point cloud is dense if height > 1)
point : {point}
single point instance. This point cloud is filled up with elements of this point. If width and height are given, every element is set to this point, else the point cloud only consists of this single point.
Notes
 Possible types:
 point.PointXYZ
 point.PointXYZI
 point.PointXYZRGBA
 point.PointXYZNormal
 point.PointXYZINormal
 point.PointXYZRGBNormal

append
(point) → appends point at the end of the point cloud.¶ Parameters: point : {point???}, optional Notes
The type of point must fit to the type of the point cloud. If the point cloud is invalid, its type is set to the type of the point.

clear
() → clears the whole point cloud¶

copy
() → returns a deep copy of this point cloud.¶ Returns: cloud : {pointCloud}
An exact copy if this point cloud.

dense
¶ specifies if all the data in points is finite (true), or whether it might contain Inf/NaN values (false).
Notes
{bool} : ReadOnly ReadWrite

empty
¶ returns whether this point cloud is empty, hence size == 1
Notes
{} : ReadOnly ReadWrite

erase
(indices) > erases the points in point clouds indicated by indices (single number of slice)¶ Parameters: indices : {} Notes
This method is the same than command ‘del pointCloudVariable[indices]’

fields
¶ get available field names of point cloud
Notes
{} : ReadOnly ReadWrite

static
fromDisparity
(disparity [,intensity] [,deleteNaN]) → creates a point cloud from a given disparity dataObject.¶ Creates a point cloud from the 2.5D data set given by the disparity dataObject. The x and ycomponents of each point are taken from the regular grid values of ‘disparity’ (considering the scaling and offset of the object). The corresponding zvalue is the disparity’s value itself.
Parameters: disparity : {MxN data object, float32}
The values of this dataObject represent the disparity values.
intensity : {MxN data object, float32}, optional
If given, an XYZIpoint cloud is created whose intensity values are determined by this dataObject (cannot be used together with ‘color’)
deleteNaN : {bool}, optional
If true (default: false), NaN or Infvalues (z) in the disparity map will not be copied into the point cloud (the point cloud is not organized any more).
color : {MxN data object, rgba32}, optional
If given, a XYZRGBApoint cloud is created whose color values are determined by this dataObject (cannot be used together with ‘intensity’)
Returns: PointCloud. :

static
fromXYZ
(X, Y, Z  XYZ) → creates a point cloud from three X,Y,Z data objects or from one 3xMxN data object¶ The created point cloud is not organized (height=1) and dense, if no NaN or Inf values are within the point cloud (deleteNaN:true results in a dense point cloud)
Parameters: X,Y,Z : {MxN data objects}
Three 2D data objects with the same size.
XYZ : {3xMxN data object}
OR: 3xMxN data object, such that the first plane is X, the second is Y and the third is Z
deleteNaN : {bool}
default = false if True all NaN values are skipped, hence, the resulting point cloud is not dense any more
Returns: PointCloud. :

static
fromXYZI
(X, Y, Z, I  XYZ, I) → creates a point cloud from four X,Y,Z,I data objects or from one 3xMxN data object and one intensity data object¶ The created point cloud is not organized (height=1) and dense, if no NaN or Inf values are within the point cloud (deleteNaN:true results in a dense point cloud)
Parameters: X,Y,Z,I : {MxN data objects}
Four 2D data objects with the same size.
OR :
XYZ : {3xMxN data object}
3xMxN data object, such that the first plane is X, the second is Y and the third is Z
I : {MxN data object}
MxN data object with the same size than the single X,Y or Z planes
deleteNaN : {bool}
default = false if True all NaN values are skipped, hence, the resulting point cloud is not dense any more
Returns: PointCloud. :

static
fromXYZRGBA
(X, Y, Z, color  XYZ, color) → creates a point cloud from four X,Y,Z,color data objects or from one 3xMxN data object and one coloured data object¶ The created point cloud is not organized (height=1) and dense, if no NaN or Inf values are within the point cloud (deleteNaN:true results in a dense point cloud)
Parameters: X,Y,Z,color : {MxN data objects}
Four 2D data objects with the same size. X,Y,Z must have the same type, color must be rgba32.
OR :
XYZ : {3xMxN data object}
3xMxN data object, such that the first plane is X, the second is Y and the third is Z
color : {MxN data object}
MxN data object with the same size than the single X,Y or Z planes, type: rgba32
deleteNaN : {bool}
default = false if True all NaN or Inf values are skipped, hence, the resulting point cloud does not contain this values
Returns: PointCloud. :

height
¶ returns height of point cloud if organized as regular grid (organized == true), else 1 specifies the height of the point cloud dataset in the number of points. HEIGHT has two meanings:
 it can specify the height (total number of rows) of an organized point cloud dataset;
 it is set to 1 for unorganized datasets (thus used to check whether a dataset is organized or not).
Notes
{} : ReadOnly ReadWrite

insert
(index, values) → inserts a single point or a sequence of points before position given by index¶ Parameters: index : {}
values : {}
Notes
doctodo

name
()¶

organized
¶ returns whether this point cloud is organized as regular grid, hence height != 1
Notes
{} : ReadOnly ReadWrite

size
¶ returns number of points in point cloud
Notes
{} : ReadOnly ReadWrite

toDataObject
() → returns a PxN data object, where P is determined by the point type in the point cloud. N is the number of points.¶ The output has at least 3 elements per column. Onr got each coordinate (xyz). These will always be the first 3 elements. If the pointcloud type has normals defined, these will be added in the next 4 columns as [nx, ny, nz, curvature]. If the pointcloud type has an intensity, these will be added in the next 1 column as [intensity]. If the pointcloud type has an RGB(A)intensity, these will be added in the next 4 column as [r, g, b, a]. Hence following combinations are possible [x,y,z], [x,y,z,i], [x,y,z,r,g,b,a], [x,y,z,nx,ny,nz, curvature], [x,y,z,nx,ny,nz, curvature, i], ...
Returns: dObj : {dataObject}
A dataObject with P (cols) by N elements (Points), where the elements per column depend on the point cloud type
Notes
doctodo

type
¶ returns point type of point cloud
Notes
{} : ReadOnly ReadWrite

width
¶ returns width of point cloud if organized as regular grid (organized == true), else equal to size specifies the width of the point cloud dataset in the number of points. WIDTH has two meanings:
 it can specify the total number of points in the cloud (equal with POINTS see below) for unorganized datasets;
 it can specify the width (total number of points in a row) of an organized point cloud dataset.
Notes
{} : ReadOnly ReadWrite