IDS peak ICV v1.3.0
Loading...
Searching...
No Matches
Types.cs
Go to the documentation of this file.
1using System.Runtime.InteropServices;
4
6
7internal static class Types
8{
9 internal enum peak_icv_point_type
10 {
11 PEAK_ICV_POINT_TYPE_XYZ = 0,
12 PEAK_ICV_POINT_TYPE_XYZ_I8 = 1,
13 PEAK_ICV_POINT_TYPE_XYZ_I10 = 2,
14 PEAK_ICV_POINT_TYPE_XYZ_I12 = 3,
15 PEAK_ICV_POINT_TYPE_XY = 4
16 }
17
18 internal enum peak_icv_status
19 {
20 PEAK_ICV_STATUS_SUCCESS = 0,
21 PEAK_ICV_STATUS_LIBRARY_NOT_INITIALIZED = 1,
22 PEAK_ICV_STATUS_DYNAMIC_DEPENDENCY_MISSING = 2,
23 PEAK_ICV_STATUS_MISMATCH = 3,
24 PEAK_ICV_STATUS_NOT_SUPPORTED = 4,
25 PEAK_ICV_STATUS_NOT_POSSIBLE = 5,
26 PEAK_ICV_STATUS_NULL_POINTER = 6,
27 PEAK_ICV_STATUS_INVALID_HANDLE = 7,
28 PEAK_ICV_STATUS_OUT_OF_RANGE = 8,
29 PEAK_ICV_STATUS_MATH_ERROR = 9,
30 PEAK_ICV_STATUS_TARGET_NOT_FOUND = 10,
31 PEAK_ICV_STATUS_CORRUPTED = 11,
32 PEAK_ICV_STATUS_IO_ERROR = 12,
33 PEAK_ICV_STATUS_INTERNAL_ERROR = 13,
34 PEAK_ICV_STATUS_INVALID_BUFFER_SIZE = 14
35 }
36
37 [StructLayout(LayoutKind.Sequential)]
38 internal struct peak_icv_point
39 {
40 public int x;
41 public int y;
42
43 public peak_icv_point(int xval, int yval)
44 {
45 x = xval;
46 y = yval;
47 }
48 }
49
50 [StructLayout(LayoutKind.Sequential)]
51 internal struct peak_common_point_u
52 {
53 public uint x;
54 public uint y;
55
56 public peak_common_point_u(uint xval, uint yval)
57 {
58 x = xval;
59 y = yval;
60 }
61 }
62
63 [StructLayout(LayoutKind.Sequential)]
64 internal struct peak_icv_point_f
65 {
66 public float x;
67 public float y;
68
69 public peak_icv_point_f(float xval, float yval)
70 {
71 x = xval;
72 y = yval;
73 }
74
75
76 public static implicit operator PointF(peak_icv_point_f p)
77 {
78 return new PointF(p.x, p.y);
79 }
80
81 public static implicit operator VectorF(peak_icv_point_f p)
82 {
83 return new VectorF(p.x, p.y);
84 }
85 }
86
87 [StructLayout(LayoutKind.Sequential)]
88 internal struct peak_common_rectangle
89 {
90 public int x;
91 public int y;
92 public uint width;
93 public uint height;
94 }
95
96 [StructLayout(LayoutKind.Sequential)]
97 internal struct peak_common_rectangle_u
98 {
99 public uint x;
100 public uint y;
101 public uint width;
102 public uint height;
103 }
104
105
106 [StructLayout(LayoutKind.Sequential)]
107 internal struct peak_common_size
108 {
109 public uint width;
110 public uint height;
111 }
112
113 [StructLayout(LayoutKind.Sequential)]
114 internal struct peak_icv_image_info
115 {
116 public PixelFormat pixelFormat;
117 public peak_common_size size;
118 public nuint bufferSize;
119 public IntPtr buffer;
120 }
121
122 [StructLayout(LayoutKind.Sequential)]
123 internal struct peak_icv_binning_factor
124 {
125 public uint x;
126 public uint y;
127 }
128
129 [StructLayout(LayoutKind.Sequential)]
130 internal struct peak_icv_capture_information
131 {
132 public peak_icv_binning_factor binning_factor;
133 public ulong relative_timestamp;
134 public peak_common_rectangle_u region_of_interest;
135 public double exposure_time;
136
137 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
138 public double[] exposure_time_sequence;
139
140 public double gain;
141
142 [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
143 public double[] gain_sequence;
144
145 public unsafe fixed byte reserved[24];
146 }
147
148
149 [StructLayout(LayoutKind.Sequential)]
150 internal struct peak_icv_prism_distortion
151 {
152 public unsafe fixed double coefficients[4];
153 }
154
155 [StructLayout(LayoutKind.Sequential)]
156 internal struct peak_icv_radial_distortion
157 {
158 public unsafe fixed double coefficients[6];
159 }
160
161 [StructLayout(LayoutKind.Sequential)]
162 internal struct peak_icv_tangential_distortion
163 {
164 public unsafe fixed double coefficients[2];
165 }
166
167 [StructLayout(LayoutKind.Sequential)]
168 internal struct peak_icv_tilt_distortion
169 {
170 public unsafe fixed double coefficients[2];
171 }
172
173 [StructLayout(LayoutKind.Sequential)]
174 internal struct peak_icv_distortion_coefficients
175 {
176 public peak_icv_radial_distortion radial_distortion;
177 public peak_icv_tangential_distortion tangential_distortion;
178 public peak_icv_prism_distortion prism_distortion;
179 public peak_icv_tilt_distortion tilt_distortion;
180 }
181
182 [StructLayout(LayoutKind.Sequential)]
183 internal record struct peak_icv_intrinsic_parameters
184 {
185 public peak_common_size image_size;
186 public peak_icv_binning_factor binning_factor;
187 public peak_icv_distortion_coefficients distortion_coefficients;
188 public peak_icv_point_f focal_length_pixel_size_ratio;
189 public peak_icv_point_f principle_point;
190 }
191
192 [StructLayout(LayoutKind.Sequential)]
193 internal struct peak_common_rectangle_f
194 {
195 public float x;
196 public float y;
197 public float width;
198 public float height;
199 }
200
201 [StructLayout(LayoutKind.Sequential)]
202 internal struct peak_icv_interval
203 {
204 public int minimum;
205 public int maximum;
206
207 public peak_icv_interval(int min, int max)
208 {
209 minimum = min;
210 maximum = max;
211 }
212 }
213
214 [StructLayout(LayoutKind.Sequential)]
215 internal struct peak_icv_interval_u
216 {
217 public uint minimum;
218 public uint maximum;
219 }
220
221 [StructLayout(LayoutKind.Sequential)]
222 internal struct peak_icv_interval_f
223 {
224 public float minimum;
225 public float maximum;
226
227 public peak_icv_interval_f(float min, float max)
228 {
229 minimum = min;
230 maximum = max;
231 }
232 }
233
234 [StructLayout(LayoutKind.Sequential)]
235 internal struct peak_icv_range_u
236 {
237 public uint minimum;
238 public uint maximum;
239 public uint increment;
240 }
241
242 [StructLayout(LayoutKind.Sequential)]
243 internal unsafe struct peak_icv_point_xyz
244 {
245 public float x;
246 public float y;
247 public float z;
248
249 public fixed float reserved[1];
250 }
251
252 [StructLayout(LayoutKind.Sequential)]
253 internal record struct peak_icv_extrinsic_parameters
254 {
255 public peak_icv_point_xyz rotation;
256 public peak_icv_point_xyz translation;
257 }
258
259 [StructLayout(LayoutKind.Sequential)]
260 internal struct peak_common_size_f
261 {
262 public float width;
263 public float height;
264 }
265
266 [StructLayout(LayoutKind.Sequential)]
267 internal struct peak_icv_drawing_options
268 {
269 public ulong color;
270 public uint opacity;
271 public unsafe fixed byte reserved[8];
272 }
273
274 [StructLayout(LayoutKind.Sequential)]
275 internal struct peak_icv_point_xyzi
276 {
277 public float x;
278 public float y;
279 public float z;
280 public ushort intensity;
281 }
282
283 [StructLayout(LayoutKind.Sequential)]
284 internal struct peak_icv_point_cloud_save_options
285 {
286 public unsafe fixed byte reserved[64];
287 }
288
289 [StructLayout(LayoutKind.Sequential)]
290 internal struct peak_common_version
291 {
292 public uint major;
293 public uint minor;
294 public uint patch;
295 public uint revision;
296 }
297
298 [StructLayout(LayoutKind.Sequential)]
299 internal struct peak_icv_binary_header
300 {
301 public uint marker;
302 public uint type;
303 public uint flags;
304 public peak_common_version version;
305 public uint crc;
306 }
307
308 [StructLayout(LayoutKind.Sequential)]
309 internal struct peak_icv_calibration_parameters
310 {
311 public peak_icv_intrinsic_parameters intrinsic_parameters;
312 public peak_icv_extrinsic_parameters extrinsic_parameters;
313 }
314
315 [StructLayout(LayoutKind.Sequential)]
317 {
318 public peak_icv_point_f position;
319 public peak_icv_point_f direction;
320 public double length;
321 public unsafe fixed byte reserved[40];
322 }
323
324 [StructLayout(LayoutKind.Sequential)]
326 {
327 public peak_icv_point_f origin;
328 public peak_icv_point_f x_axis;
329 public peak_icv_point_f y_axis;
330 public peak_icv_point_f z_axis;
331 }
332
333 [StructLayout(LayoutKind.Sequential)]
334 internal struct peak_icv_calibration_result_save_options
335 {
336 public unsafe fixed byte reserved[64];
337 }
338
339 [StructLayout(LayoutKind.Sequential)]
340 internal struct peak_icv_calibration_parameters_save_options
341 {
342 public unsafe fixed byte reserved[64];
343 }
344
345 internal enum peak_icv_archive_value_type
346 {
347 PEAK_ICV_ARCHIVE_VALUE_TYPE_BOOL = 0,
348 PEAK_ICV_ARCHIVE_VALUE_TYPE_BOOL_ARRAY = 1,
349 PEAK_ICV_ARCHIVE_VALUE_TYPE_INT = 2,
350 PEAK_ICV_ARCHIVE_VALUE_TYPE_INT_ARRAY = 3,
351 PEAK_ICV_ARCHIVE_VALUE_TYPE_DOUBLE = 4,
352 PEAK_ICV_ARCHIVE_VALUE_TYPE_DOUBLE_ARRAY = 5,
353 PEAK_ICV_ARCHIVE_VALUE_TYPE_STRING = 6,
354 PEAK_ICV_ARCHIVE_VALUE_TYPE_STRING_ARRAY = 7,
355 PEAK_ICV_ARCHIVE_VALUE_TYPE_ARCHIVE = 8,
356 PEAK_ICV_ARCHIVE_VALUE_TYPE_ARCHIVE_ARRAY = 9
357 }
358
359 [StructLayout(LayoutKind.Sequential)]
361 {
362 public float m_00;
363 public float m_01;
364 public float m_02;
365 public float m_10;
366 public float m_11;
367 public float m_12;
368 public float m_20;
369 public float m_21;
370 public float m_22;
371 }
372
373 internal enum peak_icv_color_space
374 {
375 PEAK_ICV_COLOR_SPACE_SRGB_D50 = 1,
376 PEAK_ICV_COLOR_SPACE_SRGB_D65 = 2,
377 PEAK_ICV_COLOR_SPACE_CIE_RGB_E = 3,
378 PEAK_ICV_COLOR_SPACE_ECI_RGB_D50 = 4,
379 PEAK_ICV_COLOR_SPACE_ADOBE_RGB_D65 = 5
380 }
381
382 internal enum peak_icv_chromatic_adaption_algorithm
383 {
384 PEAK_ICV_CHROMATIC_ADAPTION_ALGORITHM_LEGACY = 1,
385 PEAK_ICV_CHROMATIC_ADAPTION_ALGORITHM_BRADFORD = 2
386 }
387
388 internal enum peak_icv_gain_type
389 {
390 PEAK_ICV_GAIN_TYPE_MASTER = 0,
391 PEAK_ICV_GAIN_TYPE_RED = 1,
392 PEAK_ICV_GAIN_TYPE_GREEN = 2,
393 PEAK_ICV_GAIN_TYPE_BLUE = 3
394 }
395
396 internal enum peak_icv_preprocessing_transformation_rotation_angle
397 {
398 PEAK_ICV_PREPROCESSING_TRANSFORMATION_ROTATION_NONE = 0,
399 PEAK_ICV_PREPROCESSING_TRANSFORMATION_ROTATION_90_DEGREE_COUNTERCLOCKWISE = 90,
400 PEAK_ICV_PREPROCESSING_TRANSFORMATION_ROTATION_180_DEGREE = 180,
401 PEAK_ICV_PREPROCESSING_TRANSFORMATION_ROTATION_90_DEGREE_CLOCKWISE = 270
402 }
403
404 [StructLayout(LayoutKind.Sequential)]
405 internal struct peak_icv_preprocessing_transformation_parameters
406 {
407 [MarshalAs(UnmanagedType.I1)] public bool mirror_left_right;
408 [MarshalAs(UnmanagedType.I1)] public bool mirror_up_down;
409 public peak_icv_preprocessing_transformation_rotation_angle rotation_angle;
410
411 public peak_icv_preprocessing_transformation_parameters(bool mirrorLeftRight, bool mirrorUpDown,
412 peak_icv_preprocessing_transformation_rotation_angle rotationAngle)
413 {
414 mirror_left_right = mirrorLeftRight;
415 mirror_up_down = mirrorUpDown;
416 rotation_angle = rotationAngle;
417 }
418 }
419
420 internal enum peak_icv_downsampling_mode
421 {
422 PEAK_ICV_BINNING_AVERAGE = 0,
423 PEAK_ICV_BINNING_SUM = 1,
424 PEAK_ICV_DECIMATION = 2
425 }
426
427 [StructLayout(LayoutKind.Sequential)]
429 {
430 public unsafe fixed float values[4 * 4];
431 }
432}
Represents a 2D point with floating-point coordinates.
Definition Point.cs:126
Represents a 2D vector with floating-point values.
Definition Point.cs:182
PixelFormat
Each enumerator represents a specific pixel layout and bit-depth, used for interpreting raw image dat...