ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::t::geometry::RGBDImage Class Reference

RGBDImage A pair of color and depth images. More...

#include <RGBDImage.h>

Inheritance diagram for cloudViewer::t::geometry::RGBDImage:
Collaboration diagram for cloudViewer::t::geometry::RGBDImage:

Public Member Functions

 RGBDImage ()
 Default Comnstructor. More...
 
 RGBDImage (const Image &color, const Image &depth, bool aligned=true)
 Parameterized Constructor. More...
 
core::Device GetDevice () const override
 Returns the device of the geometry. More...
 
 ~RGBDImage () override
 
RGBDImageClear () override
 Clear stored data. More...
 
bool IsEmpty () const override
 Is any data stored? More...
 
bool AreAligned () const
 Are the depth and color images aligned (same viewpoint and resolution)? More...
 
core::Tensor GetMinBound () const
 Compute min 2D coordinates for the data (always {0,0}). More...
 
core::Tensor GetMaxBound () const
 Compute max 2D coordinates for the data. More...
 
RGBDImage To (const core::Device &device, bool copy=false) const
 
RGBDImage Clone () const
 Returns copy of the RGBD image on the same device. More...
 
cloudViewer::geometry::RGBDImage ToLegacy () const
 Convert to the legacy RGBDImage format. More...
 
std::string ToString () const
 Text description. More...
 
- Public Member Functions inherited from cloudViewer::t::geometry::Geometry
virtual ~Geometry ()
 
GeometryType GetGeometryType () const
 Returns one of registered geometry types. More...
 
int Dimension () const
 Returns whether the geometry is 2D or 3D. More...
 
std::string GetName () const
 
void SetName (const std::string &name)
 
- Public Member Functions inherited from cloudViewer::core::IsDevice
 IsDevice ()=default
 
virtual ~IsDevice ()=default
 
bool IsCPU () const
 
bool IsCUDA () const
 
bool IsSYCL () const
 

Public Attributes

Image color_
 The color image. More...
 
Image depth_
 The depth image. More...
 
bool aligned_ = true
 Are the depth and color images aligned (same viewpoint and resolution)? More...
 

Additional Inherited Members

- Public Types inherited from cloudViewer::t::geometry::Geometry
enum class  GeometryType {
  Unspecified = 0 , PointCloud = 1 , VoxelGrid = 2 , Octree = 3 ,
  LineSet = 4 , MeshBase = 5 , TriangleMesh = 6 , HalfEdgeTriangleMesh = 7 ,
  Image = 8 , RGBDImage = 9 , TetraMesh = 10 , OrientedBoundingBox = 11 ,
  AxisAlignedBoundingBox = 12
}
 Specifies possible geometry types. More...
 
- Protected Member Functions inherited from cloudViewer::t::geometry::Geometry
 Geometry (GeometryType type, int dimension)
 Parameterized Constructor. More...
 

Detailed Description

RGBDImage A pair of color and depth images.

For most processing, the image pair should be aligned (same viewpoint and resolution).

Definition at line 21 of file RGBDImage.h.

Constructor & Destructor Documentation

◆ RGBDImage() [1/2]

cloudViewer::t::geometry::RGBDImage::RGBDImage ( )
inline

Default Comnstructor.

Definition at line 24 of file RGBDImage.h.

Referenced by To().

◆ RGBDImage() [2/2]

cloudViewer::t::geometry::RGBDImage::RGBDImage ( const Image color,
const Image depth,
bool  aligned = true 
)
inline

Parameterized Constructor.

Parameters
colorThe color image.
depthThe depth image.
alignedAre the two images aligned (same viewpoint and resolution)?

Definition at line 32 of file RGBDImage.h.

References aligned_, color, cloudViewer::t::geometry::Image::GetCols(), cloudViewer::t::geometry::Image::GetRows(), and LogWarning.

◆ ~RGBDImage()

cloudViewer::t::geometry::RGBDImage::~RGBDImage ( )
inlineoverride

Definition at line 56 of file RGBDImage.h.

Member Function Documentation

◆ AreAligned()

bool cloudViewer::t::geometry::RGBDImage::AreAligned ( ) const
inline

Are the depth and color images aligned (same viewpoint and resolution)?

Definition at line 65 of file RGBDImage.h.

References aligned_.

Referenced by cloudViewer::t::geometry::pybind_image(), and ToString().

◆ Clear()

RGBDImage & cloudViewer::t::geometry::RGBDImage::Clear ( )
overridevirtual

Clear stored data.

Implements cloudViewer::t::geometry::Geometry.

Definition at line 14 of file RGBDImage.cpp.

References cloudViewer::t::geometry::Image::Clear(), color_, and depth_.

Referenced by cloudViewer::t::geometry::pybind_image().

◆ Clone()

RGBDImage cloudViewer::t::geometry::RGBDImage::Clone ( ) const
inline

Returns copy of the RGBD image on the same device.

Definition at line 91 of file RGBDImage.h.

References color_, cloudViewer::t::geometry::Image::GetDevice(), and To().

Referenced by cloudViewer::t::geometry::pybind_image().

◆ GetDevice()

core::Device cloudViewer::t::geometry::RGBDImage::GetDevice ( ) const
inlineoverridevirtual

Returns the device of the geometry.

Implements cloudViewer::t::geometry::Geometry.

Definition at line 45 of file RGBDImage.h.

References color_, depth_, cloudViewer::t::geometry::Image::GetDevice(), LogError, and cloudViewer::core::Device::ToString().

◆ GetMaxBound()

core::Tensor cloudViewer::t::geometry::RGBDImage::GetMaxBound ( ) const
inline

◆ GetMinBound()

core::Tensor cloudViewer::t::geometry::RGBDImage::GetMinBound ( ) const
inline

Compute min 2D coordinates for the data (always {0,0}).

Definition at line 68 of file RGBDImage.h.

References cloudViewer::core::Int64, and cloudViewer::core::Tensor::Zeros().

Referenced by cloudViewer::t::geometry::pybind_image().

◆ IsEmpty()

bool cloudViewer::t::geometry::RGBDImage::IsEmpty ( ) const
overridevirtual

Is any data stored?

Implements cloudViewer::t::geometry::Geometry.

Definition at line 20 of file RGBDImage.cpp.

References color_, depth_, and cloudViewer::t::geometry::Image::IsEmpty().

Referenced by cloudViewer::t::geometry::pybind_image().

◆ To()

RGBDImage cloudViewer::t::geometry::RGBDImage::To ( const core::Device device,
bool  copy = false 
) const
inline

Transfer the RGBD image to a specified device.

Parameters
deviceThe targeted device to convert to.
copyIf true, a new image is always created; if false, the copy is avoided when the original image is already on the target device.

Definition at line 85 of file RGBDImage.h.

References aligned_, color_, copy, depth_, RGBDImage(), and cloudViewer::t::geometry::Image::To().

Referenced by Clone(), and cloudViewer::t::geometry::pybind_image().

◆ ToLegacy()

cloudViewer::geometry::RGBDImage cloudViewer::t::geometry::RGBDImage::ToLegacy ( ) const
inline

Convert to the legacy RGBDImage format.

Definition at line 94 of file RGBDImage.h.

References color_, depth_, and cloudViewer::t::geometry::Image::ToLegacy().

Referenced by cloudViewer::t::geometry::pybind_image().

◆ ToString()

Member Data Documentation

◆ aligned_

bool cloudViewer::t::geometry::RGBDImage::aligned_ = true

Are the depth and color images aligned (same viewpoint and resolution)?

Definition at line 108 of file RGBDImage.h.

Referenced by AreAligned(), cloudViewer::t::geometry::pybind_image(), RGBDImage(), and To().

◆ color_

◆ depth_


The documentation for this class was generated from the following files: