10.10. point

class itom.point(type=point.PointInvalid, xyz=None, intensity=None, rgba=None, normal=None, curvature=None)

Creates new point object, for instance used for class pointCloud.

One point can be of different types. Possible types are:

  • point.PointInvalid: an invalid, uninitialized point.

  • point.PointXYZ: this point only contains the 3D coordinates (X, Y, Z).

  • point.PointXYZI: like PointXYZ, but with an additional intensity value.

  • point.PointXYZRGBA: like PointXYZ, but with an additional colour value.

  • point.PointXYZNormal: like PointXYZ, but with an additional normal vector (NX, NY, NZ) and scalar curvature value.

  • point.PointXYZINormal: like PointXYZNormal, but with an additional intensity value.

  • point.PointXYZRGBNormal: like PointXYZNormal, but with an additional colour value (R, G, B, A).

Parameters
typeint, optional

the desired type of this point. Depending on this type, some of the following parameters must be or must not be given.

xyztuple of float

is only allowed for type != point.PointInvalid and gives a tuple with the coordinates (X, Y, Z) of this point.

intensityfloat, optional

is only allowed for type = point.PointXYZI and type = point.PointXYZINormal. It is the float intensity value.

rgbatuple of int, optional

is only allowed for type = point.PointXYZRBA or type = point.PointXYZRGBNormal. It must be a tuple of four integer values (R, G, B, A), all in the range [0, 255].

normaltuple of float, optional

is only allowed for Normal-based types and is a tuple (NX, NY, NZ) with the three components of the normal vector to this point.

curvaturefloat, optional

is only allowed for Normal-based type and gives the curvature value of the normal.

Returns
point

the newly created point object.

name() str

Name of this class.

Returns
str

the name of this object (Point).

PointInvalid = 0
PointXYZ = 1
PointXYZI = 2
PointXYZINormal = 16
PointXYZNormal = 8
PointXYZRGBA = 4
PointXYZRGBNormal = 32
curvature

float : Gets or sets the curvature value.

Raises
ValueError

if type of point does not support a curvature value.

intensity

float : gGts or sets intensity if type of point supports intensity values.

Raises
ValueError

if type of point does not support an intensity value.

normal

tuple of float : Gets or sets the normal vector of this point as tuple (nx,ny,nz).

Raises
ValueError

if type of point does not support normal vector data.

rgb

tuple of float : Gets or sets rgb-values as tuple (r,g,b), where each color component is in range [0, 255].

Raises
ValueError

if type of point does not support r,g,b values.

rgba

tuple of float : Gets or sets rgba-values as tuple (r,g,b,a), where each color component is in range [0, 255].

Raises
ValueError

if type of point does not support r,g,b,a values.

type

int : gets the type of this point as one of the constants point.PointXYZ....

xyz

tuple of float : Gets or sets the (x, y, z) coordinates tuple of this point.