paralleldomain.model.annotation.polyline_3d

class Line3D(start, end, class_id, directed=False, instance_id=-1, attributes=<factory>)

Represents a 3D Line.

Parameters:
start

the 3D start point of the line in image coordinates

end

the 3D end point of the line in image coordinates

directed

whether the line is directed from start to end (if False the line is bi-directional)

class_id

Class ID of the line. Can be used to lookup more details in ClassMap.

instance_id

Instance ID of annotated object. Can be used to cross-reference with other instance annotation types, e.g., InstanceSegmentation3D or InstanceSegmentation3D. If unknown defaults to -1.

attributes

Dictionary of arbitrary object attributes.

to_numpy()

Returns the start and end coordinates as a numpy array with shape (2 x 3).

property direction: Point3DBaseGeometry[T]

Returns the directional vector of the line.

property length: float

Returns the length of the line.

class Polyline3D(lines, class_id, instance_id=-1, attributes=<factory>)

A polyline made of a collection of 3D Lines

Parameters:
lines

Ordered list of Line3D instances

class_id

Class ID of the polyline. Can be used to lookup more details in ClassMap.

instance_id

Instance ID of annotated object. Can be used to cross-reference with other instance annotation types, e.g., InstanceSegmentation3D or InstanceSegmentation3D. If unknown defaults to -1.

attributes

Dictionary of arbitrary object attributes.

to_numpy()

Returns all ordered vertices as a numpy array of shape (N x 3).

property length

Returns the length of the line.

class Polylines3D(polylines)

Collection of 3D Polylines

Parameters:

polylines (List[Polyline3D]) – Polylines3D.polylines

polylines

Ordered list of Polyline3D instances