| MikroCAD SDK Library

- Home
- All Types
- Files

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MC3DFilterExport.h
Go to the documentation of this file.
1 /**
2 * @file MC3DFilterExport.h
3 * @brief Function prototypes for filter functions
4 *
5 * @author LMI Technologies
6 */
7
8 #ifndef _MC3DFilterExport_h
9 #define _MC3DFilterExport_h
10
11 #include <stddef.h>
12
13 #include "MC3DDefs.h"
14
15 #if defined(WIN32) || defined(WIN64)
16 # define MC3D_EXPORT __declspec(dllexport)
17 #else
18 # define MC3D_EXPORT
19 #endif
20
21 #ifdef __cplusplus
22 extern "C"
23 {
24 #endif
25
26 /**
27 Average filter
28
29 @param pnOut Output data array
30 @param pnIn Input data array
31 @param pbValid Input valid array
32 @param nSizeX Size in X
33 @param nSizeY Size in Y
34 @param nFilterSizeX Filter size in X
35 @param nFilterSizeY Filter size in Y
36 @param Direction Filter direction
37 @return Success (true) or failure
38 */
39 MC3D_EXPORT bool __cdecl MC3D_AverageFilter(
40 short *pnOut,
41 short *pnIn,
42 bool *pbValid,
43 short nSizeX,
44 short nSizeY,
45 short nFilterSizeX,
46 short nFilterSizeY,
47 eMC3DFilterDirection Direction);
48
49 /**
50 Median filter, old version
51
52 @param pnOut Output data array
53 @param pnIn Input data array
54 @param pbValid Input valid array
55 @param nSizeX Size in X
56 @param nSizeY Size in Y
57 @param nFilterSizeX Filter size in X
58 @param nFilterSizeY Filter size in Y
59 @param Direction Filter direction
60 @return Success (true) or failure
61 */
62 MC3D_EXPORT bool __cdecl MC3D_MedianFilter(
63 short *pnOut,
64 short *pnIn,
65 bool *pbValid,
66 short nSizeX,
67 short nSizeY,
68 short nFilterSizeX,
69 short nFilterSizeY,
70 eMC3DFilterDirection Direction);
71
72 /**
73 Median filter, new more robust version
74
75 @param pnOut Output data array
76 @param pnIn Input data array
77 @param pbValid Input valid array
78 @param pbMarkingValid Input mask array, can be NULL
79 @param nSizeX Size in X
80 @param nSizeY Size in Y
81 @param nFilterSizeX Filter size in X
82 @param nFilterSizeY Filter size in Y
83 @param Direction Filter direction
84 @return Success (true) or failure
85 */
86 MC3D_EXPORT bool __cdecl MC3D_MedianFilterRobust(
87 short *pnOut,
88 short *pnIn,
89 bool *pbValid,
90 bool *pbMarkingValid,
91 short nSizeX,
92 short nSizeY,
93 short nFilterSizeX,
94 short nFilterSizeY,
95 eMC3DFilterDirection Direction);
96
97 /**
98 Median filter, line based
99
100 @param pnOut Output data array
101 @param pnIn Input data array
102 @param nSizeX Size in X
103 @param nSizeY Size in Y
104 @param AOI Area of interest
105 @param nFilterSizeX Filter size in X
106 @param nFilterSizeY Filter size in Y
107 @param Direction Filter direction
108 @return Success (true) or failure
109 */
110 MC3D_EXPORT bool __cdecl MC3D_MedianFilterLine(
111 short *pnOut,
112 short *pnIn,
113 short nSizeX,
114 short nSizeY,
115 RECT& AOI,
116 short nFilterSizeX,
117 short nFilterSizeY,
118 eMC3DFilterDirection Direction);
119
120 /**
121 Gauss filter, line based
122
123 @param pnOut Output data array
124 @param pnIn Input data array
125 @param pbValid Valid array
126 @param nSizeX Size in X
127 @param nSizeY Size in Y
128 @param nFilterSizeX Filter size in X
129 @param nFilterSizeY Filter size in Y
130 @param Direction Filter direction
131 @return Success (true) or failure
132 */
133 MC3D_EXPORT bool __cdecl MC3D_GaussianFilter(
134 short *pnOut,
135 short *pnIn,
136 bool* pbValid,
137 short nSizeX,
138 short nSizeY,
139 short nFilterSizeX,
140 short nFilterSizeY,
141 eMC3DFilterDirection Direction);
142
143 /**
144 Remove invalid filter
145
146 @param pnOut Output data array
147 @param pnIn Input data array
148 @param pbValid Input valid array
149 @param pbMask Input mask array
150 @param nSizeX Size in X
151 @param nSizeY Size in Y
152 @param nFilterSizeX Filter size in X
153 @param nFilterSizeY Filter size in Y
154 @param Direction Filter direction
155 @param lMaximalRadius Maximum radius of invalid area
156 @param bUseEdges Include edges/border
157 @param lEnlargeInvalid Enlarge invalid area
158 @return Success (true) or failure
159 */
160 MC3D_EXPORT bool __cdecl MC3D_RemoveInvalid(
161 short *pnOut,
162 short *pnIn,
163 bool *pbValid,
164 bool *pbMask,
165 short nSizeX,
166 short nSizeY,
167 short nFilterSizeX,
168 short nFilterSizeY,
169 eMC3DFilterDirection Direction,
170 long lMaximalRadius,
171 bool bUseEdges,
172 long lEnlargeInvalid);
173
174 /**
175 Remove peaks filter
176
177 @param pnOut Output data array
178 @param pnIn Input data array
179 @param pbValid Input valid array
180 @param nSizeX Size in X
181 @param nSizeY Size in Y
182 @param nFilterSize Filter size
183 @param fWeight Weighting factor
184 @return Success (true) or failure
185 */
186 MC3D_EXPORT bool __cdecl MC3D_RemovePeaks(
187 short *pnOut,
188 short *pnIn,
189 bool *pbValid,
190 short nSizeX,
191 short nSizeY,
192 short nFilterSize,
193 float fWeight = 3.2);
194
195 /**
196 Lowpass filter
197
198 @param pnOut Output data array
199 @param pnIn Input data array
200 @param pbValid Input valid array
201 @param nSizeX Size in X
202 @param nSizeY Size in Y
203 @param nFilterSize Filter size
204 @param nRepeat Number of repetitions
205 @return Success (true) or failure
206 */
207 MC3D_EXPORT bool __cdecl MC3D_LowpassFilter(
208 short *pnOut,
209 short *pnIn,
210 bool *pbValid,
211 short nSizeX,
212 short nSizeY,
213 short nFilterSize,
214 short nRepeat);
215
216 /**
217 Highpass filter
218
219 @param pnOut Output data array
220 @param pnIn Input data array
221 @param pbValid Input valid array
222 @param nSizeX Size in X
223 @param nSizeY Size in Y
224 @param nFilterSize Filter size
225 @param nRepeat Number of repetitions
226 @return Success (true) or failure
227 */
228 MC3D_EXPORT bool __cdecl MC3D_HighpassFilter(
229 short *pnOut,
230 short *pnIn,
231 bool *pbValid,
232 short nSizeX,
233 short nSizeY,
234 short nFilterSize,
235 short nRepeat);
236
237 /**
238 Polynomial filter
239
240 @param pnOut Output data array
241 @param pnIn Input data array
242 @param pbValid Input valid array
243 @param pbMask Input mask array
244 @param nSizeX Size in X
245 @param nSizeY Size in Y
246 @param nPolynomialOrder Polynomial degree (0...8)
247 @param ReturnData Return data type
248 @param pfPolynomialParameter (Output) polynomial parameter
249 @return Success (true) or failure
250 */
251 MC3D_EXPORT bool __cdecl MC3D_PolynomialFilter(
252 short *pnOut,
253 short *pnIn,
254 bool *pbValid,
255 bool *pbMask,
256 short nSizeX,
257 short nSizeY,
258 short nPolynomialOrder,
259 ePolynomialFilterReturnData ReturnData = PolynomialFilterReturnData_Difference,
260 float *pfPolynomialParameter = NULL);
261
262 /**
263 Alignment - get transformation matrix
264
265 @param pnData Data array
266 @param pbValid Valid array
267 @param pbMask Mask array
268 @param nSizeX Size in X
269 @param nSizeY Size in Y
270 @param fScaleX Scaling factor in X
271 @param fScaleY Scaling factor in Y
272 @param fScaleZ Scaling factor in Z
273 @param pTrafo (Output) Transformation matrix
274 @return Success (true) or failure
275 */
276 MC3D_EXPORT bool __cdecl MC3D_GetAlignmentTransformationMatrix(
277 short *pnData,
278 bool *pbValid,
279 bool *pbMask,
280 short nSizeX,
281 short nSizeY,
282 float fScaleX,
283 float fScaleY,
284 float fScaleZ,
285 TCoordTransformation3DFloat *pTrafo);
286
287 /**
288 Align with a given transformation matrix
289
290 @param pnOut Output data array
291 @param pnIn Input data array
292 @param pbValid In- and output valid array
293 @param nSizeX Size in X
294 @param nSizeY Size in Y
295 @param fScaleX Scaling factor in X
296 @param fScaleY Scaling factor in Y
297 @param fScaleZ Scaling factor in Z
298 @param pTrafo (Output) Transformation matrix
299 @return Success (true) or failure
300 */
301 MC3D_EXPORT bool __cdecl MC3D_Transformation(
302 short *pnOut,
303 short *pnIn,
304 bool *pbValid,
305 short nSizeX,
306 short nSizeY,
307 float fScaleX,
308 float fScaleY,
309 float fScaleZ,
310 TCoordTransformation3DFloat *pTrafo);
311
312 /**
313 Align with valid array
314
315 @param pnData In- and output data array
316 @param pbValid In- and output valid array
317 @param pbMask Mask array
318 @param nSizeX Size in X
319 @param nSizeY Size in Y
320 @param fScaleX Scaling factor in X
321 @param fScaleY Scaling factor in Y
322 @param fScaleZ Scaling factor in Z
323 @return Success (true) or failure
324 */
325 MC3D_EXPORT bool __cdecl MC3D_Alignment(
326 short* pnData,
327 bool* pbValid,
328 bool* pbMask,
329 short nSizeX,
330 short nSizeY,
331 float fScaleX,
332 float fScaleY,
333 float fScaleZ);
334
335 /**
336 Fourier filter in the plane
337
338 @param pnOut Output data array
339 @param pnIn Input data array
340 @param pbValid Valid array
341 @param pROI Region of interest
342 @param nSizeX Size in X
343 @param nSizeY Size in Y
344 @param nCuttOffWaveLength Threshold wavelength (pixel)
345 @param InnerFilterType Inner filter type
346 @param nRepeat Number of repetitions
347 @param ReturnData Return type
348 @return Success (true) or failure
349 */
350 MC3D_EXPORT bool __cdecl MC3D_FourierFilter2D(
351 short *pnOut,
352 short *pnIn,
353 bool *pbValid,
354 TROIShort *pROI,
355 short nSizeX,
356 short nSizeY,
357 int nCuttOffWaveLength,
358 eFourierFilterType InnerFilterType,
359 short nRepeat,
360 eFourierFilterReturnData ReturnData);
361
362 /**
363 Polynomial estimation in the plane or its difference from the input data
364
365 @param pfValue Data array
366 @param pfPolynomParam Polynomial parameter
367 @param nSizeX Size in X
368 @param nPolynomialOrder Polynomial order
369 @param bDifference Difference as output
370 @return Success (true) or failure
371 */
372 MC3D_EXPORT bool __cdecl MC3D_Polynom2D(
373 float *pfValue,
374 float *pfPolynomParam,
375 int nSizeX,
376 short nPolynomialOrder,
377 bool bDifference);
378
379 /**
380 Fourier-Lorenzfilter in the plane
381
382 @param pfValue Data array
383 @param nNumValues Number of values
384 @param nCutOffWaveLength Threshold wavelength (pixel)
385 @return Success (true) or failure
386 */
387 MC3D_EXPORT bool __cdecl MC3D_FourierLorenzFilter2D(
388 float *pfValue,
389 short nNumValues,
390 short nCutOffWaveLength);
391
392 #ifdef __cplusplus
393 }
394 #endif
395
396 #endif // _MC3DFilterExport_h
eFourierFilterReturnData
eFourierFilterReturnData
Return value for Fourier filter.
Definition: MC3DDefs.h:102
MC3D_GaussianFilter
MC3D_EXPORT bool __cdecl MC3D_GaussianFilter(short *pnOut, short *pnIn, bool *pbValid, short nSizeX, short nSizeY, short nFilterSizeX, short nFilterSizeY, eMC3DFilterDirection Direction)
Gauss filter, line based.
TCoordTransformation3DFloat
A structure for 3d coordinate transformation (rotation and translation)
Definition: MC3DDefs.h:29
MC3D_RemoveInvalid
MC3D_EXPORT bool __cdecl MC3D_RemoveInvalid(short *pnOut, short *pnIn, bool *pbValid, bool *pbMask, short nSizeX, short nSizeY, short nFilterSizeX, short nFilterSizeY, eMC3DFilterDirection Direction, long lMaximalRadius, bool bUseEdges, long lEnlargeInvalid)
Remove invalid filter.
MC3D_FourierFilter2D
MC3D_EXPORT bool __cdecl MC3D_FourierFilter2D(short *pnOut, short *pnIn, bool *pbValid, TROIShort *pROI, short nSizeX, short nSizeY, int nCuttOffWaveLength, eFourierFilterType InnerFilterType, short nRepeat, eFourierFilterReturnData ReturnData)
Fourier filter in the plane.
MC3D_Transformation
MC3D_EXPORT bool __cdecl MC3D_Transformation(short *pnOut, short *pnIn, bool *pbValid, short nSizeX, short nSizeY, float fScaleX, float fScaleY, float fScaleZ, TCoordTransformation3DFloat *pTrafo)
Align with a given transformation matrix.
MC3D_MedianFilter
MC3D_EXPORT bool __cdecl MC3D_MedianFilter(short *pnOut, short *pnIn, bool *pbValid, short nSizeX, short nSizeY, short nFilterSizeX, short nFilterSizeY, eMC3DFilterDirection Direction)
Median filter, old version.
TROIShort
Region of interest definition.
Definition: MC3DDefs.h:82
ePolynomialFilterReturnData
ePolynomialFilterReturnData
Return value of the polynomial filter.
Definition: MC3DDefs.h:73
MC3D_Polynom2D
MC3D_EXPORT bool __cdecl MC3D_Polynom2D(float *pfValue, float *pfPolynomParam, int nSizeX, short nPolynomialOrder, bool bDifference)
Polynomial estimation in the plane or its difference from the input data.
MC3D_Alignment
MC3D_EXPORT bool __cdecl MC3D_Alignment(short *pnData, bool *pbValid, bool *pbMask, short nSizeX, short nSizeY, float fScaleX, float fScaleY, float fScaleZ)
Align with valid array.
MC3D_GetAlignmentTransformationMatrix
MC3D_EXPORT bool __cdecl MC3D_GetAlignmentTransformationMatrix(short *pnData, bool *pbValid, bool *pbMask, short nSizeX, short nSizeY, float fScaleX, float fScaleY, float fScaleZ, TCoordTransformation3DFloat *pTrafo)
Alignment - get transformation matrix.
MC3D_MedianFilterRobust
MC3D_EXPORT bool __cdecl MC3D_MedianFilterRobust(short *pnOut, short *pnIn, bool *pbValid, bool *pbMarkingValid, short nSizeX, short nSizeY, short nFilterSizeX, short nFilterSizeY, eMC3DFilterDirection Direction)
Median filter, new more robust version.
PolynomialFilterReturnData_Difference
Difference image.
Definition: MC3DDefs.h:75
MC3D_HighpassFilter
MC3D_EXPORT bool __cdecl MC3D_HighpassFilter(short *pnOut, short *pnIn, bool *pbValid, short nSizeX, short nSizeY, short nFilterSize, short nRepeat)
Highpass filter.
MC3D_FourierLorenzFilter2D
MC3D_EXPORT bool __cdecl MC3D_FourierLorenzFilter2D(float *pfValue, short nNumValues, short nCutOffWaveLength)
Fourier-Lorenzfilter in the plane.
MC3D_RemovePeaks
MC3D_EXPORT bool __cdecl MC3D_RemovePeaks(short *pnOut, short *pnIn, bool *pbValid, short nSizeX, short nSizeY, short nFilterSize, float fWeight=3.2)
Remove peaks filter.
MC3D_LowpassFilter
MC3D_EXPORT bool __cdecl MC3D_LowpassFilter(short *pnOut, short *pnIn, bool *pbValid, short nSizeX, short nSizeY, short nFilterSize, short nRepeat)
Lowpass filter.
MC3D_AverageFilter
MC3D_EXPORT bool __cdecl MC3D_AverageFilter(short *pnOut, short *pnIn, bool *pbValid, short nSizeX, short nSizeY, short nFilterSizeX, short nFilterSizeY, eMC3DFilterDirection Direction)
Average filter.
MC3DDefs.h
Common defines for the MikroCAD SDK library.
eMC3DFilterDirection
eMC3DFilterDirection
The direction of filter.
Definition: MC3DDefs.h:19
MC3D_PolynomialFilter
MC3D_EXPORT bool __cdecl MC3D_PolynomialFilter(short *pnOut, short *pnIn, bool *pbValid, bool *pbMask, short nSizeX, short nSizeY, short nPolynomialOrder, ePolynomialFilterReturnData ReturnData=PolynomialFilterReturnData_Difference, float *pfPolynomialParameter=NULL)
Polynomial filter.
MC3D_MedianFilterLine
MC3D_EXPORT bool __cdecl MC3D_MedianFilterLine(short *pnOut, short *pnIn, short nSizeX, short nSizeY, RECT &AOI, short nFilterSizeX, short nFilterSizeY, eMC3DFilterDirection Direction)
Median filter, line based.
eFourierFilterType
eFourierFilterType
Inner filter type in Fourier filter.
Definition: MC3DDefs.h:93