Skip to main content
API Reference SwiftyNsdk

NsdkRecordingExporter

A session for exporting scan recordings to various formats....

Declaration

final class NsdkRecordingExporter

Summary

A session for exporting scan recordings to various formats. NsdkRecordingExporter provides capabilities for converting saved scan data into recorderV2 format for use in Unity Playback or activating VPS.


Methods

NameTypeSummary
exportString
Exports a scan recording asynchronously.
Starts the export process for a scan recording and suspends until the export
completes successfully, fails, or times out.
- Parameters:
- scanPath: The path to the directory containing the raw scan files to export. This
is obtained from the return value ofNsdkScanningSession/saveInfo().
The export will be written to a .tgz file inside this directory.
- scanId: The unique identifier of the scan to export.
- userData: Dictionary containing custom metadata to include in the export.
- exportAsVideo: If true, the RGB frames in the scan will be exported as an
.mp4 video. If false, they will be individual image files.
- exportResolution: Resolution option for exported images (default: ExportResolution/high).
- pollingInterval: Time between progress checks (default: 0.5s).
- timeout: Maximum duration to wait before failing (default: 5 minutes).
- Returns: The file path to the exported recording.
- Throws:
- CancellationError if the Task running this function was cancelled.
- TimeoutError if the function timed out before it could complete execution.
exportSplitArchives[String]
Exports a scan recording as multiple archive files asynchronously.
Starts the export process for a scan recording and suspends until the export
completes successfully, fails, or times out.
- Parameters:
- scanPath: The path to the directory containing the raw scan files to export. This
is obtained from the return value ofNsdkScanningSession/saveInfo().
The export will be written to a .tgz file inside this directory.
- scanId: The unique identifier of the scan to export.
- maxFramesPerArchive: The maximum number of frames to include in each archive of the
exported recording. Must be greater than 0.
- userData: Dictionary containing custom metadata to include in the export.
- exportAsVideo: If true, the RGB frames in the scan will be exported as an
.mp4 video. If false, they will be individual image files.
- exportResolution: Resolution option for exported images (default: ExportResolution/high).
- pollingInterval: Time between progress checks (default: 0.5s).
- timeout: Maximum duration to wait before failing (default: 5 minutes).
- Returns: A list of file paths to the exported recording.
- Throws:
- CancellationError if the Task running this function was cancelled.
- TimeoutError if the function timed out before it could complete execution.