1 /**********
2 *
3 * This file is part of the TINA Open Source Image Analysis Environment
4 * henceforth known as TINA
5 *
6 * TINA is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as
8 * published by the Free Software Foundation.
9 *
10 * TINA is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with TINA; if not, write to the Free Software Foundation, Inc.,
17 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 **********
20 *
21 * Program : TINA
22 * File : $Source: /home/tina/cvs/tina-libs/tina/geometry/geomDef.h,v $
23 * Date : $Date: 2002/12/09 11:51:23 $
24 * Version : $Revision: 1.1.1.1 $
25 * CVS Id : $Id: geomDef.h,v 1.1.1.1 2002/12/09 11:51:23 cvstina Exp $
26 *
27 * Notes : structure definitions of general tina primitives
28 *
29 *********
30 */
31
32 #ifndef TINA_GEOM_DEF_HDR
33 #define TINA_GEOM_DEF_HDR
34
35 #include <tina/geometry/geom_CamDef.h>
36 #include <tina/geometry/geom_CurveDef.h>
37 #include <tina/geometry/geom_EdgeDef.h>
38 #include <tina/geometry/geom_GenDef.h>
39 #include <tina/geometry/geom_LineDef.h>
40 #include <tina/geometry/geom_PlaneDef.h>
41 #include <tina/geometry/geom_PointDef.h>
42 #include <tina/geometry/geom_ScalarDef.h>
43 #include <tina/geometry/geom_SplineDef.h>
44 #include <tina/geometry/geom_TransDef.h>
45 #include <tina/geometry/geom_IndxDef.h>
46
47 #define DD_GET_POS2(dd, p) { Vec2 vec2_zero();\
48 switch ((dd)->type) { \
49 case EDGE: (p) = ((Edgel *)(dd)->to)->pos; break; \
50 case VEC2: (p) = *((Vec2 *)(dd)->to); break; \
51 default: p=vec2_zero(); break; } \
52 }
53
54 #define GET_POS2(ptr, type, p) { Vec2 vec2_zero();\
55 switch (type) { \
56 case EDGE: (p) = ((Edgel *)(ptr))->pos; break; \
57 case VEC2: (p) = *((Vec2 *)(ptr)); break; \
58 default: p=vec2_zero(); break; } \
59 }
60
61 #define DD_SET_POS2(dd, p) { \
62 switch ((dd)->type) { \
63 case EDGE: ((Edgel *)(dd)->to)->pos = (p); break; \
64 case VEC2: *((Vec2 *)(dd)->to) = (p); break; \
65 default: break; } \
66 }
67
68 #define DD_EDGE(dd) ((Edgel *)(dd)->to)
69
70 #define DD_EDGE_POS(dd) (((Edgel *)(dd)->to)->pos)
71
72 /** basic projection macros **/
73 #define vec3_of_vec2(v) vec3(vec2_x(v), vec2_y(v), 0.0)
74 #define vec2_of_vec3(v) vec2(vec3_x(v), vec3_y(v))
75 #define proj3_of_vec2(v) vec3(vec2_x(v), vec2_y(v), 1.0)
76 #define proj2_of_vec3(v) vec2(vec3_x(v)/vec3_z(v), vec3_y(v)/vec3_z(v))
77
78
79 /* The stuff from the tina_types.h header: should eventually go into sys */
80
81
82 /*
83 * tina types range from 300 to 999
84 * they are used to identify tina objects
85 * and specify sub types
86 */
87
88 /* data types and specifiers 300-349 */
89 #define EDGE 300
90 #define CORNER 302
91 #define SCALAR 303
92 #define POINT2 304
93 #define POINT3 305
94 #define LINE2 306
95 #define LINE3 307
96 #define PLANE 308
97 #define TRANSF3 309
98 #define CONIC2 310
99 #define CONIC3 311
100 #define CURVE2 312
101 #define CURVE3 313
102 #define SPLINE 314
103 #define TRIANGLE2 315
104 #define TRIANGLE3 316
105 #define STATS 317
106 #define CONE 318
107 #define GRAPHIC 319
108
109 #define GEOMETRY_2 320
110 #define GEOMETRY_3 321
111 #define STRAIGHT 322
112 /* #define LOOP 323 moved */
113 #define RECTPOS 324
114 #define IMPOS 325
115 #define TOPOLOGY 326
116 #define CURVE 327
117 #define CORRPOS 328
118
119 #define ELLIPSE 330
120 #define HYPERBOLA 331
121 #define DEGENERATE 332
122 #define CIRCLE 333
123
124 #define LINE_NO_FIT 340
125 #define LINE_REG_FIT 341
126 #define TWODIM 342
127 #define THREEDIM 343
128 #define LEFT 344
129 #define RIGHT 345
130 #define FORWARD 346
131 #define BACKWARD 347
132
133 /* match and types of match 350-379*/
134
135 #define MATCH 350
136 #define MLIST 351
137
138 #define REJECT_MATCH 360
139 #define BAD_MATCH 361
140 #define POT_MATCH 362
141 #define GOOD_MATCH 363
142 #define FIXED_MATCH 364
143
144 #define MATCH_SUPPORT 370
145 #define DISPARITY 371
146
147 /* model matching */
148
149 #define ISO_ERROR 380
150 #define PWR 381
151 #define PWRTE 382
152 #define MATCH_CLICHE 383
153
154 /* hough transform */
155 #define HOUGH_PEAK_TYPE 385
156 #define HOUGH1_PEAK 386
157 #define HOUGH2_PEAK 387
158 #define HOUGH1_ROI_TYPE 388
159 #define HOUGH2_ROI_TYPE 389
160
161 /* dynamic programming */
162
163 #define DP_INDICES 390
164 #define DP_INDEX 391
165
166 /* edgerect properties */
167
168 #define EDGERECT 400
169 #define ER_TERMINS 401
170 #define ER_JUNCTIONS 402
171 #define ER_ROWS 403
172 #define ER_STRINGS 404
173 #define ER_SINDEX 405
174 #define ER_MLIST 406
175 #define ES_MLIST 407
176 #define ER_FINDEX 408
177 #define ER_TINDEX 409
178
179 /* camera types */
180
181 #define CAMERA_PHYSICAL 420
182 #define CAMERA_PARALLEL 421
183
184 /* others */
185
186 #define SINDEX 430
187 #define FROM_FILE 431
188 #define PATCH 432
189 #define BACKTEMP 433
190 #define FORTEMP 434
191
192
193 /* special properties */
194
195 #define REMOVE_ME 900
196 #define IGNORE_ME 901
197
198
199 #endif /* TINA_GEOM_DEF_HDR */
200
201
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.