80 lines
2.0 KiB
C
80 lines
2.0 KiB
C
#ifndef POINT_CLOUD_LOADER_H
|
|
#define POINT_CLOUD_LOADER_H
|
|
|
|
#include "VZNL_Types.h"
|
|
#include "ErrorCodes.h"
|
|
|
|
/**
|
|
* @brief Load point cloud from TXT file
|
|
*
|
|
* @param [in] filename Path to TXT file
|
|
* @param [out] outPoints Output point array (allocated by function)
|
|
* @param [out] outRows Output row count
|
|
* @param [out] outCols Output column count
|
|
* @param [out] errCode Error code output
|
|
* @return 0 on success, non-zero on error
|
|
*
|
|
* @pre filename != nullptr
|
|
* @pre outPoints != nullptr
|
|
* @pre outRows != nullptr
|
|
* @pre outCols != nullptr
|
|
* @pre errCode != nullptr
|
|
*
|
|
* @post If return value is 0, outPoints contains allocated array
|
|
* @post Caller must free outPoints using delete[]
|
|
*/
|
|
int LoadTxtFile(
|
|
const char* filename,
|
|
SVzNLPointXYZ** outPoints,
|
|
int* outRows,
|
|
int* outCols,
|
|
int* errCode
|
|
);
|
|
|
|
/**
|
|
* @brief Load point cloud from PCD file
|
|
*
|
|
* @param [in] filename Path to PCD file
|
|
* @param [out] outPoints Output point array (allocated by function)
|
|
* @param [out] outRows Output row count
|
|
* @param [out] outCols Output column count
|
|
* @param [out] errCode Error code output
|
|
* @return 0 on success, non-zero on error
|
|
*
|
|
* @pre filename != nullptr
|
|
* @pre outPoints != nullptr
|
|
* @pre outRows != nullptr
|
|
* @pre outCols != nullptr
|
|
* @pre errCode != nullptr
|
|
*
|
|
* @post If return value is 0, outPoints contains allocated array
|
|
* @post Caller must free outPoints using delete[]
|
|
*/
|
|
int LoadPcdFile(
|
|
const char* filename,
|
|
SVzNLPointXYZ** outPoints,
|
|
int* outRows,
|
|
int* outCols,
|
|
int* errCode
|
|
);
|
|
|
|
/**
|
|
* @brief Save point cloud to TXT file
|
|
*
|
|
* @param [in] filename Path to output TXT file
|
|
* @param [in] points Input point array
|
|
* @param [in] rows Row count
|
|
* @param [in] cols Column count
|
|
* @param [out] errCode Error code output
|
|
* @return 0 on success, non-zero on error
|
|
*/
|
|
int SaveTxtFile(
|
|
const char* filename,
|
|
const SVzNLPointXYZ* points,
|
|
int rows,
|
|
int cols,
|
|
int* errCode
|
|
);
|
|
|
|
#endif // POINT_CLOUD_LOADER_H
|