UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TVscaler.h
1 /* $Id: TVscaler.h,v 1.4 2008/06/03 08:32:32 vlad Exp $ */
2 
3 #ifndef __TVscaler_h
4 
5 #define __TVscaler_h
6 
7 #ifdef __cplusplus
8 extern "C" {
9 #endif /* __cplusplus */
10 
11 typedef struct
12 {
13  /* o - origin */
14  int oCnt; /* count of o and Amax == trCnt */
15  float Mt; /* time scaling {ms/points} */
16  int Ma; /* amplitude scaling {points for an amplitude} */
17  int o[1]; /* dynamic array of left down corner y-coordinates */
18 
19 } TraceScale;
20 
21 /* Tunes box for each trace.
22  Out:
23  *ppts - pointer on the result structure; must be released by free();
24  Returns:
25  0 - OK;
26  -1 - bad parameters;
27  -2 - memory allocation fault;
28  In:
29  trCnt - count of trace to visualize in window;
30  tPoint - count of points for the time dimention - width;
31  aPoints - count of points for the depth dimension - height;
32  _Tl - {ms} left time of the visualized trace;
33  _Tr - {ms} right time of the visualized trace;
34  _overlapping - {0..1} persent of usage other trace area;
35 */
36 int TVscaler (TraceScale** ppts, unsigned long trCnt,
37  unsigned int tPoints, float _Tl, float _Tr,
38  unsigned int aPoints, float _overlapping);
39 
40 float TransformTrCntToMa (unsigned int aPoints, float overlapping,
41  unsigned int trCnt);
42 unsigned int TransformMaToTrCnt (unsigned int aPoints, float overlapping,
43  unsigned int Ma);
44 
45 #ifdef __cplusplus
46 };
47 #endif /* __cplusplus */
48 
49 #endif /* TVscaler.h */
Definition: TVscaler.h:11