/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// // RxRcsFileServices.h - interface of module that handles .rcs/.rcp files #ifndef __OD_RCSFILESERVICES_MODULE__ #define __OD_RCSFILESERVICES_MODULE__ #include "RxModule.h" #include "RootExport.h" #include "TD_PackPush.h" #include "SharedPtr.h" #include "UInt32Array.h" #include "OdStreamBuf.h" #include "OdPointCloudScanDatabase.h" #include "OdPointCloudProjectDatabase.h" #include "OdPointCloudConverter.h" #include "OdRcsDataManager.h" #include "OdPointCloudDatabaseReceiver.h" #include "OdPointCloudProjectScanStorage.h" #include "OdRcpFileWriter.h" #include "TPointCloudModuleNames.h" /** \details This is an interface class for the module that provides loading point cloud data from and to .rcs/.rcp files. \remarks Corresponding C++ library: RcsFileServices. */ class ODRX_ABSTRACT FIRSTDLL_EXPORT OdRxRcsFileServices : public OdRxModule { public: /** \details Creates a new point cloud scan database object and populates it with the data read from a point cloud scan file (.rcs file) specified by its file path. \param filePath [in] Path to the .rcs file. \param pDbReceiver [out] (optional) Point cloud database receiver. \returns The pointer to the OdPointCloudScanDatabase object. */ virtual OdPointCloudScanDatabasePtr readRcsFile(const OdString& filePath, OdPointCloudDatabaseReceiver* pDbReceiver = nullptr) const = 0; /** \details Creates a new point cloud scan database object and populates it with the data read from a point cloud scan file (.rcs file) represented by stream. \param pFile [in] Stream corresponding to .rcs file. \param pDbReceiver [out] (optional) Point cloud database receiver. \returns The pointer to the OdPointCloudScanDatabase object. */ virtual OdPointCloudScanDatabasePtr readRcsFile(OdStreamBufPtr pFile, OdPointCloudDatabaseReceiver* pDbReceiver = nullptr) const = 0; /** \details Creates a new point cloud project database object and populates it with the data from the corresponding point cloud project file (.rcp file) specified by its file path. \param filePath [in] Path to the .rcp file. \param pScanStorage [out] Point cloud project scan storage. \param pDbReceiver [out] (optional) Point cloud database receiver. \returns The pointer to the OdPointCloudProjectDatabase object. */ virtual OdPointCloudProjectDatabasePtr readRcpFile(const OdString& filePath, OdPointCloudProjectScanStorage* pScanStorage, OdPointCloudDatabaseReceiver* pDbReceiver = nullptr) const = 0; /** \details Creates a new point cloud project database object and populates it with the data from the corresponding point cloud project file (.rcp file) represented by stream. \param pFile [in] Stream corresponding to .rcp file. \param pScanStorage [out] Point cloud project scan storage. \param pDbReceiver [out] (optional) Point cloud database receiver. \returns The pointer to the OdPointCloudProjectDatabase object. */ virtual OdPointCloudProjectDatabasePtr readRcpFile(OdStreamBufPtr pFile, OdPointCloudProjectScanStorage* pScanStorage, OdPointCloudDatabaseReceiver* pDbReceiver = nullptr) const = 0; /** \details Creates a new point cloud converter with user implemented data source and with converter parameters to convert user point cloud data to .rcs file. \param pDataSource [in] Pointer to point cloud data source instance. \param pParams [in] Pointer to conversion parameters. \returns The pointer to the OdPointCloudConverter object. */ virtual OdPointCloudConverterPtr getPointCloudConverter(OdPointCloudDataSourcePtr pDataSource, OdPointCloudConverterParamsPtr pParams = nullptr) const = 0; /** \details Creates a new data manager object for the specified point cloud scan database. \param pScanDb [in] Pointer to the point cloud scan database. \param pHostProjectDb [in] Pointer to the host point cloud project database. \returns The pointer to OdRcsDataManager object. */ virtual OdRcsDataManagerPtr getRcsDataManager(OdPointCloudScanDatabasePtr pScanDb, OdPointCloudProjectDatabasePtr pHostProjectDb = nullptr) const = 0; /** \details Creates a point cloud data source for the specified point cloud file. \param filePath [in] Path to the point cloud file. \param units [in] Measurement units for the point cloud coordinates. \param defaultColor [in] Default color of points in the point cloud. \param colorRange [in] Color range for points in the point cloud. Only for pts and xyz (optional). \param xyzIndexes [in] Indexes of points coordinates in each point data, e.g. { 0, 1, 2 }. Only for pts and xyz (optional). \param rgbIndexes [in] Indexes of points colors components in each point data, e.g. { 4, 5, 6 }. Only for pts and xyz (optional). \param intensity [in] Index of intensity component in each point data, e.g. 3. Only for pts and xyz (optional). \param skipLines [in] Number of lines in the file above the points data. Only for xyz (optional). \param separator [in] Separator between each point' fields. Only for xyz (optional). \returns The pointer to OdPointCloudDataSource object. */ virtual OdPointCloudDataSourcePtr getPointCloudDataSource(const OdString& filePath, OdPointCloudDataSource::Units units = OdPointCloudDataSource::kMeter, ODCOLORREF defaultColor = 0, OdPointCloudDataSource::ColorRange colorRange = OdPointCloudDataSource::kColorRange255, const OdUInt32Array& xyzIndexes = {}, const OdUInt32Array& rgbIndexes = {}, OdUInt32 intensityIndex = OdUInt32(-1), OdUInt32 skipLines = 0, const OdString& separator = " ") const = 0; /** \details */ virtual OdRcpFileWriterPtr getRcpFileWriter() const = 0; }; /** \details Smart pointer to objects of the class. */ typedef OdSmartPtr OdRxRcsFileServicesPtr; #include "TD_PackPop.h" #endif // __OD_RCSFILESERVICES_MODULE__