open3d.geometry.Octree¶
-
class
open3d.geometry.
Octree
¶ Octree datastructure.
-
class
Type
¶ Enum class for Geometry types.
-
HalfEdgeTriangleMesh
= Type.HalfEdgeTriangleMesh¶
-
Image
= Type.Image¶
-
LineSet
= Type.LineSet¶
-
PointCloud
= Type.PointCloud¶
-
TriangleMesh
= Type.TriangleMesh¶
-
Unspecified
= Type.Unspecified¶
-
VoxelGrid
= Type.VoxelGrid¶
-
-
__init__
(*args, **kwargs)¶ Overloaded function.
__init__(self: open3d.geometry.Octree) -> None
Default constructor
__init__(self: open3d.geometry.Octree, arg0: open3d.geometry.Octree) -> None
Copy constructor
__init__(self: open3d.geometry.Octree, max_depth: int) -> None
__init__(self: open3d.geometry.Octree, max_depth: int, origin: numpy.ndarray[float64[3, 1]], size: float) -> None
-
clear
(self)¶ Clear all elements in the geometry.
- Returns
None
-
convert_from_point_cloud
(self, point_cloud, size_expand=0.01)¶ Convert octree from point cloud.
- Parameters
point_cloud (open3d.geometry.PointCloud) – Input point cloud.
size_expand (float, optional, default=0.01) – A small expansion size such that the octree is slightly bigger than the original point cloud bounds to accmondate all points.
- Returns
None
-
dimension
(self)¶ Returns whether the geometry is 2D or 3D.
- Returns
int
-
from_voxel_grid
(self)¶ - Returns
None
-
get_geometry_type
(self)¶ Returns one of registered geometry types.
- Returns
open3d.geometry.Geometry.GeometryType
-
get_max_bound
(self)¶ Returns max bounds for geometry coordinates.
- Returns
numpy.ndarray[float64[3, 1]]
-
get_min_bound
(self)¶ Returns min bounds for geometry coordinates.
- Returns
numpy.ndarray[float64[3, 1]]
-
insert_point
(self, point, f_init, f_update)¶ Insert a point to the octree.
- Parameters
point (numpy.ndarray[float64[3, 1]]) – Coordinates of the point.
f_init (Callable[[], open3d.geometry.OctreeLeafNode]) –
f_update (Callable[[open3d.geometry.OctreeLeafNode], None]) –
- Returns
None
-
is_empty
(self)¶ Returns
True
iff the geometry is empty.- Returns
bool
-
is_point_in_bound
(point: numpy.ndarray[float64[3, 1]], origin: numpy.ndarray[float64[3, 1]], size: float) → bool¶ Return true if point within bound, that is, origin<= point < origin + size
-
locate_leaf_node
(self, point)¶ Returns leaf OctreeNode and OctreeNodeInfo where the querypoint should reside.
- Parameters
point (numpy.ndarray[float64[3, 1]]) – Coordinates of the point.
- Returns
Tuple[open3d.geometry.OctreeLeafNode, open3d.geometry.OctreeNodeInfo]
-
rotate
(self, rotation, center=True, type=RotationType.XYZ)¶ Apply rotation to the geometry coordinates and normals.
- Parameters
rotation (numpy.ndarray[float64[3, 1]]) – A 3D vector that either defines the three angles for Euler rotation, or in the axis-angle representation the normalized vector defines the axis of rotation and the norm the angle around this axis.
center (bool, optional, default=True) – If true, then the rotation is applied to the centered geometry
type (open3d.geometry.RotationType, optional, default=RotationType.XYZ) – Type of rotation, i.e., an Euler format, or axis-angle.
- Returns
open3d.geometry.Geometry3D
-
scale
(self, scale, center=True)¶ Apply scaling to the geometry coordinates.
- Parameters
scale (float) – The scale parameter that is multiplied to the points/vertices of the geometry
center (bool, optional, default=True) – If true, then the scale is applied to the centered geometry
- Returns
open3d.geometry.Geometry3D
-
to_voxel_grid
(self)¶ Convert to VoxelGrid.
- Returns
open3d.geometry.VoxelGrid
-
transform
(self, arg0)¶ Apply transformation (4x4 matrix) to the geometry coordinates.
- Parameters
arg0 (numpy.ndarray[float64[4, 4]]) –
- Returns
open3d.geometry.Geometry3D
-
translate
(self, arg0)¶ Apply translation to the geometry coordinates.
- Parameters
arg0 (numpy.ndarray[float64[3, 1]]) –
- Returns
open3d.geometry.Geometry3D
-
HalfEdgeTriangleMesh
= Type.HalfEdgeTriangleMesh¶
-
Image
= Type.Image¶
-
LineSet
= Type.LineSet¶
-
PointCloud
= Type.PointCloud¶
-
TriangleMesh
= Type.TriangleMesh¶
-
Unspecified
= Type.Unspecified¶
-
VoxelGrid
= Type.VoxelGrid¶
-
property
max_depth
¶ Maximum depth of the octree.
- Type
int
-
property
origin
¶ Origin coordinate of the octree.
- Type
(3, 1) float numpy array
-
property
root_node
¶ The root octree node.
- Type
-
property
size
¶ Size of the octree, i.e. the size of the outer bound.
- Type
float
-
class