SBSDK 3.3.5
Polyga’s SB SDK is a set of programmable API’s that allow users to directly communicate and control any of Polyga’s 3D scanners using C++, C# or Command line.
ISBScanner.h
Go to the documentation of this file.
1
2
11#pragma once
12
13#include "SBSDK_API.h"
14#include "SBTypes.h"
15#include "SBEventHandler.h"
16#include "SBData.h"
17#include <vector>
18
19namespace SBSDK3
20{
27 {
28 protected:
30
31 public:
37 virtual ~ISBScanner();
43 virtual SBStatus connect();
55 virtual bool isConnected();
56
61 virtual bool isCapturing();
62
74 virtual uint32_t getSerial();
80 virtual bool isColorSupported();
88 virtual SBStatus getCameraResolution(uint32_t& width, uint32_t& height);
89
96 virtual SBStatus setCameraExposure(double exposure);
103 virtual SBStatus getCameraExposure(double& exposure);
104
112 virtual SBStatus getCameraExposureMinMax(double& min, double& max);
113
120 virtual SBStatus setCameraGain(double gain);
127 virtual SBStatus getCameraGain(double& gain);
135 virtual SBStatus getCameraGainMinMax(double& min, double& max);
143 virtual SBStatus autoWhiteBalance(const double exposure);
153 virtual SBStatus setWhiteBalance(const float red, const float green, const float blue);
163 virtual SBStatus getWhiteBalance(float& red, float& green, float& blue);
170 virtual SBStatus setProjectorBrightness(double brightness);
177 virtual SBStatus getProjectorBrightness(double& brightness);
213 virtual SBStatus enableEvent(SBEventEnums scannerEvent, bool enable);
227
235
244
254 virtual SBStatus captureScanImagesHDR(SBScan& scan, int numsteps, double interval, SBCaptureParams captureParams = SBCaptureParams());
255
263 virtual SBStatus scan(SBMesh& mesh, SBProcessParams processParams = SBProcessParams(), SBCaptureParams captureParams = SBCaptureParams());
264
273 virtual SBStatus scan(SBMesh& mesh, SBScan& scan, SBProcessParams processParams = SBProcessParams(), SBCaptureParams captureParams = SBCaptureParams());
274
284 virtual SBStatus scanHDR(SBMesh& mesh, int numsteps, double interval, SBProcessParams processParams = SBProcessParams(), SBCaptureParams captureParams = SBCaptureParams());
285
296 virtual SBStatus scanHDR(SBMesh& mesh, SBScan& scan, int numsteps, double interval, SBProcessParams processParams = SBProcessParams(), SBCaptureParams params = SBCaptureParams());
297
306 virtual SBStatus startScanStream(SBProcessParams processParams, bool rgbTexture, SBScanHandler* handler = NULL);
307
315 virtual SBStatus grabOne(SBMesh& mesh, SBScan& scan);
316
317
324
329 virtual SBStatus setFocusLaser(bool enable);
330
351 virtual SBStatus setZFilter(float zNear, float zFar);
359 virtual SBStatus getZFilter(float& zNear, float& zFar);
360
366 virtual SBStatus getCalibration(SBCalib& calibHandle);
367
375 virtual SBStatus getTextureResolution(uint32_t& width, uint32_t& height);
376
384 virtual SBStatus captureTexturePreview(SBImage& image, double exposureTime);
385
392
402 virtual SBStatus traceMarker(SBVector& coord, const float x1, const float y1, const float x2, const float y2);
403
410
417
424
439 virtual SBStatus autoExposure(const uint32_t xMin, const uint32_t yMin, const uint32_t xMax, const uint32_t yMax, const double minExposure, const double maxExposure, const uint32_t numSteps, const bool autoProjectorBrightness, const double maxOverexposedPercentage = 0.01);
440 };
441}
SBData Header File. Class definitions for SBImage, SBScan, SBMesh and SBCalib.
SBEventHandler Header File. Event handling class definition for callback and trigger events.
SBSDK API dll imports.
#define SBSDK_API
Definition: SBSDK_API.h:15
SBTypes Header File. Structure types and Class Enum types defining parameter options and device infor...
Interface with Scan Box Scanner instances.
Definition: ISBScanner.h:27
virtual SBStatus getTextureResolution(uint32_t &width, uint32_t &height)
Returns if the information was acquired correctly.
virtual SBStatus getZFilter(float &zNear, float &zFar)
Gets the depth range to filter the scan data. Returns False if command fails.
virtual SBStatus captureTexturePreview(SBImage &image, double exposureTime)
Captures an texture image. Returns False if it failed or does not have texture camera.
virtual SBStatus setExternalFlashForTexturePreview(bool enable)
Enable/Disable the flash during capturing texture preview.
virtual SBStatus setProjectorPattern(SBProjectorPatternEnums pattern)
Sets projector pattern. Returns False if command fails.
virtual SBStatus enableEvent(SBEventEnums scannerEvent, bool enable)
Enabling an event type. Returns False if command fails.
virtual SBStatus scanHDR(SBMesh &mesh, int numsteps, double interval, SBProcessParams processParams=SBProcessParams(), SBCaptureParams captureParams=SBCaptureParams())
Captures sets of images using different camera exposure steps processes them returning both scan data...
virtual SBStatus getWhiteBalance(float &red, float &green, float &blue)
Recalls white balance values. Returns False if command fails. Only available for scanners supporting ...
virtual SBStatus captureLiveViewImages(SBImageList &images)
Captures live view images from the cameras. It captures 3 images if there is an designated texture ca...
virtual SBStatus getCalibration(SBCalib &calibHandle)
Gets calibration.
virtual bool isColorSupported()
Returns whether the scanner supports color texture.
virtual SBStatus registerEventHandler(SBEventHandler *handler)
Registring an event handler. Returns False if command fails.
virtual SBStatus startScanStream(SBProcessParams processParams, bool rgbTexture, SBScanHandler *handler=NULL)
Starts a scan stream using the registered SBScanHandler. Returns False if command fails.
virtual SBStatus captureScanImages(SBScan &scan, SBCaptureParams captureParams=SBCaptureParams())
Captures a set of scan images and stores them inside the SBScan output param. Returns False if comman...
virtual SBStatus captureScanImagesHDR(SBScan &scan, int numsteps, double interval, SBCaptureParams captureParams=SBCaptureParams())
Captures a set of scan images for an HDR scan and stores them inside the SBScan output param....
virtual SBStatus stopScanStream()
Stops the scan stream. Returns False if command fails.
virtual SBStatus setWhiteBalance(const float red, const float green, const float blue)
Recalculates and sets White balance values using the input balance RGB ratios. Returns False if comma...
virtual SBStatus getCameraGainMinMax(double &min, double &max)
Camera gain range min and max. Returns False if command fails.
virtual SBStatus getTextureCalibration(SBCalib &calibHandle)
Gets calibration data for texture camera.
virtual SBStatus grabOne(SBMesh &mesh, SBScan &scan)
Grabs a scan data from internal buffer. Return Failed when buffer is empty.
virtual SBStatus executeSoftwareTrigger()
Triggers software trigger. Required to set trigger mode to Software.
virtual SBStatus setCameraGain(double gain)
Sets Camera gain. Returns False if command fails.
virtual SBStatus getProjectorColor(SBProjectorColorEnums &color)
Gets projector color. Returns False if command fails.
virtual uint32_t getSerial()
Returns serial number of the scanner.
virtual SBStatus traceMarker(SBVector &coord, const float x1, const float y1, const float x2, const float y2)
Gets the 3D coordinate of a point on the scanned 3D model by using two 2D coordinates (distorted) of ...
virtual SBStatus autoExposure()
Setting camera exposure value(for scan and live view) automatically for C50x scanner models....
virtual SBStatus connect()
Establish communication with the ISBScanner Object.
virtual SBStatus getProjectorPattern(SBProjectorPatternEnums &pattern)
Gets projector pattern. Returns False if command fails.
virtual SBStatus setZFilter(float zNear, float zFar)
Sets the depth range to filter the scan data. Returns False if command fails.
virtual SBScannerModelEnums getScannerModel()
Returns an SBScannerModelEnums corresponding to a SBScanner model.
virtual SBStatus setProjectorBrightness(double brightness)
Sets projector brightness. Returns False if command fails.
virtual SBStatus projectSplashPattern(SBProjectorPatternEnums pattern)
Project a designated splash pattern.
virtual bool isConnected()
Verifies connection has been established with the device.
virtual SBStatus setFocusLaser(bool enable)
Enable/Disable the focus laser(For H3).
virtual SBStatus autoWhiteBalance(const double exposure)
Calculates and sets the optimal white balace value. Returns False if command fails....
virtual ~ISBScanner()
Class deconstructor.
virtual SBStatus setProjectorColor(SBProjectorColorEnums color)
Sets projector color. Returns False if command fails.
virtual bool isCapturing()
Returns whether the scanner is currently capturing or not.
virtual SBStatus scan(SBMesh &mesh, SBProcessParams processParams=SBProcessParams(), SBCaptureParams captureParams=SBCaptureParams())
Captures a set of scan images and processes them returning both scan data and an output mesh....
virtual SBStatus getProjectorBrightness(double &brightness)
Gets projector brightness. Returns False if command fails.
virtual SBStatus scan(SBMesh &mesh, SBScan &scan, SBProcessParams processParams=SBProcessParams(), SBCaptureParams captureParams=SBCaptureParams())
Captures a set of scan images and processes them returning both scan data and an output mesh....
virtual SBStatus autoExposure(const uint32_t xMin, const uint32_t yMin, const uint32_t xMax, const uint32_t yMax, const double minExposure, const double maxExposure, const uint32_t numSteps, const bool autoProjectorBrightness, const double maxOverexposedPercentage=0.01)
Setting camera exposure value(for scan and live view) automatically for scanners except for C50x mode...
virtual SBStatus disconnect()
Disconnects scanner and terminates communication.
virtual SBStatus getCameraResolution(uint32_t &width, uint32_t &height)
Returns if the information was acquired correctly.
virtual SBStatus setCameraExposure(double exposure)
Setting camera exposure value(for scan and live view). Returns fail if command fails.
virtual SBStatus getCameraExposure(double &exposure)
Camera exposure(for scan and live view) getter. Returns false if failed.
virtual SBStatus getCameraGain(double &gain)
Camera gain getter. Returns False if command fails.
virtual SBStatus setTriggerMode(SBTriggerModeEnums triggerMode)
Sets the trigger mode.
virtual SBStatus scanHDR(SBMesh &mesh, SBScan &scan, int numsteps, double interval, SBProcessParams processParams=SBProcessParams(), SBCaptureParams params=SBCaptureParams())
Captures sets of images using different camera exposure steps processes them returning both scan data...
virtual SBStatus getCameraExposureMinMax(double &min, double &max)
Camera exposure range min and max getter. Returns false if command fails.
virtual SBStatus unregisterEventHandler()
Unregisters the event handler registered to the ISBScanner instance. Returns False if command fails.
Stores and manages information related to the scanner calibration.
Definition: SBData.h:152
Definition: SBTypes.h:262
Parent to implement event based behavior using the GPIO ports of the scanner.
Definition: SBEventHandler.h:95
Contains Image and properties.
Definition: SBData.h:36
SBImage Container.
Definition: SBData.h:108
Mesh Class Definition. SBMesh contains the information related to the vertices and vaces,...
Definition: SBData.h:342
Definition: SBTypes.h:254
Parent class to implement onScanCaptured callback function.
Definition: SBEventHandler.h:26
Class containing scan Images and accessing functions.
Definition: SBData.h:248
Definition: ISBScanner.h:20
SBStatus
Scanner Status.
Definition: SBTypes.h:62
SBEventEnums
Event Type.
Definition: SBTypes.h:171
SBScannerModelEnums
Scanner Model.
Definition: SBTypes.h:112
SBTriggerModeEnums
Trigger mode.
Definition: SBTypes.h:162
SBProjectorColorEnums
Projector Color.
Definition: SBTypes.h:150
SBProjectorPatternEnums
Projector Pattern.
Definition: SBTypes.h:139
3 Dimensional Vector
Definition: SBTypes.h:182