![]() |
CamSim
0.0.0
A rasterization-based simulator for various types of cameras
|
Export simulation results to various file formats. More...
Public Member Functions | |
| Exporter () | |
| Constructor. More... | |
| bool | exportData (const QString &fileName, FileFormat format, const QList< TexData > &dataList, const QList< QList< int >> &channelsList=QList< QList< int >>(), int compressionLevel=0) |
| Same as exportData for multiple data sets, but you can choose the file format explicitly. More... | |
| bool | asyncExportData (const QString &fileName, const TexData &data, const QList< int > &channels=QList< int >(), int compressionLevel=0) |
| Same as exportData, but the export is started asynchronously in a separate thread and this function returns immediately. More... | |
| bool | asyncExportData (const QString &fileName, FileFormat format, const TexData &data, const QList< int > &channels=QList< int >(), int compressionLevel=0) |
| Same as asyncExportData, but you can choose the file format explicitly. More... | |
| bool | asyncExportData (const QString &fileName, const QList< TexData > &dataList, const QList< QList< int >> &channelsList=QList< QList< int >>(), int compressionLevel=0) |
| Same as asyncExportData, but for multiple data sets destined for the same file. More... | |
| bool | asyncExportData (const QString &fileName, FileFormat format, const QList< TexData > &dataList, const QList< QList< int >> &channelsList=QList< QList< int >>(), int compressionLevel=0) |
| Same as asyncExportData, but you can choose the file format explicitly. More... | |
| bool | waitForAsyncExports () |
| Wait for all asynchronous exports to finish. Returns true if all of them were successful, and false if at least one of them failed. More... | |
Static Public Member Functions | |
| static bool | isFileFormatSupported (FileFormat format) |
| Return whether the given file format is supported (it may not be if a library was missing at build time) More... | |
| static bool | isFileFormatCompatible (FileFormat format, const TexData &data, const QList< int > &channels=QList< int >()) |
| Return whether the given file format can store the subset of the data that is selected by channels. More... | |
| static FileFormat | fileFormatFromName (const QString &fileName) |
| Return a file format based on fileName. More... | |
| static bool | exportData (const QString &fileName, const TexData &data, const QList< int > &channels=QList< int >(), int compressionLevel=0) |
| Export the data to the file named fileName. Optionally select a list of channels to export. More... | |
| static bool | exportData (const QString &fileName, FileFormat format, const TexData &data, const QList< int > &channels=QList< int >(), int compressionLevel=0) |
| Same as exportData, but you can choose the file format explicitly. More... | |
| static bool | exportData (const QString &fileName, const QList< TexData > &dataList, const QList< QList< int >> &channelsList=QList< QList< int >>(), int compressionLevel=0) |
| Same as exportData, but for multiple data sets destined for the same file. More... | |
Export simulation results to various file formats.
| CamSim::Exporter::Exporter | ( | ) |
Constructor.
|
inline |
Same as asyncExportData, but for multiple data sets destined for the same file.
|
inline |
Same as exportData, but the export is started asynchronously in a separate thread and this function returns immediately.
You can use this to make best use of both the GPU and your CPU cores: export all of the data from the last simulated frame while simulating the new frame. This is useful especially for compressing file formats where the export eats a lot of CPU cycles.
This function returns success if the export was successfully launched.
Call waitForAsyncExports to wait for all asynchronously started exports to finish.
|
inline |
Same as asyncExportData, but you can choose the file format explicitly.
|
inline |
Same as asyncExportData, but you can choose the file format explicitly.
|
inlinestatic |
Same as exportData, but for multiple data sets destined for the same file.
|
inlinestatic |
Export the data to the file named fileName. Optionally select a list of channels to export.
The file format is determined automatically from the filename, see fileFormatFromName().
If the file already exists, the data is appended to it (RAW, PFS, GTA). Otherwise, the existing file is overwritten (CSV, PNG, MAT).
If channels is empty, all the channels contained in data are exported.
The effect of the compressionLevel parameter depends on the file format. Values between 0 and 9 are allowed, where 0 corresponds to no compression and 9 to best compression.
Return true on success, false on error.
Example: exportData("file.csv", data, { 0, 1, 2 });
|
inline |
Same as exportData for multiple data sets, but you can choose the file format explicitly.
|
inlinestatic |
Same as exportData, but you can choose the file format explicitly.
|
static |
Return a file format based on fileName.
|
static |
Return whether the given file format can store the subset of the data that is selected by channels.
|
static |
Return whether the given file format is supported (it may not be if a library was missing at build time)
| bool CamSim::Exporter::waitForAsyncExports | ( | ) |
Wait for all asynchronous exports to finish. Returns true if all of them were successful, and false if at least one of them failed.
1.8.16