31 #include <unordered_map> 32 #include <unordered_set> 115 PointCloud(
const std::unordered_map<std::string, core::TensorList>
116 &map_keys_to_tensorlists);
226 const std::unordered_map<std::string, core::Tensor>
227 &map_keys_to_tensors) {
255 bool relative =
true);
void SynchronizedPushBack(const std::unordered_map< std::string, core::Tensor > &map_keys_to_tensors)
Definition: TensorListMap.cpp:89
PointCloud & Transform(const core::Tensor &transformation)
Transforms the points and normals (if exist).
Definition: PointCloud.cpp:75
PointCloud & Translate(const core::Tensor &translation, bool relative=true)
Translates points.
Definition: PointCloud.cpp:80
bool IsEmpty() const override
Returns !HasPoints().
Definition: PointCloud.h:239
const core::TensorList & GetPointNormals() const
Get the value of the "normals" attribute. Convenience function.
Definition: PointCloud.h:160
core::TensorList & GetPointAttr(const std::string &key)
Definition: PointCloud.h:131
static geometry::PointCloud FromLegacyPointCloud(const open3d::geometry::PointCloud &pcd_legacy, core::Dtype dtype=core::Dtype::Float32, const core::Device &device=core::Device("CPU:0"))
Create a PointCloud from a legacy Open3D PointCloud.
Definition: PointCloud.cpp:104
PointCloud(core::Dtype dtype=core::Dtype::Float32, const core::Device &device=core::Device("CPU:0"))
Construct an empty pointcloud.
Definition: PointCloud.cpp:42
int64_t GetSize() const
Definition: TensorList.h:269
core::TensorList & GetPointColors()
Get the value of the "colors" attribute. Convenience function.
Definition: PointCloud.h:139
bool HasPointColors() const
Definition: PointCloud.h:210
core::Device GetDevice() const
Definition: PointCloud.h:263
PointCloud & Scale(double scale, const core::Tensor ¢er)
Scale points.
Definition: PointCloud.cpp:91
void SetPoints(const core::TensorList &value)
Set the value of the "points" attribute. Convenience function.
Definition: PointCloud.h:175
A point cloud consists of point coordinates, and optionally point colors and point normals...
Definition: PointCloud.h:54
void SetPointColors(const core::TensorList &value)
Set the value of the "colors" attribute. Convenience function.
Definition: PointCloud.h:181
Definition: TensorListMap.h:44
Definition: TensorList.h:58
bool HasPointAttr(const std::string &key) const
Definition: PointCloud.h:196
const TensorListMap & GetPointAttrPybind() const
Getter for point_attr_ TensorListMap. Used in Pybind.
Definition: PointCloud.h:121
core::TensorList & GetPoints()
Get the value of the "points" attribute. Convenience function.
Definition: PointCloud.h:136
core::Device device_
Definition: PointCloud.h:275
void SynchronizedPushBack(const std::unordered_map< std::string, core::Tensor > &map_keys_to_tensors)
Definition: PointCloud.h:225
void SetPointNormals(const core::TensorList &value)
Set the value of the "normals" attribute. Convenience function.
Definition: PointCloud.h:187
A pointcloud contains a set of 3D points.
Definition: PointCloud.h:93
virtual ~PointCloud() override
Definition: PointCloud.h:118
const core::TensorList & GetPoints() const
Get the value of the "points" attribute. Convenience function.
Definition: PointCloud.h:152
core::TensorList & GetPointNormals()
Get the value of the "normals" attribute. Convenience function.
Definition: PointCloud.h:142
void SetPointAttrPybind(const TensorListMap &point_attr)
Setter for point_attr_ TensorListMap. Used in Pybind.
Definition: PointCloud.h:124
void AssertDevice(const Device &expected_device) const
Definition: TensorList.h:257
open3d::geometry::PointCloud ToLegacyPointCloud() const
Convert to a legacy Open3D PointCloud.
Definition: PointCloud.cpp:130
core::Tensor GetMaxBound() const
Returns the max bound for point coordinates.
Definition: PointCloud.cpp:67
static const Dtype Float32
Definition: Dtype.h:42
PointCloud & Clear() override
Clear all data in the pointcloud.
Definition: PointCloud.h:233
void AssertElementShape(const SizeVector &expected_element_shape) const
Definition: TensorList.h:248
const core::TensorList & GetPointAttr(const std::string &key) const
Definition: PointCloud.h:147
void SetPointAttr(const std::string &key, const core::TensorList &value)
Definition: PointCloud.h:169
The base geometry class.
Definition: Geometry.h:36
bool HasPoints() const
Definition: PointCloud.h:203
TensorListMap point_attr_
Definition: PointCloud.h:276
int points
Definition: FilePCD.cpp:73
core::Tensor GetMinBound() const
Returns the min bound for point coordinates.
Definition: PointCloud.cpp:63
Definition: PinholeCameraIntrinsic.cpp:35
bool HasPointNormals() const
Definition: PointCloud.h:217
PointCloud & Rotate(const core::Tensor &R, const core::Tensor ¢er)
Rotate points and normals (if exist).
Definition: PointCloud.cpp:98
bool Contains(const std::string &key) const
Definition: TensorListMap.h:97
core::Tensor GetCenter() const
Returns the center for point coordinates.
Definition: PointCloud.cpp:71
const core::TensorList & GetPointColors() const
Get the value of the "colors" attribute. Convenience function.
Definition: PointCloud.h:155