GoWebScan API
GoWebScanProfileYResampler.h
Go to the documentation of this file.
1 /**
2 * @file GoWebScanProfileYResampler.h
3 * @brief Declares a GoWebScanProfileYResampler object.
4 *
5 * @internal
6 * Copyright (C) 2017-2026 by LMI Technologies Inc.
7 * Licensed under the MIT License.
8 * Redistributed files must retain the above copyright notice.
9 */
10 
11 #ifndef GO_WEB_SCAN_PROFILE_Y_RESAMPLER_H
12 #define GO_WEB_SCAN_PROFILE_Y_RESAMPLER_H
13 
15 
16 /**
17 * @struct GoWebScanProfileYResamplerParams
18 * @extends kValue
19 * @ingroup GoWebScanSdk-Algorithms
20 * @brief Represents parameters of the profile Y-resampler algorithm.
21 */
23 {
24  k32s yResolution; ///< Expected Y-resolution of resampled output data (mils/pixel)
25  k32s fillDistance; ///< Maximum distance to nearest input row to fill with valid data (mils)
26  k32s breakDistance; ///< Profile messages with a Y position greater than this threshold from the current message will be cleared and recycled (mils).
27  kSSize pointCount; ///< Expected count of input raw profile data.
28  kSSize pointFields; ///< Size of each profile point in bytes.
30 
31 /**
32 * @class GoWebScanProfileYResampler
33 * @extends kObject
34 * @ingroup GoWebScanSdk-Algorithms
35 * @brief Represents an algorithm for resampling raw sensor geometric data in the Y-axis and
36 * applying calibration Y-offsets. The algorithm maintains a circular row buffer that covers
37 * enough distance in the Y-axis to account for the difference between the minimum and maximum
38 * calibration Y-offsets. The Y-resampler considers two input rows at a time, and for each column,
39 * selects the nearest input to fill in cells up to the Y-location of the second input row.
40 */
42 
43 /** Defines the signature for the handler for accepting the output resampled dataset. */
44 typedef kStatus(kCall *GoWebScanProfileYResamplerDataFx)(kPointer context, k64s rowIndex, const GoWebScanInputAttr* attributes, const void* points, kSSize pointCount);
45 
46 /**
47 * Constructs a GoWebScanProfileYResampler object.
48 *
49 * @public @memberof GoWebScanProfileYResampler
50 * @param resampler Receives the constructed GoWebScanProfileYResampler object.
51 * @param args Algorithm parameters.
52 * @param offsets Y-offsets, in mils, for each spot. Calculated during system calibration.
53 * @param allocator Memory allocator (or kNULL for default).
54 * @return Operation status.
55 */
56 GoWebScanFx(kStatus) GoWebScanProfileYResampler_Construct(GoWebScanProfileYResampler* resampler, const GoWebScanProfileYResamplerParams* args, const k32s* offsets, kAlloc allocator);
57 
58 /**
59 * Sets the handler for accepting the output data from the algorithm.
60 *
61 * @public @memberof GoWebScanProfileYResampler
62 * @param resampler GoWebScanProfileYResampler object.
63 * @param data Callback function
64 * @param context Receiver argument for callback.
65 * @return Operation status.
66 */
68 
69 /**
70 * Adds a raw sensor profile message to the algorithm's processing queue.
71 *
72 * @public @memberof GoWebScanProfileYResampler
73 * @param resampler GoWebScanProfileYResampler object.
74 * @param attributes Attributes of profile message.
75 * @param points Pointer to buffer containing raw sensor profile points.
76 * @param pointCount Count of profile points.
77 * @return Operation status.
78 */
79 GoWebScanFx(kStatus) GoWebScanProfileYResampler_AddData(GoWebScanProfileYResampler resampler, const GoWebScanInputAttr* attributes, const kPoint16s* points, kSSize pointCount);
80 
81 /**
82 * Clears and relinquishes input queue.
83 *
84 * @public @memberof GoWebScanProfileYResampler
85 * @param resampler GoWebScanProfileYResampler object.
86 * @return Operation status.
87 */
89 
90 #include <GoWebScanSdk/GoWebScanProfileYResampler.x.h>
91 
92 #endif
kStatus GoWebScanProfileYResampler_Construct(GoWebScanProfileYResampler *resampler, const GoWebScanProfileYResamplerParams *args, const k32s *offsets, kAlloc allocator)
Constructs a GoWebScanProfileYResampler object.
kStatus(kCall * GoWebScanProfileYResamplerDataFx)(kPointer context, k64s rowIndex, const GoWebScanInputAttr *attributes, const void *points, kSSize pointCount)
Defines the signature for the handler for accepting the output resampled dataset. ...
Definition: GoWebScanProfileYResampler.h:44
Essential GoWebScan declarations.
kSSize pointFields
Size of each profile point in bytes.
Definition: GoWebScanProfileYResampler.h:28
k32s breakDistance
Profile messages with a Y position greater than this threshold from the current message will be clear...
Definition: GoWebScanProfileYResampler.h:26
Represents the attributes of an input GoWebScan message object. These values are copied from the raw ...
Definition: GoWebScanSdkDef.h:527
kSSize pointCount
Expected count of input raw profile data.
Definition: GoWebScanProfileYResampler.h:27
Represents parameters of the profile Y-resampler algorithm.
Definition: GoWebScanProfileYResampler.h:22
Represents an algorithm for resampling raw sensor geometric data in the Y-axis and applying calibrati...
kStatus GoWebScanProfileYResampler_SetDataHandler(GoWebScanProfileYResampler resampler, GoWebScanProfileYResamplerDataFx data, kPointer context)
Sets the handler for accepting the output data from the algorithm.
k32s yResolution
Expected Y-resolution of resampled output data (mils/pixel)
Definition: GoWebScanProfileYResampler.h:24
k32s fillDistance
Maximum distance to nearest input row to fill with valid data (mils)
Definition: GoWebScanProfileYResampler.h:25
kStatus GoWebScanProfileYResampler_Clear(GoWebScanProfileYResampler resampler)
Clears and relinquishes input queue.
kStatus GoWebScanProfileYResampler_AddData(GoWebScanProfileYResampler resampler, const GoWebScanInputAttr *attributes, const kPoint16s *points, kSSize pointCount)
Adds a raw sensor profile message to the algorithm's processing queue.