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 . |
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. |
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 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_head
Reference to scan head.camera
The camera to get settings from.roll_degrees
Variable to hold roll in degrees.shift_x
Variable to hold shift in scan system units.shift_y
Variable 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_head
Reference to scan head.Laser
The laser to get settings from.roll_degrees
Variable to hold roll in degrees.shift_x
Variable to hold shift in scan system units.shift_y
Variable 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_head
Reference to scan head.camera
The camera the exclusion mask is applied to.correction
Pointer 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_head
Reference to scan head.laser
The laser the exclusion mask is applied to.correction
Pointer 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_head
Reference to scan head to be configured.cable_orientation
ThejsCableOrientation
to 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_head
Reference to scan head to be configured.cfg
ThejsScanHeadConfiguration
to 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_head
Reference to scan head to be configured.cfg
ThejsScanHeadConfiguration
to 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_head
Reference to scan head.camera
The camera the exclusion mask is applied to.mask
Pointer 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_head
Reference to scan head.laser
The laser the exclusion mask is applied to.mask
Pointer 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_head
Reference to scan head.idle_period_us
Pointer 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
.
EXPORTED int32_t PRE jsScanHeadGetMinimumEncoderTravel (
jsScanHead scan_head,
uint32_t * min_encoder_travel
)
Note:
This feature is currently not supported with frame scanning.
Parameters:
scan_head
Reference to scan head.min_encoder_travel
Pointer 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_head
Reference to scan head.camera
The 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_head
Reference to scan head.laser
The 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_head
Reference 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_head
Reference to scan head.camera
The camera to get the window from.points
Array 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_head
Reference to scan head.laser
The laser to get the window from.points
Array 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_head
Reference to scan head.camera
The camera to get the window type for.window_type
ThejsScanWindowType
to 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_head
Reference to scan head.laser
The laser to get the window type for.window_type
ThejsScanWindowType
to 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_head
Reference to scan head.roll_degrees
The rotation in degrees to be applied to the Z axis.shift_x
The shift to be applied specified in scan system units.shift_y
The 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_head
Reference to scan head.camera
The camera to apply parameters to.roll_degrees
The rotation in degrees to be applied.shift_x
The shift to be applied specified in scan system units.shift_y
The 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_head
Reference to scan head.laser
The laser to apply parameters to.roll_degrees
The rotation in degrees to be applied.shift_x
The shift to be applied specified in scan system units.shift_y
The 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_head
Reference to scan head.camera
The camera to apply brightness correction to.correction
Pointer 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_head
Reference to scan head.laser
The laser to apply brightness correction to.correction
Pointer 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_head
Reference to scan head to be configured.cable_orientation
ThejsCableOrientation
to 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_head
Reference to scan head to be configured.cfg
ThejsScanHeadConfiguration
to 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_head
Reference to scan head.camera
The camera to apply exclusion mask to.mask
Pointer 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_head
Reference to scan head.laser
The laser to apply exclusion mask to.mask
Pointer 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_head
Reference to scan head.idle_period_us
The idle scan period in microseconds
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_head
Reference to scan head.points
Array of coordinates defining the X/Y points of the polygon.points_len
The number of points in thepoints
array.
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_head
Reference to scan head.camera
The camera to apply the window to.points
Array of coordinates defining the X/Y points of the polygon.points_len
The number of points in thepoints
array.
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_head
Reference to scan head.laser
The laser to apply the window to.points
Array of coordinates defining the X/Y points of the polygon.points_len
The number of points in thepoints
array.
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_head
Reference to scan head.window_top
The top window dimension in scan system units.window_bottom
The bottom window dimension in scan system units.window_left
The left window dimension in scan system units.window_right
The 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_head
Reference to scan head.camera
The camera to apply the window to.window_top
The top window dimension in scan system units.window_bottom
The bottom window dimension in scan system units.window_left
The left window dimension in scan system units.window_right
The 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_head
Reference to scan head.laser
The laser to apply the window to.window_top
The top window dimension in scan system units.window_bottom
The bottom window dimension in scan system units.window_left
The left window dimension in scan system units.window_right
The 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_head
Reference 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_head
Reference to scan head.camera
The 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_head
Reference to scan head.laser
The 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_system
Reference 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_system
Reference to scan system.idle_period_us
Pointer 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_system
Reference 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_system
Reference to system of scan heads.index
Encoder index of ScanSync to obtain.serial_main
Pointer to be populated with ScanSync Main serial number.serial_aux1
Pointer to be populated with ScanSync Aux1 serial number.serial_aux2
Pointer 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_system
Reference to system of scan heads.serial
Serial number of the ScanSync.status
Pointer 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_system
Reference 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_system
Reference 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_system
Reference 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_system
Reference 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_system
Reference to the scan system.scan_head
Reference to the scan head.camera
The 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_system
Reference to the scan system.scan_head
Reference to the scan head.cfg
Configuration to be applied to the camera.camera
The 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_system
Reference to the scan system.scan_head
Reference to the scan head.cfg
Configuration to be applied to the laser.laser
The 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_system
Reference to the scan system.scan_head
Reference to the scan head.laser
The 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 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_system
Reference to scan system.idle_period_us
The 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_system
Reference to system of scan heads.serial_main
Serial number of the ScanSync Main, required.serial_aux1
Serial number of the ScanSync Aux1, orJS_SCANSYNC_INVALID_SERIAL
for unused.serial_aux2
Serial number of the ScanSync Aux2, orJS_SCANSYNC_INVALID_SERIAL
for unused.
Returns:
0
on success, negative value jsError
on error.