 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
constexpr T const & value() const &
Definition: Optional.h:465
Generic file read and write utility for python interface.
Definition: CloudViewerConfig.cpp:12
static Tensor Ones(const SizeVector &shape, Dtype dtype, const Device &device=Device("CPU:0"))
Create a tensor fill with ones.
Definition: Tensor.cpp:412
Dtype GetDtype() const
Definition: Tensor.h:1164
Tensor Clone() const
Copy Tensor to the same device.
Definition: Tensor.h:502
double Volume() const
Returns the volume of the bounding box.
Definition: BoundingVolume.h:179
core::Tensor GetPointIndicesWithinBoundingBox(const core::Tensor &points) const
Indices to points that are within the bounding box.
Definition: BoundingVolume.cpp:509
Tensor Add(const Tensor &value) const
Adds a tensor and returns the resulting tensor.
Definition: Tensor.cpp:1097
core::Tensor color_
The color of the bounding box in RGB. The default is white.
Definition: BoundingVolume.h:232
core::Tensor GetMinBound() const
Definition: BoundingVolume.cpp:420
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > TensorToEigenMatrixXd(const core::Tensor &tensor)
Converts a 2D tensor to Eigen::MatrixXd of same shape. Regardless of the tensor dtype,...
Definition: EigenConverter.cpp:67
normal_z x
Definition: my_point_types.h:165
const core::Dtype dtype_
Definition: FilePLY.cpp:349
core::Tensor max_bound_
The upper x, y, z bounds of the bounding box.
Definition: BoundingVolume.h:230
constexpr bool has_value() const noexcept
Definition: Optional.h:440
Type x
Definition: CVGeom.h:137
AxisAlignedBoundingBox & Scale(double scale, const utility::optional< core::Tensor > ¢er=utility::nullopt)
Scale the axis-aligned box. If is the min_bound and is the max_bound of the axis aligned bounding b...
Definition: BoundingVolume.cpp:144
OrientedBoundingBox ComputeMinimumOBBApprox(const core::Tensor &points, bool robust)
Definition: MinimumOBB.cpp:1248
core::Tensor GetBoxPoints() const
Returns the eight points that define the bounding box.
Definition: BoundingVolume.cpp:199
OrientedBoundingBox(const core::Device &device=core::Device("CPU:0"))
Construct an empty OrientedBoundingBox on the provided device.
Definition: BoundingVolume.cpp:306
@ MINIMAL_APPROX
Minimal OBB approximation.
OrientedBoundingBox & Rotate(const core::Tensor &rotation, const utility::optional< core::Tensor > ¢er=utility::nullopt)
Rotate the oriented box by the given rotation matrix. If the rotation matrix is not orthogonal,...
Definition: BoundingVolume.cpp:449
bool copy
Definition: VtkUtils.cpp:74
A bounding box that is aligned along the coordinate axes and defined by the min_bound and max_bound.
Definition: BoundingVolume.h:47
filament::Texture::InternalFormat format
Definition: FilamentResourceManager.cpp:181
core::Tensor extent_
Definition: BoundingVolume.h:482
void SetRotation(const core::Tensor &rotation)
Set the rotation matrix of the box. If the data type of the given tensor differs from the data type o...
Definition: BoundingVolume.cpp:391
OrientedBoundingBox & Clear() override
Clear all elements in the geometry.
Definition: BoundingVolume.cpp:361
Tensor Reshape(const SizeVector &dst_shape) const
Definition: Tensor.cpp:671
@ MINIMAL_JYLANKI
Minimal OBB by Jylanki.
#define AssertTensorDevice(tensor,...)
Definition: TensorCheck.h:45
core::Device GetDevice() const override
Returns the device attribute of this AxisAlignedBoundingBox.
Definition: BoundingVolume.h:67
Tensor Maximum(const Tensor &input, const Tensor &other)
Computes the element-wise maximum of input and other. The tensors must have same data type and device...
Definition: TensorFunction.cpp:124
Bounding box structure.
Definition: ecvBBox.h:25
double GetXPercentage(double x) const
Definition: BoundingVolume.cpp:181
~DrawableGeometry()
Definition: DrawableGeometry.h:22
MethodOBBCreate
Definition: Geometry.h:118
void SetMaxBound(const core::Tensor &max_bound)
Set the max bound of the box. If the data type of the given tensor differs from the data type of the ...
Definition: BoundingVolume.cpp:92
Tensor Mul(const Tensor &value) const
Multiplies a tensor and returns the resulting tensor.
Definition: Tensor.cpp:1169
void SetColor(const core::Tensor &color)
Set the color of the box. If the data type of the given tensor differs from the data type of the box,...
Definition: BoundingVolume.cpp:110
void SetColor(const Eigen::Vector3d &color)
Sets the bounding box color.
Definition: BoundingBox.h:265
core::Tensor min_bound_
The lower x, y, z bounds of the bounding box.
Definition: BoundingVolume.h:228
void SetCenter(const core::Tensor ¢er)
Set the center of the box. If the data type of the given tensor differs from the data type of the box...
Definition: BoundingVolume.cpp:369
static OrientedBoundingBox FromLegacy(const cloudViewer::geometry::OrientedBoundingBox &box, const core::Dtype &dtype=core::Float32, const core::Device &device=core::Device("CPU:0"))
Definition: BoundingVolume.cpp:557
core::Dtype GetDtype() const
Returns the data type attribute of this AxisAlignedBoundingBox.
Definition: BoundingVolume.h:70
Tensor Minimum(const Tensor &input, const Tensor &other)
Computes the element-wise minimum of input and other. The tensors must have same data type and device...
Definition: TensorFunction.cpp:136
core::Tensor color_
Definition: BoundingVolume.h:483
OrientedBoundingBox ComputeMinimumOBBJylanki(const core::Tensor &points_, bool robust)
Definition: MinimumOBB.cpp:55
bool IsEmpty() const override
Returns true iff the geometry is empty.
Definition: BoundingVolume.h:87
AxisAlignedBoundingBox To(const core::Device &device, bool copy=false) const
Transfer the AxisAlignedBoundingBox to a specified device.
Definition: BoundingVolume.cpp:55
math::float4 color
Definition: LineSetBuffers.cpp:46
double GetYPercentage(double y) const
Definition: BoundingVolume.cpp:187
void SetExtent(const core::Tensor &extent)
Set the extent of the box. If the data type of the given tensor differs from the data type of the box...
Definition: BoundingVolume.cpp:377
A bounding box oriented along an arbitrary frame of reference.
Definition: BoundingVolume.h:258
core::Dtype dtype_
The data type of the bounding box.
Definition: BoundingVolume.h:226
OrientedBoundingBox GetOrientedBoundingBox() const
Convert to an oriented box.
Definition: BoundingVolume.cpp:275
visualization::rendering::Material & GetMaterial()
Get material associated with this Geometry.
Definition: DrawableGeometry.h:28
A bounding box oriented along an arbitrary frame of reference.
Definition: OrientedBoundingBox.h:22
static ecvOrientedBBox CreateFromPoints(const std::vector< Eigen::Vector3d > &points)
Definition: ecvOrientedBBox.cpp:115
Tensor Max(const SizeVector &dims, bool keepdim=false) const
Definition: Tensor.cpp:1275
const Eigen::Vector3d & GetColor() const
Gets the bounding box color.
Definition: OrientedBoundingBox.h:63
Eigen::Vector3d GetColor() const
Gets the bounding box color.
Definition: BoundingBox.h:267
core::Tensor GetExtent() const
Get the extent/length of the bounding box in x, y, and z dimension.
Definition: BoundingVolume.h:155
static AxisAlignedBoundingBox FromLegacy(const cloudViewer::geometry::AxisAlignedBoundingBox &box, const core::Dtype &dtype=core::Float32, const core::Device &device=core::Device("CPU:0"))
Definition: BoundingVolume.cpp:279
core::Tensor GetMaxBound() const
Definition: BoundingVolume.cpp:424
OrientedBoundingBox & Transform(const core::Tensor &transformation)
Transform the oriented box by the given transformation matrix.
Definition: BoundingVolume.cpp:478
core::Tensor center_
Definition: BoundingVolume.h:480
core::Tensor GetMaxBound() const
Definition: BoundingVolume.h:116
static Tensor Eye(int64_t n, Dtype dtype, const Device &device)
Create an identity matrix of size n x n.
Definition: Tensor.cpp:418
OrientedBoundingBox & Scale(double scale, const utility::optional< core::Tensor > ¢er=utility::nullopt)
Scale the axis-aligned box. If is the min_bound and is the max_bound of the axis aligned bounding b...
Definition: BoundingVolume.cpp:494
normal_z y
Definition: my_point_types.h:168
core::Device device_
Definition: BoundingVolume.h:478
void Zeros(benchmark::State &state, const Device &device)
Definition: Zeros.cpp:16
cloudViewer::geometry::AxisAlignedBoundingBox ToLegacy() const
Convert to a legacy CloudViewer axis-aligned box.
Definition: BoundingVolume.cpp:249
AxisAlignedBoundingBox GetAxisAlignedBoundingBox() const
Convert to an axis-aligned box.
Definition: BoundingVolume.cpp:544
core::Tensor GetCenter() const
Definition: BoundingVolume.h:335
AxisAlignedBoundingBox & operator+=(const AxisAlignedBoundingBox &other)
Add operation for axis-aligned bounding box. The device of other box must be the same as the device o...
Definition: BoundingVolume.cpp:162
AxisAlignedBoundingBox & Clear() override
Clear all elements in the geometry.
Definition: BoundingVolume.cpp:67
Mix-in class for geometry types that can be visualized.
Definition: DrawableGeometry.h:19
static Tensor Zeros(const SizeVector &shape, Dtype dtype, const Device &device=Device("CPU:0"))
Create a tensor fill with zeros.
Definition: Tensor.cpp:406
const double * e
Definition: essential_matrix_poly.h:10
Eigen::Vector3d extent_
Definition: MinimumOBB.cpp:50
const Eigen::Vector3d & GetPosition() const
Definition: OrientedBoundingBox.h:67
void SetColor(const core::Tensor &color)
Set the color of the box.
Definition: BoundingVolume.cpp:405
GeometryType
Specifies possible geometry types.
Definition: Geometry.h:28
core::Tensor GetColor() const
Definition: BoundingVolume.h:333
static TensorKey Index(int64_t index)
Definition: TensorKey.cpp:134
core::Tensor GetBoxPoints() const
Returns the eight points that define the bounding box.
Definition: BoundingVolume.cpp:428
bool AllClose(const Tensor &other, double rtol=1e-5, double atol=1e-8) const
Definition: Tensor.cpp:1895
Tensor T() const
Expects input to be <= 2-D Tensor by swapping dimension 0 and 1.
Definition: Tensor.cpp:1079
std::string ToString() const
Text description.
Definition: BoundingVolume.cpp:226
double Volume() const
Returns the volume of the bounding box.
Definition: BoundingVolume.h:385
core::Dtype dtype_
Definition: BoundingVolume.h:479
DrawableGeometry()
Definition: DrawableGeometry.h:21
const Dtype Bool
Definition: Dtype.cpp:52
std::string ToString() const
Definition: Dtype.h:65
void SetColor(const Eigen::Vector3d &color)
Sets the bounding box color.
Definition: OrientedBoundingBox.h:61
AxisAlignedBoundingBox & Translate(const core::Tensor &translation, bool relative=true)
Translate the axis-aligned box by the given translation.
Definition: BoundingVolume.cpp:126
Tensor Matmul(const Tensor &rhs) const
Definition: Tensor.cpp:1919
const Dtype Float64
Definition: Dtype.cpp:43
Device GetDevice() const override
Definition: Tensor.cpp:1435
core::Device GetDevice() const override
Returns the device attribute of this OrientedBoundingBox.
Definition: BoundingVolume.h:282
Tensor Flatten(int64_t start_dim=0, int64_t end_dim=-1) const
Definition: Tensor.cpp:685
int points
Definition: FileIOFactory.cpp:144
const Dtype Float32
Definition: Dtype.cpp:42
Type z
Definition: CVGeom.h:137
static OrientedBoundingBox CreateFromPoints(const core::Tensor &points, bool robust=false, MethodOBBCreate method=MethodOBBCreate::MINIMAL_APPROX)
Definition: BoundingVolume.cpp:584
void GetPointMaskWithinAABB(const core::Tensor &points, const core::Tensor &min_bound, const core::Tensor &max_bound, core::Tensor &mask)
Definition: PointCloud.cpp:101
Eigen::Vector3d center_
Definition: MinimumOBB.cpp:51
Definition: Optional.h:44
#define LogError(...)
Definition: Logging.h:60
Tensor Concatenate(const std::vector< Tensor > &tensors, const utility::optional< int64_t > &axis)
Concatenates the list of tensors in their order, along the given axis into a new tensor....
Definition: TensorFunction.cpp:79
AxisAlignedBoundingBox(const core::Device &device=core::Device("CPU:0"))
Construct an empty AxisAlignedBoundingBox on the provided device.
Definition: BoundingVolume.cpp:19
const Eigen::Matrix3d & GetRotation() const
Definition: OrientedBoundingBox.h:65
static TensorKey Slice(utility::optional< int64_t > start, utility::optional< int64_t > stop, utility::optional< int64_t > step)
Definition: TensorKey.cpp:138
core::Device device_
The device to use for the bounding box. The default is CPU:0.
Definition: BoundingVolume.h:224
static AxisAlignedBoundingBox CreateFromPoints(const core::Tensor &points)
Definition: BoundingVolume.cpp:233
core::Tensor GetMinBound() const
Definition: BoundingVolume.h:114
T Item() const
Definition: Tensor.h:618
core::Tensor GetColor() const
Definition: BoundingVolume.h:118
#define AssertTensorDtype(tensor,...)
Definition: TensorCheck.h:21
core::Tensor GetExtent() const
Definition: BoundingVolume.h:339
@ PCA
Principal Component Analysis.
void SetMinBound(const core::Tensor &min_bound)
Set the min bound of the box. If the data type of the given tensor differs from the data type of the ...
Definition: BoundingVolume.cpp:74
double GetZPercentage(double z) const
Definition: BoundingVolume.cpp:193
std::string ToString(bool with_suffix=true, const std::string &indent="") const
Definition: Tensor.cpp:780
core::Tensor EigenMatrixToTensor(const Eigen::MatrixBase< Derived > &matrix)
Converts a eigen matrix of shape (M, N) with alignment A and type T to a tensor.
Definition: EigenConverter.h:29
core::Tensor GetPointIndicesWithinBoundingBox(const core::Tensor &points) const
Indices to points that are within the bounding box.
Definition: BoundingVolume.cpp:210
bool IsValid() const
Definition: Material.h:54
core::Dtype GetDtype() const
Returns the data type attribute of this OrientedBoundingBox.
Definition: BoundingVolume.h:285
constexpr nullopt_t nullopt
Definition: Optional.h:136
Tensor Min(const SizeVector &dims, bool keepdim=false) const
Definition: Tensor.cpp:1268
const visualization::rendering::Material & GetMaterial() const
Get const reference to material associated with this Geometry.
Definition: DrawableGeometry.h:31
#define LogWarning(...)
Definition: Logging.h:72
Type y
Definition: CVGeom.h:137
const Vector3Tpl< T > & maxCorner() const
Returns max corner (const)
Definition: BoundingBox.h:156
cloudViewer::geometry::OrientedBoundingBox ToLegacy() const
Convert to a legacy CloudViewer oriented box.
Definition: BoundingVolume.cpp:531
bool HasMaterial() const
Check if a material has been applied to this Geometry with SetMaterial.
Definition: DrawableGeometry.h:25
Eigen::Matrix3d rotation
Definition: VoxelGridIO.cpp:27
float PointCoordinateType
Type of the coordinates of a (N-D) point.
Definition: CVTypes.h:16
normal_z z
Definition: my_point_types.h:165
core::Tensor rotation_
Definition: BoundingVolume.h:481
#define AssertTensorShape(tensor,...)
Definition: TensorCheck.h:61
OrientedBoundingBox & Translate(const core::Tensor &translation, bool relative=true)
Translate the oriented box by the given translation. If relative is true, the translation is added to...
Definition: BoundingVolume.cpp:434
#define AssertTensorDtypes(tensor,...)
Definition: TensorCheck.h:33
std::vector< Eigen::Vector3d > TensorToEigenVector3dVector(const core::Tensor &tensor)
Converts a tensor of shape (N, 3) to std::vector<Eigen::Vector3d>. An exception will be thrown if the...
Definition: EigenConverter.cpp:150
std::string ToString() const
Text description.
Definition: BoundingVolume.cpp:526
static OrientedBoundingBox CreateFromAxisAlignedBoundingBox(const AxisAlignedBoundingBox &aabb)
Definition: BoundingVolume.cpp:548
core::Tensor GetHalfExtent() const
Returns the half extent of the bounding box.
Definition: BoundingVolume.h:158
void GetPointMaskWithinOBB(const core::Tensor &points, const core::Tensor ¢er, const core::Tensor &rotation, const core::Tensor &extent, core::Tensor &mask)
Definition: PointCloud.cpp:126
Definition: Material.h:22
core::Tensor GetCenter() const
Definition: BoundingVolume.h:120
Tensor To(Dtype dtype, bool copy=false) const
Definition: Tensor.cpp:739
The base geometry class.
Definition: Geometry.h:23
const Eigen::Vector3d & GetExtent() const
Definition: OrientedBoundingBox.h:49
void SetMaterial(const visualization::rendering::Material &material)
Set the material properties associate with this Geometry.
Definition: DrawableGeometry.h:36
core::Tensor GetRotation() const
Definition: BoundingVolume.h:337
OrientedBoundingBox To(const core::Device &device, bool copy=false) const
Definition: BoundingVolume.cpp:348
const Vector3Tpl< T > & minCorner() const
Returns min corner (const)
Definition: BoundingBox.h:154