62 lines
1.6 KiB
C
62 lines
1.6 KiB
C
|
|
#ifndef POINT_CLOUD_LOADER_H
|
||
|
|
#define POINT_CLOUD_LOADER_H
|
||
|
|
|
||
|
|
#include "../../include/VZNL_Types.h"
|
||
|
|
#include "../../src/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
|
||
|
|
);
|
||
|
|
|
||
|
|
#endif // POINT_CLOUD_LOADER_H
|