# ScannerConfig Source: https://www.nianticspatial.com/docs/api/kotlin/com.nianticspatial.nsdk.ScannerConfig/ ScannerConfig --- ## Declaration class ScannerConfig ## Summary Configuration parameters for scanning functionality. ScannerConfig allows you to customize scan recording behavior including recording framerate, visualization settings, depth range, and output resolution. Use this class to optimize scanning performance for your specific use case. ## Basic Usage ```kotlin val config = ScannerConfig( framerate = 30, enableRaycastVisualization = true, enableVoxelVisualization = true ) scanningSession.configure(config) ``` ## See also ScanningSession.configure --- ## Properties | Name | Type | Summary | | --- | --- | --- | | basePath | String? | Optional field to set a base path for writing scan data.If an absolute path (starting with '/', '', or a drive name) is provided, the directorymust be writeable by the application. All other paths will be interpreted as relative tothe public application path configured when the NSDK object was created. If left `null`,NSDK uses the public application path which was configured when creating the NSDK object.**Default:** `null` | | enableFullResolution | Boolean | Controls whether full-resolution camera images are recorded.When `true`, the scanning feature will record a JPEG image that is the same resolutionas the raw camera image passed to the NSDK session with the `sendFrame` function.When `false`, the scanning feature records a 720x540 resolution JPEG imagegenerated by cropping and/or scaling and compressing the raw camera image.**Note:** Compressing the camera image to JPEG format is relatively expensive,so enable this option with that in mind.**Note:** The quality of voxel and raycast visualizations is not affected by this value.**Default:** `false` | | enableRaycastVisualization | Boolean | Controls whether raycast visualization images are generated.When `true`, images for the raycast visualization will be generated each time a new inputframe is available. The scanning feature provides buffers that can be used to generatea 2D image that visualizes what parts of the scene have been thoroughly scanned.**Default:** `false` | | enableVoxelVisualization | Boolean | Controls whether voxel visualization is enabled.When `true`, voxels can be computed, and computed voxels will be updated each time anew input frame is available.**Default:** `false` | | farDepth | Float | Far depth plane for scan depth range, in meters.This parameter controls the farthest distance at which depth data will be integrated.Objects farther than this distance will not be visible in visualization or reconstruction.This does not affect the range of the recorded depth frames. If set to `0.0`, this isconfigured to 5.0 m in the default configuration. Values greater than 5.0 m are notrecommended. Must be greater than [nearDepth], or set to `0` to use the default range.**Default:** `0.0f` (defaults to 5.0 m) | | framerate | Int | Target FPS for recording and visualization processes.The target framerate is the cap for how often the feature will process new input frames.The actual framerate may differ. If set to `0`, this defaults to 30 FPS. The recordingFPS cannot exceed the rate at which frames are delivered to the scanning session.**Note:** Recording NSDK depth with [useNsdkDepthsIfPlatformUnavailable] can result in alower recording FPS than the target framerate.**Default:** `0` (defaults to 30 FPS) | | fullResolutionFramerate | Int | Target FPS for full resolution frame recording.The target framerate for recording full resolution frames when [enableFullResolution]is `true`. The actual framerate for full-resolution frames may differ from the targetframerate.**Note:** Recording NSDK depth with [useNsdkDepthsIfPlatformUnavailable] can result in alower recording FPS than the target framerate.**Default:** `0` (defaults to 2 FPS) | | nearDepth | Float | Near depth plane for scan depth range, in meters.This parameter controls the closest distance at which depth data will be integrated.Objects closer than this distance will not be visible in visualization or reconstruction.This does not affect the range of the recorded depth frames. If set to `-1.0`, this isconfigured to 0.02 m in the default configuration. Must be greater than or equal to 0and less than [farDepth], or set to `-1.0` to use the default range.**Default:** `0.02f` | | raycastHeight | Int | Height of the raycast visualization's output image in pixel units.The output quality is bound by both the configured resolution and the quality of theunderlying 3D reconstruction data. On devices without native depth support, the data isunlikely to be sufficient to support resolutions above 256x144.**Default:** `0` (defaults to 144 pixels) | | raycastWidth | Int | Width of the raycast visualization's output image in pixel units.The output quality is bound by both the configured resolution and the quality of theunderlying 3D reconstruction data. On devices without native depth support, the data isunlikely to be sufficient to support resolutions above 256x144.**Default:** `0` (defaults to 256 pixels) | | recordAllSensors | Boolean | Whether to record all sensors.When `true`, all sensors will be recorded. When `false`, only the first sensor will be recorded.**Default:** `false` | | scanTargetId | String? | Optional field to set a scan target identifier for use with Niantic Spatial's mappingservices.**Default:** `null` | | useNsdkDepthsIfPlatformUnavailable | Boolean | Whether to use and record NSDK's estimated depths, if platform depths are unavailable.Depths are recorded as part of the scan data, and are also required to generate voxelsor raycast visualization images. If NSDK was configured to use platform depths, thisvalue is ignored, and depths are expected to come through the scanning session.Otherwise:- When `true`, NSDK will generate estimated depths for use by the scanning feature- When `false`, the scanning feature will not be able to generate voxels or raycastvisualization images, but will still be able to record other scan data.**Attention:** If NSDK depth is being recorded because [useNsdkDepthsIfPlatformUnavailable]is `true` and lidar is unavailable, the recording FPS will be limited to the update rateof the depth feature, which defaults to 10 FPS. To change the update rate of the depthfeature, set [DepthConfig.framerate] to match [framerate].**Default:** `false` | | voxelSize | Float | Minimum size of voxels for the voxel visualization, in meters.This parameter controls the resolution of the voxel grid used for voxel visualization.Smaller values result in higher resolution but require more memory and computation.Larger values result in lower resolution but are more efficient. The actual voxel sizemay become larger due to memory constraints, so this is only a minimum value.**Default:** `0.0f` (defaults to 0.01 m) | ---