| MikroCAD SDK Library

- Home
- All Types
- Files

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
MC3DDataExport.h File Reference

## Description

Function prototypes for data export functions.

Author
  LMI Technologies

Go to the source code of this file.

## Functions
MC3D_EXPORT bool __cdecl | MC3D_CreateSinusCosinusTable (double *pdCosTab, double *pdSinTab, long lSize, bool bSinNegative)
| Calculates a sinus and cosine table, used for FFT. More...
MC3D_EXPORT bool __cdecl | MC3D_FastFourierTrafo (double *pdCosValue, double *pdSinValue, double *pdCosTab, double *pdSinTab, long lSize)
| Fast Fourier transformation. More...
MC3D_EXPORT bool __cdecl | MC3D_FastFourierTrafo2D (float *pfRealVal, float *pfImagVal, short nSizeX, short nSizeY, eMC3DFilterDirection Direction, bool bBackTrafo)
| Fast Fourier transformation in a plane. More...
MC3D_EXPORT bool __cdecl | MC3D_InverseMatrix (double *pdMatrix, double *pdInvMatrix, int nSize)
| Calculates the inverse of a double matrix. More...
MC3D_EXPORT bool __cdecl | MC3D_InverseMatrixFloat (float *pfMatrix, float *pfInvMatrix, int nSize)
| Calculates the inverse of a float matrix. More...
MC3D_EXPORT int __cdecl | MC3D_RangeAnalysisDouble (double *pdData, int *pnRanges, short nSizeX, short nSizeY, double dLowerLimit, double dUpperLimit, eRangeAnalysisEvalMode EvalMode)
| Does a range analysis of an array of double. More...
MC3D_EXPORT int __cdecl | MC3D_RangeAnalysisFloat (float *pfData, int *pnRanges, short nSizeX, short nSizeY, float fLowerLimit, float fUpperLimit, eRangeAnalysisEvalMode EvalMode)
| Does a range analysis of an array of float. More...
MC3D_EXPORT int __cdecl | MC3D_RangeAnalysisLong (long *plData, int *pnRanges, short nSizeX, short nSizeY, long lLowerLimit, int lUpperLimit, eRangeAnalysisEvalMode EvalMode)
| Does a range analysis off an array of long. More...
MC3D_EXPORT int __cdecl | MC3D_RangeAnalysisShort (short *pnData, int *pnRanges, short nSizeX, short nSizeY, short nLowerLimit, short nUpperLimit, eRangeAnalysisEvalMode EvalMode)
| Does a range analysis of an array of short. More...
MC3D_EXPORT bool __cdecl | MC3D_ShortArrayToByteArray (short *pnData, bool *pbValid, unsigned char *pbyData, short nSizeX, short nSizeY, short nMinimum, short nMaximum, unsigned char byInvalidValue=0)
| Scale short array to byte array based on given minimum and maximum Invalid values are becoming byInvalidValue (default 0), valid based on scale are between 1 and 255. More...
MC3D_EXPORT bool __cdecl | MC3D_ShortArrayToByteArrayRel (short *pnData, bool *pbValid, unsigned char *pbyData, short nSizeX, short nSizeY, int &nFactor, int &nOfs, unsigned char byInvalidValue=0)
| Scale short array to byte array. More...
MC3D_EXPORT bool __cdecl | MC3D_ShrinkDataArrayByte (unsigned char *pbyOut, unsigned char *pbyIn, bool *pbValidOut, bool *pbValidIn, short nSizeX, short nSizeY, short nShrinkFactor)
| Shrinks a byte array by an given factor. More...
MC3D_EXPORT bool __cdecl | MC3D_ShrinkDataArrayShort (short *pnOut, short *pnIn, bool *pbValidOut, bool *pbValidIn, short nSizeX, short nSizeY, short nShrinkFactor)
| Shrinks a short array by an given factor. More...

## Function Documentation

MC3D_EXPORT bool __cdecl MC3D_CreateSinusCosinusTable | ( | double * | pdCosTab,
|  | double * | pdSinTab,
|  | long | lSize,
|  | bool | bSinNegative
| ) |  |

Calculates a sinus and cosine table, used for FFT.

Parameters

  pdCosTab | Output cosine table
  pdSinTab | Output sinus table
  lSize | Size of table
  bSinNegative | Is sin negative (inverted at x axis)

Returns
  Success (true) or failure

MC3D_EXPORT bool __cdecl MC3D_FastFourierTrafo | ( | double * | pdCosValue,
|  | double * | pdSinValue,
|  | double * | pdCosTab,
|  | double * | pdSinTab,
|  | long | lSize
| ) |  |

Fast Fourier transformation.

Parameters

  pdCosValue | Output cosine values
  pdSinValue | Output sinus values
  pdCosTab | Input cosine table
  pdSinTab | Input sinus table
  lSize | Size of table

Returns
  Success (true) or failure

MC3D_EXPORT bool __cdecl MC3D_FastFourierTrafo2D | ( | float * | pfRealVal,
|  | float * | pfImagVal,
|  | short | nSizeX,
|  | short | nSizeY,
|  | eMC3DFilterDirection | Direction,
|  | bool | bBackTrafo
| ) |  |

Fast Fourier transformation in a plane.

Parameters

  pfRealVal | Real values
  pfImagVal | Imaginary values
  nSizeX | Size in X
  nSizeY | Size in Y
  Direction | Filter direction
  bBackTrafo | True if back transformation, otherwise false

Returns
  Success (true) or failure

MC3D_EXPORT bool __cdecl MC3D_InverseMatrix | ( | double * | pdMatrix,
|  | double * | pdInvMatrix,
|  | int | nSize
| ) |  |

Calculates the inverse of a double matrix.

Parameters

  pdMatrix | Input matrix
  pdInvMatrix | Output inverted matrix
  nSize | Number of rows and columns

Returns
  Success (true) or failure

MC3D_EXPORT bool __cdecl MC3D_InverseMatrixFloat | ( | float * | pfMatrix,
|  | float * | pfInvMatrix,
|  | int | nSize
| ) |  |

Calculates the inverse of a float matrix.

Parameters

  pfMatrix | Input matrix
  pfInvMatrix | Output inverted matrix
  nSize | Number of rows and columns

Returns
  Success (true) or failure

MC3D_EXPORT int __cdecl MC3D_RangeAnalysisDouble | ( | double * | pdData,
|  | int * | pnRanges,
|  | short | nSizeX,
|  | short | nSizeY,
|  | double | dLowerLimit,
|  | double | dUpperLimit,
|  | eRangeAnalysisEvalMode | EvalMode
| ) |  |

Does a range analysis of an array of double.

Parameters

  pdData | Input data array
  pnRanges | Output, number of ranges
  nSizeX | Size in X
  nSizeY | Size in Y
  dLowerLimit | Lower limit
  dUpperLimit | Upper limit
  EvalMode | Evaluation mode, see eRangeAnalysisEvalMode

Returns
  Number of ranges or negative in case of an error

MC3D_EXPORT int __cdecl MC3D_RangeAnalysisFloat | ( | float * | pfData,
|  | int * | pnRanges,
|  | short | nSizeX,
|  | short | nSizeY,
|  | float | fLowerLimit,
|  | float | fUpperLimit,
|  | eRangeAnalysisEvalMode | EvalMode
| ) |  |

Does a range analysis of an array of float.

Parameters

  pfData | Input data array
  pnRanges | Output, number of ranges
  nSizeX | Size in X
  nSizeY | Size in Y
  fLowerLimit | Lower limit
  fUpperLimit | Upper limit
  EvalMode | Evaluation mode, see eRangeAnalysisEvalMode

Returns
  Number of ranges or negative in case of an error

MC3D_EXPORT int __cdecl MC3D_RangeAnalysisLong | ( | long * | plData,
|  | int * | pnRanges,
|  | short | nSizeX,
|  | short | nSizeY,
|  | long | lLowerLimit,
|  | int | lUpperLimit,
|  | eRangeAnalysisEvalMode | EvalMode
| ) |  |

Does a range analysis off an array of long.

Parameters

  plData | Input data array
  pnRanges | Output, number of ranges
  nSizeX | Size in X
  nSizeY | Size in Y
  lLowerLimit | Lower limit
  lUpperLimit | Upper limit
  EvalMode | Evaluation mode, see eRangeAnalysisEvalMode

Returns
  Number of ranges or negative in case of an error

MC3D_EXPORT int __cdecl MC3D_RangeAnalysisShort | ( | short * | pnData,
|  | int * | pnRanges,
|  | short | nSizeX,
|  | short | nSizeY,
|  | short | nLowerLimit,
|  | short | nUpperLimit,
|  | eRangeAnalysisEvalMode | EvalMode
| ) |  |

Does a range analysis of an array of short.

Parameters

  pnData | Input data array
  pnRanges | Output, number of ranges
  nSizeX | Size in X
  nSizeY | Size in Y
  nLowerLimit | Lower limit
  nUpperLimit | Upper limit
  EvalMode | Evaluation mode, see eRangeAnalysisEvalMode

Returns
  Number of ranges or negative in case of an error

MC3D_EXPORT bool __cdecl MC3D_ShortArrayToByteArray | ( | short * | pnData,
|  | bool * | pbValid,
|  | unsigned char * | pbyData,
|  | short | nSizeX,
|  | short | nSizeY,
|  | short | nMinimum,
|  | short | nMaximum,
|  | unsigned char | byInvalidValue = `0`
| ) |  |

Scale short array to byte array based on given minimum and maximum Invalid values are becoming byInvalidValue (default 0), valid based on scale are between 1 and 255.

Parameters

  pnData | Input data array
  pbValid | Input valid array
  pbyData | Output data array
  nSizeX | Size in X
  nSizeY | Size in Y
  nMinimum | Minimum used for scaling
  nMaximum | Maximum used for scaling
  byInvalidValue | Value for invalid points

Returns
  Success (true) or failure

MC3D_EXPORT bool __cdecl MC3D_ShortArrayToByteArrayRel | ( | short * | pnData,
|  | bool * | pbValid,
|  | unsigned char * | pbyData,
|  | short | nSizeX,
|  | short | nSizeY,
|  | int & | nFactor,
|  | int & | nOfs,
|  | unsigned char | byInvalidValue = `0`
| ) |  |

Scale short array to byte array.

Invalid values are becoming byInvalidValue (default 0), valid based on scale are between 1 and 255

Parameters

  pnData | Input data array
  pbValid | Input valid array
  pbyData | Output data array
  nSizeX | Size in X
  nSizeY | Size in Y
  nFactor | Scaling factor used for scaling
  nOfs | Offset used for scaling
  byInvalidValue | Value for invalid points

Returns
  Success (true) or failure

MC3D_EXPORT bool __cdecl MC3D_ShrinkDataArrayByte | ( | unsigned char * | pbyOut,
|  | unsigned char * | pbyIn,
|  | bool * | pbValidOut,
|  | bool * | pbValidIn,
|  | short | nSizeX,
|  | short | nSizeY,
|  | short | nShrinkFactor
| ) |  |

Shrinks a byte array by an given factor.

Parameters

  pbyOut | Output data array
  pbyIn | Input data array
  pbValidOut | Output valid array
  pbValidIn | Input valid array
  nSizeX | Size in X
  nSizeY | Size in Y
  nShrinkFactor | Shrink factor

Returns
  Success (true) or failure

MC3D_EXPORT bool __cdecl MC3D_ShrinkDataArrayShort | ( | short * | pnOut,
|  | short * | pnIn,
|  | bool * | pbValidOut,
|  | bool * | pbValidIn,
|  | short | nSizeX,
|  | short | nSizeY,
|  | short | nShrinkFactor
| ) |  |

Shrinks a short array by an given factor.

Parameters

  pnOut | Output data array
  pnIn | Input data array
  pbValidOut | Output valid array
  pbValidIn | Input valid array
  nSizeX | Size in X
  nSizeY | Size in Y
  nShrinkFactor | Shrink factor

Returns
  Success (true) or failure