Pinchot C# Scanning API¶
This high level document covers the main objects, methods, and properties related to how the Pinchot API performs 3D laser scanning using ScanSystem, ScanHead, and IProfile objects. Refer to the Connection Guide for establishing connections before scanning.
High-Level Overview¶
Scanning is the process of acquiring 3D profile data from one or more ScanHead devices coordinated by a ScanSystem. The Pinchot API provides two scanning modes:
- Frame Scanning (recommended): Organizes profiles from multiple scan heads into synchronized frames for easier processing
- Low-Level Scanning: Provides individual profile access for maximum control and performance
Scanning Requirements¶
Before scanning can begin, the following prerequisites must be met:
- Connection: All scan heads must be connected via
ScanSystem.Connect - Configuration: Scan heads must be configured with windows, alignment, and laser settings
- Phase Table: A phase table must be created to coordinate laser/camera timing across scan heads
Data Transmission¶
Scan data is transmitted over TCP/IP from each scan head to the client application. The API automatically handles:
- Profile Assembly: Raw scan data is assembled into complete
IProfileobjects - Coordinate Transformation: Camera coordinates are transformed to real-world coordinates using alignment parameters
- Data Buffering: Profiles are buffered in memory queues for consumption by the application
- Synchronization: Frame scanning ensures profiles from different scan heads are properly synchronized
Scanning Modes Comparison¶
| Feature | Frame Scanning | Low-Level Scanning |
|---|---|---|
| Ease of Use | High - automatic synchronization | Medium - manual coordination required |
| Performance | Good - optimized for most applications | Excellent - maximum throughput |
| CPU Distribution | Single consumer thread | Multiple threads (one per scan head) |
| Data Organization | Organized frames with slots | Individual profiles |
| Recommended For | Most applications, multi-head systems | High-performance, single-head systems |
Relevant API Calls¶
Core Scanning Methods¶
ScanSystem.StartScanning(uint, DataFormat, ScanningMode)ScanSystem.StartScanning(StartScanningOptions)ScanSystem.StopScanning()ScanSystem.GetMinScanPeriod()
Phase Table Configuration¶
ScanSystem.AddPhase()ScanSystem.AddPhaseElement(uint, Camera)ScanSystem.AddPhaseElement(uint, Laser)ScanSystem.ClearPhaseTable()
Frame Scanning Data Access¶
ScanSystem.TakeFrame(CancellationToken)ScanSystem.TryTakeFrame(out IFrame, TimeSpan, CancellationToken)ScanSystem.ClearFrames()
Low-Level Scanning Data Access¶
ScanHead.TakeNextProfile(CancellationToken)ScanHead.TryTakeNextProfile(out IProfile, TimeSpan, CancellationToken)ScanHead.ClearProfiles()
Data Structures¶
IProfile- Individual scan profile dataIFrame- Collection of synchronized profilesPoint2D- 3D point data with brightnessDataFormat- Profile data format optionsScanningMode- Frame vs Profile scanning modes