Group Configuration¶
Configuring Phasing, Windows, Alignment, LaserOnTime, etc. More...
Public Functions¶
| Type | Name |
|---|---|
| EXPORTED int32_t PRE | jsScanHeadGetAlignmentCamera (jsScanHead scan_head, jsCamera camera, double * roll_degrees, double * shift_x, double * shift_y) Obtains the currently applied alignment settings. |
| EXPORTED int32_t PRE | jsScanHeadGetAlignmentLaser (jsScanHead scan_head, jsLaser laser, double * roll_degrees, double * shift_x, double * shift_y) Obtains the currently applied alignment settings. |
| EXPORTED int32_t PRE | jsScanHeadGetBrightnessCorrectionCamera_BETA (jsScanHead scan_head, jsCamera camera, jsBrightnessCorrection_BETA * correction) Gets the current brightness correction values applied. |
| EXPORTED int32_t PRE | jsScanHeadGetBrightnessCorrectionLaser_BETA (jsScanHead scan_head, jsLaser laser, jsBrightnessCorrection_BETA * correction) Gets the current brightness correction values applied. |
| EXPORTED int32_t PRE | jsScanHeadGetCableOrientation (jsScanHead scan_head, jsCableOrientation * cable_orientation) Gets the safe default configuration for a given scan head. |
| EXPORTED int32_t PRE | jsScanHeadGetConfiguration (jsScanHead scan_head, jsScanHeadConfiguration * cfg) Gets the scan head's configuration settings configured by the jsScanHeadConfiguration function. |
| EXPORTED int32_t PRE | jsScanHeadGetConfigurationDefault (jsScanHead scan_head, jsScanHeadConfiguration * cfg) Gets the safe default configuration for a given scan head. |
| EXPORTED int32_t PRE | jsScanHeadGetExclusionMaskCamera (jsScanHead scan_head, jsCamera camera, jsExclusionMask * mask) Gets the current exclusion mask applied. |
| EXPORTED int32_t PRE | jsScanHeadGetExclusionMaskLaser (jsScanHead scan_head, jsLaser laser, jsExclusionMask * mask) Gets the current exclusion mask applied. |
| DEPRECATED EXPORTED int32_t PRE | jsScanHeadGetIdleScanPeriod (jsScanHead scan_head, uint32_t * idle_period_us) Returns the configured duration set by jsScanHeadSetIdleScanPeriod . |
| DEPRECATED EXPORTED int32_t PRE | jsScanHeadGetMinimumEncoderTravel (jsScanHead scan_head, uint32_t * min_encoder_travel) Returns the configured encoder travel value set by jsScanHeadSetMinimumEncoderTravel . |
| EXPORTED int32_t PRE | jsScanHeadGetNumberWindowPointsCamera (jsScanHead scan_head, jsCamera camera) Gets the number of points that defines the scan window for a scan head's specified camera. |
| EXPORTED int32_t PRE | jsScanHeadGetNumberWindowPointsLaser (jsScanHead scan_head, jsLaser laser) Gets the number of points that defines the scan window for a scan head's specified laser. |
| EXPORTED jsScanHeadType PRE | jsScanHeadGetType (jsScanHead scan_head) Obtains the product type of a given scan head. |
| EXPORTED int32_t PRE | 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. |
| EXPORTED int32_t PRE | 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. |
| EXPORTED int32_t PRE | jsScanHeadGetWindowTypeCamera (jsScanHead scan_head, jsCamera camera, jsScanWindowType * window_type) Gets the current scan window type for a particular scan head's camera. |
| EXPORTED int32_t PRE | jsScanHeadGetWindowTypeLaser (jsScanHead scan_head, jsLaser laser, jsScanWindowType * window_type) Gets the current scan window type for a particular scan head's laser. |
| EXPORTED int32_t PRE | 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. |
| EXPORTED int32_t PRE | 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. |
| EXPORTED int32_t PRE | 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. |
| EXPORTED int32_t PRE | 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. |
| EXPORTED int32_t PRE | 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. |
| EXPORTED int32_t PRE | jsScanHeadSetCableOrientation (jsScanHead scan_head, jsCableOrientation cable_orientation) Sets the cable orientation for a given scan head. |
| EXPORTED int32_t PRE | jsScanHeadSetConfiguration (jsScanHead scan_head, jsScanHeadConfiguration * cfg) Configures the scan head according to the parameters specified. |
| EXPORTED int32_t PRE | 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. |
| EXPORTED int32_t PRE | 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. |
| DEPRECATED EXPORTED int32_t PRE | 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. |
| DEPRECATED EXPORTED int32_t PRE | 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 . |
| EXPORTED int32_t PRE | 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'. |
| EXPORTED int32_t PRE | 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'. |
| EXPORTED int32_t PRE | 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'. |
| EXPORTED int32_t PRE | 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. |
| EXPORTED int32_t PRE | 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. |
| EXPORTED int32_t PRE | 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. |
| EXPORTED int32_t PRE | jsScanHeadSetWindowUnconstrained (jsScanHead scan_head) Resets the scan windows for a scan head to be the full field of view. |
| EXPORTED int32_t PRE | jsScanHeadSetWindowUnconstrainedCamera (jsScanHead scan_head, jsCamera camera) Resets the scan window for a particular scan head's camera to be the full field of view. |
| EXPORTED int32_t PRE | jsScanHeadSetWindowUnconstrainedLaser (jsScanHead scan_head, jsLaser laser) Resets the scan window for a particular scan head's laser to be the full field of view. |
| EXPORTED int32_t PRE | 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. |
| EXPORTED int32_t PRE | jsScanSystemGetIdleScanPeriod (jsScanSystem scan_system, uint32_t * idle_period_us) Returns the idle scan period set by jsScanSystemSetIdleScanPeriod . |
| EXPORTED int32_t PRE | jsScanSystemGetMinScanPeriod (jsScanSystem scan_system) Obtains the minimum period that a given scan system can achieve scanning when jsScanSystemStartScanning is called. |
| EXPORTED int PRE | jsScanSystemGetScanSyncEncoder (jsScanSystem scan_system, uint32_t * serial_main, uint32_t * serial_aux1, uint32_t * serial_aux2) Obtains the ScanSync assigned to an encoder index. |
| EXPORTED int PRE | jsScanSystemGetScanSyncStatus (jsScanSystem scan_system, uint32_t serial, jsScanSyncStatus * status) Obtains the status of a given ScanSync. |
| EXPORTED bool PRE | 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 . |
| EXPORTED bool PRE | jsScanSystemIsIdleScanningEnabled (jsScanSystem scan_system) Gets whether idle scanning is enabled for the scan system. |
| EXPORTED int32_t PRE | jsScanSystemPhaseClearAll (jsScanSystem scan_system) Clears all phases created for a given scan system previously made through jsScanSystemPhaseCreate . |
| EXPORTED int32_t PRE | 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. |
| EXPORTED int32_t PRE | 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. |
| DEPRECATED EXPORTED int32_t PRE | jsScanSystemPhaseInsertCameraConfiguration (jsScanSystem scan_system, jsScanHead scan_head, jsCamera camera, jsScanHeadConfiguration cfg) |
| EXPORTED int32_t PRE | 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. |
| EXPORTED int32_t PRE | 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. |
| EXPORTED int32_t PRE | 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. |
| DEPRECATED EXPORTED int32_t PRE | jsScanSystemPhaseInsertLaserConfiguration (jsScanSystem scan_system, jsScanHead scan_head, jsLaser laser, jsScanHeadConfiguration cfg) |
| EXPORTED int PRE | jsScanSystemSetDefaultScanSyncEncoder (jsScanSystem scan_system) Clear the ScanSync mapping and use the default (lowest serial is MAIN) |
| EXPORTED int32_t PRE | 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. |
| EXPORTED int PRE | 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. |
Detailed Description¶
These functions allow you to read and set the ScanSystem and ScanHead configuration.
Public Functions Documentation¶
function jsScanHeadGetAlignmentCamera¶
Obtains the currently applied alignment settings.
EXPORTED int32_t PRE 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.
function jsScanHeadGetAlignmentLaser¶
Obtains the currently applied alignment settings.
EXPORTED int32_t PRE 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.
function jsScanHeadGetBrightnessCorrectionCamera_BETA¶
Gets the current brightness correction values applied.
EXPORTED int32_t PRE 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.
function jsScanHeadGetBrightnessCorrectionLaser_BETA¶
Gets the current brightness correction values applied.
EXPORTED int32_t PRE 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.
function jsScanHeadGetCableOrientation¶
Gets the safe default configuration for a given scan head.
EXPORTED int32_t PRE 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.
function jsScanHeadGetConfiguration¶
Gets the scan head's configuration settings configured by the jsScanHeadConfiguration function.
EXPORTED int32_t PRE 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.
function jsScanHeadGetConfigurationDefault¶
Gets the safe default configuration for a given scan head.
EXPORTED int32_t PRE 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.
function jsScanHeadGetExclusionMaskCamera¶
Gets the current exclusion mask applied.
EXPORTED int32_t PRE 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.
function jsScanHeadGetExclusionMaskLaser¶
Gets the current exclusion mask applied.
EXPORTED int32_t PRE 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.
function jsScanHeadGetIdleScanPeriod¶
Returns the configured duration set by jsScanHeadSetIdleScanPeriod .
DEPRECATED EXPORTED int32_t PRE 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.
function jsScanHeadGetMinimumEncoderTravel¶
Returns the configured encoder travel value set by jsScanHeadSetMinimumEncoderTravel .
DEPRECATED EXPORTED int32_t PRE 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.
function jsScanHeadGetNumberWindowPointsCamera¶
Gets the number of points that defines the scan window for a scan head's specified camera.
EXPORTED int32_t PRE 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.
function jsScanHeadGetNumberWindowPointsLaser¶
Gets the number of points that defines the scan window for a scan head's specified laser.
EXPORTED int32_t PRE 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.
function jsScanHeadGetType¶
Obtains the product type of a given scan head.
EXPORTED jsScanHeadType PRE 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.
function 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.
EXPORTED int32_t PRE 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.
function 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.
EXPORTED int32_t PRE 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.
function jsScanHeadGetWindowTypeCamera¶
Gets the current scan window type for a particular scan head's camera.
EXPORTED int32_t PRE 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.
function jsScanHeadGetWindowTypeLaser¶
Gets the current scan window type for a particular scan head's laser.
EXPORTED int32_t PRE 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.
function 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.
EXPORTED int32_t PRE 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.
function 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.
EXPORTED int32_t PRE 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.
function 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.
EXPORTED int32_t PRE 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.
function 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.
EXPORTED int32_t PRE 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.
function 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.
EXPORTED int32_t PRE 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.
function jsScanHeadSetCableOrientation¶
Sets the cable orientation for a given scan head.
EXPORTED int32_t PRE 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.
function jsScanHeadSetConfiguration¶
Configures the scan head according to the parameters specified.
EXPORTED int32_t PRE 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.
function 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.
EXPORTED int32_t PRE 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.
function 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.
EXPORTED int32_t PRE 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.
function 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.
DEPRECATED EXPORTED int32_t PRE 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.
function jsScanHeadSetMinimumEncoderTravel¶
Configures the scan head to only return a profile after the specified number of ticks have occurred on JS_ENCODER_MAIN .
DEPRECATED EXPORTED int32_t PRE 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.
function 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'.
EXPORTED int32_t PRE 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.
function 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'.
EXPORTED int32_t PRE 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.
function 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'.
EXPORTED int32_t PRE 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.
function jsScanHeadSetWindowRectangular¶
Sets a rectangular scan window for a scan head to restrict its field of view when scanning.
EXPORTED int32_t PRE 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.
function jsScanHeadSetWindowRectangularCamera¶
Sets a rectangular scan window for a particular scan head's camera to restrict its field of view when scanning.
EXPORTED int32_t PRE 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.
function jsScanHeadSetWindowRectangularLaser¶
Sets a rectangular scan window for a particular scan head's laser to restrict its field of view when scanning.
EXPORTED int32_t PRE 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.
function jsScanHeadSetWindowUnconstrained¶
Resets the scan windows for a scan head to be the full field of view.
EXPORTED int32_t PRE jsScanHeadSetWindowUnconstrained (
jsScanHead scan_head
)
Parameters:
scan_headReference to scan head.
Returns:
0 on success, negative value mapping to jsError on error.
function jsScanHeadSetWindowUnconstrainedCamera¶
Resets the scan window for a particular scan head's camera to be the full field of view.
EXPORTED int32_t PRE 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.
function jsScanHeadSetWindowUnconstrainedLaser¶
Resets the scan window for a particular scan head's laser to be the full field of view.
EXPORTED int32_t PRE 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.
function 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.
EXPORTED int32_t PRE 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.
function jsScanSystemGetIdleScanPeriod¶
Returns the idle scan period set by jsScanSystemSetIdleScanPeriod .
EXPORTED int32_t PRE 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.
function jsScanSystemGetMinScanPeriod¶
Obtains the minimum period that a given scan system can achieve scanning when jsScanSystemStartScanning is called.
EXPORTED int32_t PRE 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.
function jsScanSystemGetScanSyncEncoder¶
Obtains the ScanSync assigned to an encoder index.
EXPORTED int PRE 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.
function jsScanSystemGetScanSyncStatus¶
Obtains the status of a given ScanSync.
EXPORTED int PRE 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.
function 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 .
EXPORTED bool PRE jsScanSystemIsConfigured (
jsScanSystem scan_system
)
Parameters:
scan_systemReference to system of scan heads.
Returns:
Boolean true if configured, false otherwise.
function jsScanSystemIsIdleScanningEnabled¶
Gets whether idle scanning is enabled for the scan system.
EXPORTED bool PRE 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.
function jsScanSystemPhaseClearAll¶
Clears all phases created for a given scan system previously made through jsScanSystemPhaseCreate .
EXPORTED int32_t PRE jsScanSystemPhaseClearAll (
jsScanSystem scan_system
)
Parameters:
scan_systemReference to the scan system.
Returns:
0 on success, negative value mapping to jsError on error.
function 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.
EXPORTED int32_t PRE jsScanSystemPhaseCreate (
jsScanSystem scan_system
)
Parameters:
scan_systemReference to the scan system.
Returns:
0 on success, negative value mapping to jsError on error.
function 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.
EXPORTED int32_t PRE 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.
function jsScanSystemPhaseInsertCameraConfiguration¶
DEPRECATED EXPORTED int32_t PRE jsScanSystemPhaseInsertCameraConfiguration (
jsScanSystem scan_system,
jsScanHead scan_head,
jsCamera camera,
jsScanHeadConfiguration cfg
)
Deprecated
Use jsScanSystemPhaseInsertConfigurationCamera.
Returns:
JS_ERROR_INVALID_ARGUMENT
function 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.
EXPORTED int32_t PRE 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.
function 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.
EXPORTED int32_t PRE 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.
function 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.
EXPORTED int32_t PRE 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.
function jsScanSystemPhaseInsertLaserConfiguration¶
DEPRECATED EXPORTED int32_t PRE jsScanSystemPhaseInsertLaserConfiguration (
jsScanSystem scan_system,
jsScanHead scan_head,
jsLaser laser,
jsScanHeadConfiguration cfg
)
Deprecated
Use jsScanSystemPhaseInsertConfigurationLaser.
Returns:
JS_ERROR_INVALID_ARGUMENT
function jsScanSystemSetDefaultScanSyncEncoder¶
Clear the ScanSync mapping and use the default (lowest serial is MAIN)
EXPORTED int PRE jsScanSystemSetDefaultScanSyncEncoder (
jsScanSystem scan_system
)
Parameters:
scan_systemReference to system of scan heads.
Returns:
0 on success, negative value jsError on error.
function 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.
EXPORTED int32_t PRE 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.
function jsScanSystemSetScanSyncEncoder¶
Assigns one or many ScanSyncs to an encoder index within the scan system to then be applied to all of its scan heads.
EXPORTED int PRE 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.