Group Configuration¶
Configuring Phasing, Windows, Alignment, LaserOnTime, etc.
These functions allow you to read and set the ScanSystem and ScanHead configuration.
Public Functions¶
| Type | Name |
|---|---|
| int32_t | jsScanHeadGetAlignmentCamera (jsScanHead scan_head, jsCamera camera, double * roll_degrees, double * shift_x, double * shift_y) Obtains the currently applied alignment settings. |
| int32_t | jsScanHeadGetAlignmentLaser (jsScanHead scan_head, jsLaser laser, double * roll_degrees, double * shift_x, double * shift_y) Obtains the currently applied alignment settings. |
| int32_t | jsScanHeadGetBrightnessCorrectionCamera_BETA (jsScanHead scan_head, jsCamera camera, jsBrightnessCorrection_BETA * correction) Gets the current brightness correction values applied. |
| int32_t | jsScanHeadGetBrightnessCorrectionLaser_BETA (jsScanHead scan_head, jsLaser laser, jsBrightnessCorrection_BETA * correction) Gets the current brightness correction values applied. |
| int32_t | jsScanHeadGetCableOrientation (jsScanHead scan_head, jsCableOrientation * cable_orientation) Gets the safe default configuration for a given scan head. |
| int32_t | jsScanHeadGetConfiguration (jsScanHead scan_head, jsScanHeadConfiguration * cfg) Gets the scan head's configuration settings configured by the jsScanHeadConfiguration function. |
| int32_t | jsScanHeadGetConfigurationDefault (jsScanHead scan_head, jsScanHeadConfiguration * cfg) Gets the safe default configuration for a given scan head. |
| int32_t | jsScanHeadGetExclusionMaskCamera (jsScanHead scan_head, jsCamera camera, jsExclusionMask * mask) Gets the current exclusion mask applied. |
| int32_t | jsScanHeadGetExclusionMaskLaser (jsScanHead scan_head, jsLaser laser, jsExclusionMask * mask) Gets the current exclusion mask applied. |
| int32_t | jsScanHeadGetIdleScanPeriod (jsScanHead scan_head, uint32_t * idle_period_us) Returns the configured duration set by jsScanHeadSetIdleScanPeriod . |
| int32_t | jsScanHeadGetMinimumEncoderTravel (jsScanHead scan_head, uint32_t * min_encoder_travel) Returns the configured encoder travel value set by jsScanHeadSetMinimumEncoderTravel . |
| int32_t | jsScanHeadGetNumberWindowPointsCamera (jsScanHead scan_head, jsCamera camera) Gets the number of points that defines the scan window for a scan head's specified camera. |
| int32_t | jsScanHeadGetNumberWindowPointsLaser (jsScanHead scan_head, jsLaser laser) Gets the number of points that defines the scan window for a scan head's specified laser. |
| jsScanHeadType | jsScanHeadGetType (jsScanHead scan_head) Obtains the product type of a given scan head. |
| int32_t | jsScanHeadGetWindowCamera (jsScanHead scan_head, jsCamera camera, jsCoordinate * points) Gets the scan window for a particular scan head's camera. For rectangular windows the returned points will be ordered starting with the top left corner proceeding clockwise. For polygonal windows the points will be in the same order as they were supplied when setting the window. |
| int32_t | jsScanHeadGetWindowLaser (jsScanHead scan_head, jsLaser laser, jsCoordinate * points) Gets the scan window for a particular scan head's laser. For rectangular windows the returned points will be ordered starting with the top left corner proceeding clockwise. For polygonal windows the points will be in the same order as they were supplied when setting the window. |
| int32_t | jsScanHeadGetWindowTypeCamera (jsScanHead scan_head, jsCamera camera, jsScanWindowType * window_type) Gets the current scan window type for a particular scan head's camera. |
| int32_t | jsScanHeadGetWindowTypeLaser (jsScanHead scan_head, jsLaser laser, jsScanWindowType * window_type) Gets the current scan window type for a particular scan head's laser. |
| int32_t | jsScanHeadSetAlignment (jsScanHead scan_head, double roll_degrees, double shift_x, double shift_y) Configures spatial parameters of the scan head in order to properly transform the data from a camera based coordinate system to one based on mill placement. |
| int32_t | jsScanHeadSetAlignmentCamera (jsScanHead scan_head, jsCamera camera, double roll_degrees, double shift_x, double shift_y) Configures spatial parameters of the scan head in order to properly transform the data from a camera based coordinate system to one based on mill placement. This function is similar to jsScanHeadSetAlignment except that it only applies to one camera rather than both. |
| int32_t | jsScanHeadSetAlignmentLaser (jsScanHead scan_head, jsLaser laser, double roll_degrees, double shift_x, double shift_y) Configures spatial parameters of the scan head in order to properly transform the data from a camera based coordinate system to one based on mill placement. This function is similar to jsScanHeadSetAlignment except that it only applies to one laser rather than all. |
| int32_t | jsScanHeadSetBrightnessCorrectionCamera_BETA (jsScanHead scan_head, jsCamera camera, jsBrightnessCorrection_BETA * correction) Allows adjusting the scan data's brightness values. This can be useful to help ensure uniformity across all columns of the scan data. |
| int32_t | jsScanHeadSetBrightnessCorrectionLaser_BETA (jsScanHead scan_head, jsLaser laser, jsBrightnessCorrection_BETA * correction) Allows adjusting the scan data's brightness values. This can be useful to help ensure uniformity across all columns of the scan data. |
| int32_t | jsScanHeadSetCableOrientation (jsScanHead scan_head, jsCableOrientation cable_orientation) Sets the cable orientation for a given scan head. |
| int32_t | jsScanHeadSetConfiguration (jsScanHead scan_head, jsScanHeadConfiguration * cfg) Configures the scan head according to the parameters specified. |
| int32_t | jsScanHeadSetExclusionMaskCamera (jsScanHead scan_head, jsCamera camera, jsExclusionMask * mask) Allows specific pixels to be masked from scanning. This is useful to help exclude regions in the field of view that generate spurious data due to competing light sources. In order to exclude a given pixel, set the appropriate entry in the jsExclusionMask struct to a non-zero value. |
| int32_t | jsScanHeadSetExclusionMaskLaser (jsScanHead scan_head, jsLaser laser, jsExclusionMask * mask) Allows specific pixels to be masked from scanning. This is useful to help exclude regions in the field of view that generate spurious data due to competing light sources. In order to exclude a given pixel, set the appropriate entry in the jsExclusionMask struct to a non-zero value. |
| int32_t | jsScanHeadSetIdleScanPeriod (jsScanHead scan_head, uint32_t idle_period_us) Configures the duration by which new profiles are returned to the user when the encoder travel value specified by jsScanHeadSetMinimumEncoderTravel has not been met. |
| int32_t | jsScanHeadSetMinimumEncoderTravel (jsScanHead scan_head, uint32_t min_encoder_travel) Configures the scan head to only return a profile after the specified number of ticks have occurred on JS_ENCODER_MAIN . |
| int32_t | jsScanHeadSetPolygonWindow (jsScanHead scan_head, jsCoordinate * points, uint32_t points_len) Sets a user defined polygonal scan window for a scan head to restrict its field of view when scanning. The points must be ordered in a clockwise fashion and the resulting shape must be convex. The first and last points will be automatically connected, removing the need to duplicate the first point at the end of 'points'. |
| int32_t | jsScanHeadSetPolygonWindowCamera (jsScanHead scan_head, jsCamera camera, jsCoordinate * points, uint32_t points_len) Sets a user defined polygonal scan window for a particular scan head's camera to restrict its field of view when scanning. The points must be ordered in a clockwise fashion and the resulting shape must be convex. The first and last points will be automatically connected, removing the need to duplicate the first point at the end of 'points'. |
| int32_t | jsScanHeadSetPolygonWindowLaser (jsScanHead scan_head, jsLaser laser, jsCoordinate * points, uint32_t points_len) Sets a user defined polygonal scan window for a particular scan head's laser to restrict its field of view when scanning. The points must be ordered in a clockwise fashion and the resulting shape must be convex. The first and last points will be automatically connected, removing the need to duplicate the first point at the end of 'points'. |
| int32_t | jsScanHeadSetWindowRectangular (jsScanHead scan_head, double window_top, double window_bottom, double window_left, double window_right) Sets a rectangular scan window for a scan head to restrict its field of view when scanning. |
| int32_t | jsScanHeadSetWindowRectangularCamera (jsScanHead scan_head, jsCamera camera, double window_top, double window_bottom, double window_left, double window_right) Sets a rectangular scan window for a particular scan head's camera to restrict its field of view when scanning. |
| int32_t | jsScanHeadSetWindowRectangularLaser (jsScanHead scan_head, jsLaser laser, double window_top, double window_bottom, double window_left, double window_right) Sets a rectangular scan window for a particular scan head's laser to restrict its field of view when scanning. |
| int32_t | jsScanHeadSetWindowUnconstrained (jsScanHead scan_head) Resets the scan windows for a scan head to be the full field of view. |
| int32_t | jsScanHeadSetWindowUnconstrainedCamera (jsScanHead scan_head, jsCamera camera) Resets the scan window for a particular scan head's camera to be the full field of view. |
| int32_t | jsScanHeadSetWindowUnconstrainedLaser (jsScanHead scan_head, jsLaser laser) Resets the scan window for a particular scan head's laser to be the full field of view. |
| int32_t | jsScanSystemConfigure (jsScanSystem scan_system) Prepares the scan system to begin scanning. If connected, this function will send all of the necessary configuration data to all of the scan heads. Provided that no changes are made to any of the scan heads associated with the scan system, the API will skip sending this data to the scan heads when calling jsScanSystemStartScanning and allow scanning to start faster. |
| int32_t | jsScanSystemGetIdleScanPeriod (jsScanSystem scan_system, uint32_t * idle_period_us) Returns the idle scan period set by jsScanSystemSetIdleScanPeriod . |
| int32_t | jsScanSystemGetMinScanPeriod (jsScanSystem scan_system) Obtains the minimum period that a given scan system can achieve scanning when jsScanSystemStartScanning is called. |
| int | jsScanSystemGetScanSyncEncoder (jsScanSystem scan_system, uint32_t * serial_main, uint32_t * serial_aux1, uint32_t * serial_aux2) Obtains the ScanSync assigned to an encoder index. |
| int | jsScanSystemGetScanSyncStatus (jsScanSystem scan_system, uint32_t serial, jsScanSyncStatus * status) Obtains the status of a given ScanSync. |
| bool | jsScanSystemIsConfigured (jsScanSystem scan_system) Obtains the configuration state of the scan system. If false , the scan system needs to be configured by callingjsScanSystemConfigure or it will be sent duringjsScanSystemStartScanning call, incurring a time penalty. Iftrue , the system is configured and can start scanning with no time penalty during call tojsScanSystemStartScanning . |
| bool | jsScanSystemIsIdleScanningEnabled (jsScanSystem scan_system) Gets whether idle scanning is enabled for the scan system. |
| int32_t | jsScanSystemPhaseClearAll (jsScanSystem scan_system) Clears all phases created for a given scan system previously made through jsScanSystemPhaseCreate . |
| int32_t | jsScanSystemPhaseCreate (jsScanSystem scan_system) Creates a new phase entry for the scan system. If no phases have been created for the scan system it will create the first phase entry. If entries have been created already through previous calls to jsScanSystemPhaseCreate then the new phase will be placed after the last created phase. |
| int32_t | jsScanSystemPhaseInsertCamera (jsScanSystem scan_system, jsScanHead scan_head, jsCamera camera) Inserts a scan head and it's camera into a given phase entry. Multiple scan heads may be inserted into a given phase entry. However, the total phase time for this particular entry will be constrained by the scan head that requires the most time to complete it's scan. |
| int32_t | jsScanSystemPhaseInsertCameraConfiguration (jsScanSystem scan_system, jsScanHead scan_head, jsCamera camera, jsScanHeadConfiguration cfg) |
| int32_t | jsScanSystemPhaseInsertConfigurationCamera (jsScanSystem scan_system, jsScanHead scan_head, jsScanHeadConfiguration * cfg, jsCamera camera) Inserts a scan head and it's camera into a given phase entry. Multiple scan heads may be inserted into a given phase entry. However, the total phase time for this particular entry will be constrained by the scan head that requires the most time to complete it's scan. |
| int32_t | jsScanSystemPhaseInsertConfigurationLaser (jsScanSystem scan_system, jsScanHead scan_head, jsScanHeadConfiguration * cfg, jsLaser laser) Inserts a scan head and it's laser into a given phase entry. Multiple scan heads may be inserted into a given phase entry. However, the total phase time for this particular entry will be constrained by the scan head that requires the most time to complete it's scan. |
| int32_t | jsScanSystemPhaseInsertLaser (jsScanSystem scan_system, jsScanHead scan_head, jsLaser laser) Inserts a scan head and it's camera into a given phase entry. Multiple scan heads may be inserted into a given phase entry. However, the total phase time for this particular entry will be constrained by the scan head that requires the most time to complete it's scan. |
| int32_t | jsScanSystemPhaseInsertLaserConfiguration (jsScanSystem scan_system, jsScanHead scan_head, jsLaser laser, jsScanHeadConfiguration cfg) |
| int | jsScanSystemSetDefaultScanSyncEncoder (jsScanSystem scan_system) Clear the ScanSync mapping and use the default (lowest serial is MAIN) |
| int32_t | jsScanSystemSetIdleScanPeriod (jsScanSystem scan_system, uint32_t idle_period_us) Configures the period for the scan system when there is no encoder travel. If the idle scan period is set to 0 the laser will be completely disabled and no profiles will be received by the API when in the idle state. |
| int | jsScanSystemSetScanSyncEncoder (jsScanSystem scan_system, uint32_t serial_main, uint32_t serial_aux1, uint32_t serial_aux2) Assigns one or many ScanSyncs to an encoder index within the scan system to then be applied to all of its scan heads. |
Public Functions Documentation¶
jsScanHeadGetAlignmentCamera¶
Obtains the currently applied alignment settings.
int32_t jsScanHeadGetAlignmentCamera(
jsScanHead scan_head,
jsCamera camera,
double * roll_degrees,
double * shift_x,
double * shift_y
)
Note:
If configured using jsScanHeadSetAlignment, each camera will have the same alignment settings.
Parameters:
scan_headReference to scan head.cameraThe camera to get settings from.roll_degreesVariable to hold roll in degrees.shift_xVariable to hold shift in scan system units.shift_yVariable to hold shift in scan system units.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadGetAlignmentLaser¶
Obtains the currently applied alignment settings.
int32_t jsScanHeadGetAlignmentLaser(
jsScanHead scan_head,
jsLaser laser,
double * roll_degrees,
double * shift_x,
double * shift_y
)
Note:
If configured using jsScanHeadSetAlignment, each laser will have the same alignment settings.
Parameters:
scan_headReference to scan head.LaserThe laser to get settings from.roll_degreesVariable to hold roll in degrees.shift_xVariable to hold shift in scan system units.shift_yVariable to hold shift in scan system units.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadGetBrightnessCorrectionCamera_BETA¶
Gets the current brightness correction values applied.
int32_t jsScanHeadGetBrightnessCorrectionCamera\_BETA(
jsScanHead scan_head,
jsCamera camera,
jsBrightnessCorrection_BETA * correction
)
Note:
This is a beta feature that may be changed in the future. It is offered here to provide access to functionality that may prove useful to end users and allow them to submit feedback back to JoeScan. In a future release, this code may change; care should be taken when adding to applications. For any questions, reach out to a JoeScan representative for guidance.
Parameters:
scan_headReference to scan head.cameraThe camera the exclusion mask is applied to.correctionPointer to be filled with current brightness correction.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadGetBrightnessCorrectionLaser_BETA¶
Gets the current brightness correction values applied.
int32_t jsScanHeadGetBrightnessCorrectionLaser\_BETA(
jsScanHead scan_head,
jsLaser laser,
jsBrightnessCorrection_BETA * correction
)
Note:
This is a beta feature that may be changed in the future. It is offered here to provide access to functionality that may prove useful to end users and allow them to submit feedback back to JoeScan. In a future release, this code may change; care should be taken when adding to applications. For any questions, reach out to a JoeScan representative for guidance.
Parameters:
scan_headReference to scan head.laserThe laser the exclusion mask is applied to.correctionPointer to be filled with current brightness correction.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadGetCableOrientation¶
Gets the safe default configuration for a given scan head.
int32_t jsScanHeadGetCableOrientation(
jsScanHead scan_head,
jsCableOrientation * cable_orientation
)
Parameters:
scan_headReference to scan head to be configured.cable_orientationThejsCableOrientationto be updated with the current orientation.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadGetConfiguration¶
Gets the scan head's configuration settings configured by the jsScanHeadConfiguration function.
int32_t jsScanHeadGetConfiguration(
jsScanHead scan_head,
jsScanHeadConfiguration * cfg
)
Parameters:
scan_headReference to scan head to be configured.cfgThejsScanHeadConfigurationto be updated with current settings
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadGetConfigurationDefault¶
Gets the safe default configuration for a given scan head.
int32_t jsScanHeadGetConfigurationDefault(
jsScanHead scan_head,
jsScanHeadConfiguration * cfg
)
Parameters:
scan_headReference to scan head to be configured.cfgThejsScanHeadConfigurationto be updated with default.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadGetExclusionMaskCamera¶
Gets the current exclusion mask applied.
int32_t jsScanHeadGetExclusionMaskCamera(
jsScanHead scan_head,
jsCamera camera,
jsExclusionMask * mask
)
Parameters:
scan_headReference to scan head.cameraThe camera the exclusion mask is applied to.maskPointer to be filled with current exclusion mask.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadGetExclusionMaskLaser¶
Gets the current exclusion mask applied.
int32_t jsScanHeadGetExclusionMaskLaser(
jsScanHead scan_head,
jsLaser laser,
jsExclusionMask * mask
)
Parameters:
scan_headReference to scan head.laserThe laser the exclusion mask is applied to.maskPointer to be filled with current exclusion mask.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadGetIdleScanPeriod¶
Returns the configured duration set by jsScanHeadSetIdleScanPeriod .
int32_t jsScanHeadGetIdleScanPeriod(
jsScanHead scan_head,
uint32_t * idle_period_us
)
Note:
This feature is currently not supported with frame scanning.
Deprecated
Use jsScanSystemGetIdleScanPeriod.
Parameters:
scan_headReference to scan head.idle_period_usPointer to store configured idle period value.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadGetMinimumEncoderTravel¶
Returns the configured encoder travel value set by jsScanHeadSetMinimumEncoderTravel .
int32_t jsScanHeadGetMinimumEncoderTravel(
jsScanHead scan_head,
uint32_t * min_encoder_travel
)
Deprecated
Will be removed in a future release.
Note:
This feature is currently not supported with frame scanning.
Parameters:
scan_headReference to scan head.min_encoder_travelPointer to store configured travel value.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadGetNumberWindowPointsCamera¶
Gets the number of points that defines the scan window for a scan head's specified camera.
int32_t jsScanHeadGetNumberWindowPointsCamera(
jsScanHead scan_head,
jsCamera camera
)
Parameters:
scan_headReference to scan head.cameraThe camera to get the number of window points from.
Returns:
The number of points defining the window on success, negative value mapping to jsError on error.
jsScanHeadGetNumberWindowPointsLaser¶
Gets the number of points that defines the scan window for a scan head's specified laser.
int32_t jsScanHeadGetNumberWindowPointsLaser(
jsScanHead scan_head,
jsLaser laser
)
Parameters:
scan_headReference to scan head.laserThe laser to get the number of window points from.
Returns:
The number of points defining the window on success, negative value mapping to jsError on error.
jsScanHeadGetType¶
Obtains the product type of a given scan head.
jsScanHeadType jsScanHeadGetType(
jsScanHead scan_head
)
Note:
This function can only be called when a scan head is successfully connected after calling jsScanSystemConnect().
Parameters:
scan_headReference to scan head.
Returns:
The enumerated scan head type.
jsScanHeadGetWindowCamera¶
Gets the scan window for a particular scan head's camera. For rectangular windows the returned points will be ordered starting with the top left corner proceeding clockwise. For polygonal windows the points will be in the same order as they were supplied when setting the window.
int32_t jsScanHeadGetWindowCamera(
jsScanHead scan_head,
jsCamera camera,
jsCoordinate * points
)
Parameters:
scan_headReference to scan head.cameraThe camera to get the window from.pointsArray to store the coordinates defining the X/Y points of the window.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadGetWindowLaser¶
Gets the scan window for a particular scan head's laser. For rectangular windows the returned points will be ordered starting with the top left corner proceeding clockwise. For polygonal windows the points will be in the same order as they were supplied when setting the window.
int32_t jsScanHeadGetWindowLaser(
jsScanHead scan_head,
jsLaser laser,
jsCoordinate * points
)
Parameters:
scan_headReference to scan head.laserThe laser to get the window from.pointsArray to store the coordinates defining the X/Y points of the window.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadGetWindowTypeCamera¶
Gets the current scan window type for a particular scan head's camera.
int32_t jsScanHeadGetWindowTypeCamera(
jsScanHead scan_head,
jsCamera camera,
jsScanWindowType * window_type
)
Parameters:
scan_headReference to scan head.cameraThe camera to get the window type for.window_typeThejsScanWindowTypeto be updated with the current window type.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadGetWindowTypeLaser¶
Gets the current scan window type for a particular scan head's laser.
int32_t jsScanHeadGetWindowTypeLaser(
jsScanHead scan_head,
jsLaser laser,
jsScanWindowType * window_type
)
Parameters:
scan_headReference to scan head.laserThe laser to get the window type for.window_typeThejsScanWindowTypeto be updated with the current window type.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadSetAlignment¶
Configures spatial parameters of the scan head in order to properly transform the data from a camera based coordinate system to one based on mill placement.
int32_t jsScanHeadSetAlignment(
jsScanHead scan_head,
double roll_degrees,
double shift_x,
double shift_y
)
Note:
The alignment settings are sent to the scan head during the call to jsScanSystemConnect.
Parameters:
scan_headReference to scan head.roll_degreesThe rotation in degrees to be applied to the Z axis.shift_xThe shift to be applied specified in scan system units.shift_yThe shift to be applied specified in scan system units.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadSetAlignmentCamera¶
Configures spatial parameters of the scan head in order to properly transform the data from a camera based coordinate system to one based on mill placement. This function is similar to jsScanHeadSetAlignment except that it only applies to one camera rather than both.
int32_t jsScanHeadSetAlignmentCamera(
jsScanHead scan_head,
jsCamera camera,
double roll_degrees,
double shift_x,
double shift_y
)
Note:
The alignment settings are sent to the scan head during the call to jsScanSystemConnect.
Parameters:
scan_headReference to scan head.cameraThe camera to apply parameters to.roll_degreesThe rotation in degrees to be applied.shift_xThe shift to be applied specified in scan system units.shift_yThe shift to be applied specified in scan system units.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadSetAlignmentLaser¶
Configures spatial parameters of the scan head in order to properly transform the data from a camera based coordinate system to one based on mill placement. This function is similar to jsScanHeadSetAlignment except that it only applies to one laser rather than all.
int32_t jsScanHeadSetAlignmentLaser(
jsScanHead scan_head,
jsLaser laser,
double roll_degrees,
double shift_x,
double shift_y
)
Note:
The alignment settings are sent to the scan head during the call to jsScanSystemConnect.
Parameters:
scan_headReference to scan head.laserThe laser to apply parameters to.roll_degreesThe rotation in degrees to be applied.shift_xThe shift to be applied specified in scan system units.shift_yThe shift to be applied specified in scan system units.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadSetBrightnessCorrectionCamera_BETA¶
Allows adjusting the scan data's brightness values. This can be useful to help ensure uniformity across all columns of the scan data.
int32_t jsScanHeadSetBrightnessCorrectionCamera\_BETA(
jsScanHead scan_head,
jsCamera camera,
jsBrightnessCorrection_BETA * correction
)
Note:
This is a beta feature that may be changed in the future. It is is offered here to provide access to functionality that may prove useful to end users and allow them to submit feedback back to JoeScan. In a future release, this code may change; care should be taken when adding to applications. For any questions, reach out to a JoeScan representative for guidance.
Note:
Only supported by JS-50 scan heads running v16.1.0 firmware or greater.
Parameters:
scan_headReference to scan head.cameraThe camera to apply brightness correction to.correctionPointer to brightness correction to apply.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadSetBrightnessCorrectionLaser_BETA¶
Allows adjusting the scan data's brightness values. This can be useful to help ensure uniformity across all columns of the scan data.
int32_t jsScanHeadSetBrightnessCorrectionLaser\_BETA(
jsScanHead scan_head,
jsLaser laser,
jsBrightnessCorrection_BETA * correction
)
Note:
This is a beta feature that may be changed in the future. It is offered here to provide access to functionality that may prove useful to end users and allow them to submit feedback back to JoeScan. In a future release, this code may change; care should be taken when adding to applications. For any questions, reach out to a JoeScan representative for guidance.
Note:
Only supported by JS-50 scan heads running v16.1.0 firmware or greater.
Parameters:
scan_headReference to scan head.laserThe laser to apply brightness correction to.correctionPointer to brightness correction to apply.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadSetCableOrientation¶
Sets the cable orientation for a given scan head.
int32_t jsScanHeadSetCableOrientation(
jsScanHead scan_head,
jsCableOrientation cable_orientation
)
Parameters:
scan_headReference to scan head to be configured.cable_orientationThejsCableOrientationto be applied.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadSetConfiguration¶
Configures the scan head according to the parameters specified.
int32_t jsScanHeadSetConfiguration(
jsScanHead scan_head,
jsScanHeadConfiguration * cfg
)
Note:
The configuration settings are sent to the scan head during the call to jsScanSystemStartScanning().
Parameters:
scan_headReference to scan head to be configured.cfgThejsScanHeadConfigurationto be applied.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadSetExclusionMaskCamera¶
Allows specific pixels to be masked from scanning. This is useful to help exclude regions in the field of view that generate spurious data due to competing light sources. In order to exclude a given pixel, set the appropriate entry in the jsExclusionMask struct to a non-zero value.
int32_t jsScanHeadSetExclusionMaskCamera(
jsScanHead scan_head,
jsCamera camera,
jsExclusionMask * mask
)
Note:
Only supported by JS-50 scan heads running v16.1.0 firmware or greater.
Parameters:
scan_headReference to scan head.cameraThe camera to apply exclusion mask to.maskPointer to mask of pixels to exclude.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadSetExclusionMaskLaser¶
Allows specific pixels to be masked from scanning. This is useful to help exclude regions in the field of view that generate spurious data due to competing light sources. In order to exclude a given pixel, set the appropriate entry in the jsExclusionMask struct to a non-zero value.
int32_t jsScanHeadSetExclusionMaskLaser(
jsScanHead scan_head,
jsLaser laser,
jsExclusionMask * mask
)
Note:
Only supported by JS-50 scan heads running v16.1.0 firmware or greater.
Parameters:
scan_headReference to scan head.laserThe laser to apply exclusion mask to.maskPointer to mask of pixels to exclude.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadSetIdleScanPeriod¶
Configures the duration by which new profiles are returned to the user when the encoder travel value specified by jsScanHeadSetMinimumEncoderTravel has not been met.
int32_t jsScanHeadSetIdleScanPeriod(
jsScanHead scan_head,
uint32_t idle_period_us
)
Note:
Setting this value to zero, the default will result in no profiles being returned until the encoder has traveled the specified distance.
Note:
The resolution of the idle scan period is currently only in increments of the scan system's scan period and the number of times the scan head is scheduled in the phase table. Greater granularity will be achievable in a future release.
Note:
This feature is currently not supported with frame scanning.
Deprecated
Use jsScanSystemSetIdleScanPeriod.
Parameters:
scan_headReference to scan head.idle_period_usThe idle scan period in microseconds
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadSetMinimumEncoderTravel¶
Configures the scan head to only return a profile after the specified number of ticks have occurred on JS_ENCODER_MAIN .
int32_t jsScanHeadSetMinimumEncoderTravel(
jsScanHead scan_head,
uint32_t min_encoder_travel
)
Deprecated
Will be removed in a future release.
Note:
Use jsScanHeadSetIdleScanPeriod to configure the scan head to return profiles at a reduced rate when the encoder has not traveled enough to trigger a new profile to be returned.
Note:
This feature is currently not supported with frame scanning.
Parameters:
scan_headReference to scan head.min_encoder_travelNumber of encoder ticks needed for new profile.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadSetPolygonWindow¶
Sets a user defined polygonal scan window for a scan head to restrict its field of view when scanning. The points must be ordered in a clockwise fashion and the resulting shape must be convex. The first and last points will be automatically connected, removing the need to duplicate the first point at the end of 'points'.
int32_t jsScanHeadSetPolygonWindow(
jsScanHead scan_head,
jsCoordinate * points,
uint32_t points_len
)
Parameters:
scan_headReference to scan head.pointsArray of coordinates defining the X/Y points of the polygon.points_lenThe number of points in thepointsarray.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadSetPolygonWindowCamera¶
Sets a user defined polygonal scan window for a particular scan head's camera to restrict its field of view when scanning. The points must be ordered in a clockwise fashion and the resulting shape must be convex. The first and last points will be automatically connected, removing the need to duplicate the first point at the end of 'points'.
int32_t jsScanHeadSetPolygonWindowCamera(
jsScanHead scan_head,
jsCamera camera,
jsCoordinate * points,
uint32_t points_len
)
Parameters:
scan_headReference to scan head.cameraThe camera to apply the window to.pointsArray of coordinates defining the X/Y points of the polygon.points_lenThe number of points in thepointsarray.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadSetPolygonWindowLaser¶
Sets a user defined polygonal scan window for a particular scan head's laser to restrict its field of view when scanning. The points must be ordered in a clockwise fashion and the resulting shape must be convex. The first and last points will be automatically connected, removing the need to duplicate the first point at the end of 'points'.
int32_t jsScanHeadSetPolygonWindowLaser(
jsScanHead scan_head,
jsLaser laser,
jsCoordinate * points,
uint32_t points_len
)
Parameters:
scan_headReference to scan head.laserThe laser to apply the window to.pointsArray of coordinates defining the X/Y points of the polygon.points_lenThe number of points in thepointsarray.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadSetWindowRectangular¶
Sets a rectangular scan window for a scan head to restrict its field of view when scanning.
int32_t jsScanHeadSetWindowRectangular(
jsScanHead scan_head,
double window_top,
double window_bottom,
double window_left,
double window_right
)
Parameters:
scan_headReference to scan head.window_topThe top window dimension in scan system units.window_bottomThe bottom window dimension in scan system units.window_leftThe left window dimension in scan system units.window_rightThe right window dimension in scan system units.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadSetWindowRectangularCamera¶
Sets a rectangular scan window for a particular scan head's camera to restrict its field of view when scanning.
int32_t jsScanHeadSetWindowRectangularCamera(
jsScanHead scan_head,
jsCamera camera,
double window_top,
double window_bottom,
double window_left,
double window_right
)
Parameters:
scan_headReference to scan head.cameraThe camera to apply the window to.window_topThe top window dimension in scan system units.window_bottomThe bottom window dimension in scan system units.window_leftThe left window dimension in scan system units.window_rightThe right window dimension in scan system units.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadSetWindowRectangularLaser¶
Sets a rectangular scan window for a particular scan head's laser to restrict its field of view when scanning.
int32_t jsScanHeadSetWindowRectangularLaser(
jsScanHead scan_head,
jsLaser laser,
double window_top,
double window_bottom,
double window_left,
double window_right
)
Parameters:
scan_headReference to scan head.laserThe laser to apply the window to.window_topThe top window dimension in scan system units.window_bottomThe bottom window dimension in scan system units.window_leftThe left window dimension in scan system units.window_rightThe right window dimension in scan system units.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadSetWindowUnconstrained¶
Resets the scan windows for a scan head to be the full field of view.
int32_t jsScanHeadSetWindowUnconstrained(
jsScanHead scan_head
)
Parameters:
scan_headReference to scan head.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadSetWindowUnconstrainedCamera¶
Resets the scan window for a particular scan head's camera to be the full field of view.
int32_t jsScanHeadSetWindowUnconstrainedCamera(
jsScanHead scan_head,
jsCamera camera
)
Parameters:
scan_headReference to scan head.cameraThe camera to apply the window to.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanHeadSetWindowUnconstrainedLaser¶
Resets the scan window for a particular scan head's laser to be the full field of view.
int32_t jsScanHeadSetWindowUnconstrainedLaser(
jsScanHead scan_head,
jsLaser laser
)
Parameters:
scan_headReference to scan head.laserThe laser to apply the window to.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanSystemConfigure¶
Prepares the scan system to begin scanning. If connected, this function will send all of the necessary configuration data to all of the scan heads. Provided that no changes are made to any of the scan heads associated with the scan system, the API will skip sending this data to the scan heads when calling jsScanSystemStartScanning and allow scanning to start faster.
int32_t jsScanSystemConfigure(
jsScanSystem scan_system
)
Parameters:
scan_systemReference to system of scan heads.
Returns:
The minimum scan period in microseconds on success, negative value mapping to jsError on error.
jsScanSystemGetIdleScanPeriod¶
Returns the idle scan period set by jsScanSystemSetIdleScanPeriod .
int32_t jsScanSystemGetIdleScanPeriod(
jsScanSystem scan_system,
uint32_t * idle_period_us
)
Parameters:
scan_systemReference to scan system.idle_period_usPointer to store configured idle period value.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanSystemGetMinScanPeriod¶
Obtains the minimum period that a given scan system can achieve scanning when jsScanSystemStartScanning is called.
int32_t jsScanSystemGetMinScanPeriod(
jsScanSystem scan_system
)
Parameters:
scan_systemReference to system of scan heads.
Returns:
The minimum scan period in microseconds on success, negative value mapping to jsError on error.
jsScanSystemGetScanSyncEncoder¶
Obtains the ScanSync assigned to an encoder index.
int jsScanSystemGetScanSyncEncoder(
jsScanSystem scan_system,
uint32_t * serial_main,
uint32_t * serial_aux1,
uint32_t * serial_aux2
)
Parameters:
scan_systemReference to system of scan heads.indexEncoder index of ScanSync to obtain.serial_mainPointer to be populated with ScanSync Main serial number.serial_aux1Pointer to be populated with ScanSync Aux1 serial number.serial_aux2Pointer to be populated with ScanSync Aux2 serial number.
Returns:
0 on success, negative value jsError on error.
jsScanSystemGetScanSyncStatus¶
Obtains the status of a given ScanSync.
int jsScanSystemGetScanSyncStatus(
jsScanSystem scan_system,
uint32_t serial,
jsScanSyncStatus * status
)
Parameters:
scan_systemReference to system of scan heads.serialSerial number of the ScanSync.statusPointer to be populated with the ScanSync status.
Returns:
0 on success, negative value jsError on error.
jsScanSystemIsConfigured¶
Obtains the configuration state of the scan system. If false , the scan system needs to be configured by callingjsScanSystemConfigure or it will be sent duringjsScanSystemStartScanning call, incurring a time penalty. Iftrue , the system is configured and can start scanning with no time penalty during call tojsScanSystemStartScanning .
bool jsScanSystemIsConfigured(
jsScanSystem scan_system
)
Parameters:
scan_systemReference to system of scan heads.
Returns:
Boolean true if configured, false otherwise.
jsScanSystemIsIdleScanningEnabled¶
Gets whether idle scanning is enabled for the scan system.
bool jsScanSystemIsIdleScanningEnabled(
jsScanSystem scan_system
)
Note:
Idle scanning is disabled by default, but can be enabled by setting the idle scan period using jsScanSystemSetIdleScanPeriod.
Parameters:
scan_systemReference to scan system.
Returns:
Boolean true if idle scanning is enabled, false otherwise.
jsScanSystemPhaseClearAll¶
Clears all phases created for a given scan system previously made through jsScanSystemPhaseCreate .
int32_t jsScanSystemPhaseClearAll(
jsScanSystem scan_system
)
Parameters:
scan_systemReference to the scan system.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanSystemPhaseCreate¶
Creates a new phase entry for the scan system. If no phases have been created for the scan system it will create the first phase entry. If entries have been created already through previous calls to jsScanSystemPhaseCreate then the new phase will be placed after the last created phase.
int32_t jsScanSystemPhaseCreate(
jsScanSystem scan_system
)
Parameters:
scan_systemReference to the scan system.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanSystemPhaseInsertCamera¶
Inserts a scan head and it's camera into a given phase entry. Multiple scan heads may be inserted into a given phase entry. However, the total phase time for this particular entry will be constrained by the scan head that requires the most time to complete it's scan.
int32_t jsScanSystemPhaseInsertCamera(
jsScanSystem scan_system,
jsScanHead scan_head,
jsCamera camera
)
Note:
This function should be used with scan heads that are camera driven.
Parameters:
scan_systemReference to the scan system.scan_headReference to the scan head.cameraThe camera of the scan head to scan with during phase entry.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanSystemPhaseInsertCameraConfiguration¶
int32_t jsScanSystemPhaseInsertCameraConfiguration(
jsScanSystem scan_system,
jsScanHead scan_head,
jsCamera camera,
jsScanHeadConfiguration cfg
)
Deprecated
Use jsScanSystemPhaseInsertConfigurationCamera.
Returns:
JS_ERROR_INVALID_ARGUMENT
jsScanSystemPhaseInsertConfigurationCamera¶
Inserts a scan head and it's camera into a given phase entry. Multiple scan heads may be inserted into a given phase entry. However, the total phase time for this particular entry will be constrained by the scan head that requires the most time to complete it's scan.
int32_t jsScanSystemPhaseInsertConfigurationCamera(
jsScanSystem scan_system,
jsScanHead scan_head,
jsScanHeadConfiguration * cfg,
jsCamera camera
)
Note:
This function will use the jsScanHeadConfiguration provided as a function argument when configuring this particular camera for scanning rather than that specified in jsScanHeadSetConfiguration.
Note:
Only the laser_on_time_max_us, laser_on_time_def_us, and laser_on_time_min_us fields from jsScanHeadSetConfiguration are currently used for per phase configuration.
Note:
This function should be used with scan heads that are camera driven.
Parameters:
scan_systemReference to the scan system.scan_headReference to the scan head.cfgConfiguration to be applied to the camera.cameraThe camera of the scan head to scan with during phase entry.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanSystemPhaseInsertConfigurationLaser¶
Inserts a scan head and it's laser into a given phase entry. Multiple scan heads may be inserted into a given phase entry. However, the total phase time for this particular entry will be constrained by the scan head that requires the most time to complete it's scan.
int32_t jsScanSystemPhaseInsertConfigurationLaser(
jsScanSystem scan_system,
jsScanHead scan_head,
jsScanHeadConfiguration * cfg,
jsLaser laser
)
Note:
This function will use the jsScanHeadConfiguration provided as a function argument when configuring this particular camera for scanning rather than that specified in jsScanHeadSetConfiguration.
Note:
Only the laser_on_time_max_us, laser_on_time_def_us, and laser_on_time_min_us fields from jsScanHeadSetConfiguration are currently used for per phase configuration.
Note:
This function should be used with scan heads that are laser driven.
Parameters:
scan_systemReference to the scan system.scan_headReference to the scan head.cfgConfiguration to be applied to the laser.laserThe camera of the scan head to scan with during phase entry.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanSystemPhaseInsertLaser¶
Inserts a scan head and it's camera into a given phase entry. Multiple scan heads may be inserted into a given phase entry. However, the total phase time for this particular entry will be constrained by the scan head that requires the most time to complete it's scan.
int32_t jsScanSystemPhaseInsertLaser(
jsScanSystem scan_system,
jsScanHead scan_head,
jsLaser laser
)
Note:
This function should be used with scan heads that are laser driven.
Parameters:
scan_systemReference to the scan system.scan_headReference to the scan head.laserThe camera of the scan head to scan with during phase entry.
Returns:
0 on success, negative value mapping to jsError on error.
jsScanSystemPhaseInsertLaserConfiguration¶
int32_t jsScanSystemPhaseInsertLaserConfiguration(
jsScanSystem scan_system,
jsScanHead scan_head,
jsLaser laser,
jsScanHeadConfiguration cfg
)
Deprecated
Use jsScanSystemPhaseInsertConfigurationLaser.
Returns:
JS_ERROR_INVALID_ARGUMENT
jsScanSystemSetDefaultScanSyncEncoder¶
Clear the ScanSync mapping and use the default (lowest serial is MAIN)
int jsScanSystemSetDefaultScanSyncEncoder(
jsScanSystem scan_system
)
Parameters:
scan_systemReference to system of scan heads.
Returns:
0 on success, negative value jsError on error.
jsScanSystemSetIdleScanPeriod¶
Configures the period for the scan system when there is no encoder travel. If the idle scan period is set to 0 the laser will be completely disabled and no profiles will be received by the API when in the idle state.
int32_t jsScanSystemSetIdleScanPeriod(
jsScanSystem scan_system,
uint32_t idle_period_us
)
Note:
Use jsScanSystemIsIdleScanningEnabled and jsScanHeadGetStatus (via status->state) to determine if profiles are not being generated due to the scan head being in an idle state
Note:
The idle scan period will be aligned to a multiple of the scan system's scan period. This means that the idle scan period may slightly differ from idle_period_us passed into this function (but never by more than a scan period).
Parameters:
scan_systemReference to scan system.idle_period_usThe idle scan period in microseconds
Returns:
0 on success, negative value mapping to jsError on error.
jsScanSystemSetScanSyncEncoder¶
Assigns one or many ScanSyncs to an encoder index within the scan system to then be applied to all of its scan heads.
int jsScanSystemSetScanSyncEncoder(
jsScanSystem scan_system,
uint32_t serial_main,
uint32_t serial_aux1,
uint32_t serial_aux2
)
Note:
This function should be called after all the scan heads have been added to the scan system.
Parameters:
scan_systemReference to system of scan heads.serial_mainSerial number of the ScanSync Main, required.serial_aux1Serial number of the ScanSync Aux1, orJS_SCANSYNC_INVALID_SERIALfor unused.serial_aux2Serial number of the ScanSync Aux2, orJS_SCANSYNC_INVALID_SERIALfor unused.
Returns:
0 on success, negative value jsError on error.