ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
FilePCD.cpp File Reference
#include <FileSystem.h>
#include <Helper.h>
#include <Logging.h>
#include <ProgressReporters.h>
#include <liblzf/lzf.h>
#include <cinttypes>
#include <cstdint>
#include <cstdio>
#include <sstream>
#include "cloudViewer/core/Dtype.h"
#include "cloudViewer/core/ParallelFor.h"
#include "cloudViewer/core/Tensor.h"
#include "cloudViewer/io/FileFormatIO.h"
#include "cloudViewer/t/io/PointCloudIO.h"
Include dependency graph for FilePCD.cpp:

Go to the source code of this file.

Classes

struct  cloudViewer::t::io::PCLPointField
 
struct  cloudViewer::t::io::PCDHeader
 
struct  cloudViewer::t::io::ReadAttributePtr
 
struct  cloudViewer::t::io::WriteAttributePtr
 

Namespaces

 cloudViewer
 Generic file read and write utility for python interface.
 
 cloudViewer::t
 
 cloudViewer::t::io
 

Enumerations

enum class  cloudViewer::t::io::PCDDataType { cloudViewer::t::io::ASCII = 0 , cloudViewer::t::io::BINARY = 1 , cloudViewer::t::io::BINARY_COMPRESSED = 2 }
 

Functions

static core::Dtype cloudViewer::t::io::GetDtypeFromPCDHeaderField (char type, int size)
 
static bool cloudViewer::t::io::InitializeHeader (PCDHeader &header)
 
static bool cloudViewer::t::io::ReadPCDHeader (FILE *file, PCDHeader &header)
 
static void cloudViewer::t::io::ReadASCIIPCDColorsFromField (ReadAttributePtr &attr, const PCLPointField &field, const char *data_ptr, const int index)
 
template<typename scalar_t >
static void cloudViewer::t::io::UnpackASCIIPCDElement (scalar_t &data, const char *data_ptr)=delete
 
template<>
void cloudViewer::t::io::UnpackASCIIPCDElement< float > (float &data, const char *data_ptr)
 
template<>
void cloudViewer::t::io::UnpackASCIIPCDElement< double > (double &data, const char *data_ptr)
 
template<>
void cloudViewer::t::io::UnpackASCIIPCDElement< std::int8_t > (std::int8_t &data, const char *data_ptr)
 
template<>
void cloudViewer::t::io::UnpackASCIIPCDElement< std::int16_t > (std::int16_t &data, const char *data_ptr)
 
template<>
void cloudViewer::t::io::UnpackASCIIPCDElement< std::int32_t > (std::int32_t &data, const char *data_ptr)
 
template<>
void cloudViewer::t::io::UnpackASCIIPCDElement< std::int64_t > (std::int64_t &data, const char *data_ptr)
 
template<>
void cloudViewer::t::io::UnpackASCIIPCDElement< std::uint8_t > (std::uint8_t &data, const char *data_ptr)
 
template<>
void cloudViewer::t::io::UnpackASCIIPCDElement< std::uint16_t > (std::uint16_t &data, const char *data_ptr)
 
template<>
void cloudViewer::t::io::UnpackASCIIPCDElement< std::uint32_t > (std::uint32_t &data, const char *data_ptr)
 
template<>
void cloudViewer::t::io::UnpackASCIIPCDElement< std::uint64_t > (std::uint64_t &data, const char *data_ptr)
 
static void cloudViewer::t::io::ReadASCIIPCDElementsFromField (ReadAttributePtr &attr, const PCLPointField &field, const char *data_ptr, const int index)
 
static void cloudViewer::t::io::ReadBinaryPCDColorsFromField (ReadAttributePtr &attr, const PCLPointField &field, const void *data_ptr, const int index)
 
static void cloudViewer::t::io::ReadBinaryPCDElementsFromField (ReadAttributePtr &attr, const PCLPointField &field, const void *data_ptr, const int index)
 
static bool cloudViewer::t::io::ReadPCDData (FILE *file, PCDHeader &header, t::geometry::PointCloud &pointcloud, const ReadPointCloudOption &params)
 
static void cloudViewer::t::io::SetPCDHeaderFieldTypeAndSizeFromDtype (const core::Dtype &dtype, PCLPointField &field)
 
static bool cloudViewer::t::io::GenerateHeader (const t::geometry::PointCloud &pointcloud, const bool write_ascii, const bool compressed, PCDHeader &header)
 
static bool cloudViewer::t::io::WritePCDHeader (FILE *file, const PCDHeader &header)
 
template<typename scalar_t >
static void cloudViewer::t::io::ColorToUint8 (const scalar_t *input_color, std::uint8_t *output_color)
 
template<>
void cloudViewer::t::io::ColorToUint8< float > (const float *input_color, std::uint8_t *output_color)
 
template<>
void cloudViewer::t::io::ColorToUint8< double > (const double *input_color, std::uint8_t *output_color)
 
template<>
void cloudViewer::t::io::ColorToUint8< std::uint8_t > (const std::uint8_t *input_color, std::uint8_t *output_color)
 
template<>
void cloudViewer::t::io::ColorToUint8< std::uint16_t > (const std::uint16_t *input_color, std::uint8_t *output_color)
 
template<>
void cloudViewer::t::io::ColorToUint8< std::uint32_t > (const std::uint32_t *input_color, std::uint8_t *output_color)
 
static core::Tensor cloudViewer::t::io::PackColorsToFloat (const core::Tensor &colors_contiguous)
 
template<typename scalar_t >
static int cloudViewer::t::io::WriteElementDataToFileASCII (const scalar_t &data, FILE *file)=delete
 
template<>
int cloudViewer::t::io::WriteElementDataToFileASCII< float > (const float &data, FILE *file)
 
template<>
int cloudViewer::t::io::WriteElementDataToFileASCII< double > (const double &data, FILE *file)
 
template<>
int cloudViewer::t::io::WriteElementDataToFileASCII< std::int8_t > (const std::int8_t &data, FILE *file)
 
template<>
int cloudViewer::t::io::WriteElementDataToFileASCII< std::int16_t > (const std::int16_t &data, FILE *file)
 
template<>
int cloudViewer::t::io::WriteElementDataToFileASCII< std::int32_t > (const std::int32_t &data, FILE *file)
 
template<>
int cloudViewer::t::io::WriteElementDataToFileASCII< std::int64_t > (const std::int64_t &data, FILE *file)
 
template<>
int cloudViewer::t::io::WriteElementDataToFileASCII< std::uint8_t > (const std::uint8_t &data, FILE *file)
 
template<>
int cloudViewer::t::io::WriteElementDataToFileASCII< std::uint16_t > (const std::uint16_t &data, FILE *file)
 
template<>
int cloudViewer::t::io::WriteElementDataToFileASCII< std::uint32_t > (const std::uint32_t &data, FILE *file)
 
template<>
int cloudViewer::t::io::WriteElementDataToFileASCII< std::uint64_t > (const std::uint64_t &data, FILE *file)
 
static bool cloudViewer::t::io::WritePCDData (FILE *file, const PCDHeader &header, const geometry::PointCloud &pointcloud, const WritePointCloudOption &params)
 
bool cloudViewer::t::io::ReadPointCloudFromPCD (const std::string &filename, t::geometry::PointCloud &pointcloud, const ReadPointCloudOption &params)
 
bool cloudViewer::t::io::WritePointCloudToPCD (const std::string &filename, const geometry::PointCloud &pointcloud, const WritePointCloudOption &params)