queso-0.53.0
ann2fig.cpp
Go to the documentation of this file.
1 //----------------------------------------------------------------------
2 // File: ann2fig.cpp
3 // Programmer: David Mount
4 // Last modified: 05/03/05
5 // Description: convert ann dump file to fig file
6 //----------------------------------------------------------------------
7 // Copyright (c) 1997-2005 University of Maryland and Sunil Arya and
8 // David Mount. All Rights Reserved.
9 //
10 // This software and related documentation is part of the Approximate
11 // Nearest Neighbor Library (ANN). This software is provided under
12 // the provisions of the Lesser GNU Public License (LGPL). See the
13 // file ../ReadMe.txt for further information.
14 //
15 // The University of Maryland (U.M.) and the authors make no
16 // representations about the suitability or fitness of this software for
17 // any purpose. It is provided "as is" without express or implied
18 // warranty.
19 //----------------------------------------------------------------------
20 // History:
21 // Revision 0.1 03/04/98
22 // Initial release
23 // Revision 1.0 04/01/05
24 // Changed dump file suffix from .ann to .dmp.
25 // Revision 1.1 05/03/05
26 // Fixed usage output string.
27 //----------------------------------------------------------------------
28 // This program inputs an ann dump file of a search structure
29 // perhaps along with point coordinates, and outputs a fig (Ver 3.1)
30 // file (see fig2dev (1)) displaying the tree. The fig file may
31 // then be displayed using xfig, or converted to any of a number of
32 // other formats using fig2dev.
33 //
34 // If the dimension is 2 then the entire tree is display. If the
35 // dimension is larger than 2 then the user has the option of
36 // selecting which two dimensions will be displayed, and the slice
37 // value for each of the remaining dimensions. All leaf cells
38 // intersecting the slice are shown along with the points in these
39 // cells. See the procedure getArgs() below for the command-line
40 // arguments.
41 //----------------------------------------------------------------------
42 
43 #include <cstdio> // C standard I/O
44 #include <cstdlib> // standard lib defs
45 #include <cstring> // C strings
46 #include <fstream> // file I/O
47 #include <string> // string manipulation
48 #include <ANN/ANNx.h> // all ANN includes
49 
50 using namespace std; // make std:: accessible
51 
52 //----------------------------------------------------------------------
53 // Globals and their defaults
54 //----------------------------------------------------------------------
55 
56 const int STRING_LEN = 500; // string lengths
57 const int MAX_DIM = 1000; // maximum dimension
58 const double DEF_SLICE_VAL = 0; // default slice value
59 const char FIG_HEAD[] = {"#FIG 3.1"}; // fig file header
60 const char DUMP_SUFFIX[] = {".dmp"}; // suffix for dump file
61 const char FIG_SUFFIX[] = {".fig"}; // suffix for fig file
62 
63 char file_name[STRING_LEN]; // (root) file name (say xxx)
64 char infile_name[STRING_LEN];// input file name (xxx.dmp)
65 char outfile_name[STRING_LEN];// output file name (xxx.fig)
66 char caption[STRING_LEN]; // caption line (= command line)
67 ofstream ofile; // output file stream
68 ifstream ifile; // input file stream
69 int dim_x = 0; // horizontal dimension
70 int dim_y = 1; // vertical dimension
71 double slice_val[MAX_DIM]; // array of slice values
72 double u_per_in = 1200; // fig units per inch (version 3.1)
73 double in_size = 5; // size of figure (in inches)
74 double in_low_x = 1; // fig upper left corner (in inches)
75 double in_low_y = 1; // fig upper left corner (in inches)
76 double u_size = 6000; // size of figure (in units)
77 double u_low_x = 1200; // fig upper left corner (in units)
78 double u_low_y = 1200; // fig upper left corner (in units)
79 int pt_size = 10; // point size (in fig units)
80 
81 int dim; // dimension
82 int n_pts; // number of points
83 ANNpointArray pts = NULL; // point array
84 
85 double scale; // scale factor for transformation
86 double offset_x; // offsets for transformation
87 double offset_y;
88 
89  // transformations
90 #define TRANS_X(p) (offset_x + scale*(p[dim_x]))
91 #define TRANS_Y(p) (offset_y - scale*(p[dim_y]))
92 
93 //----------------------------------------------------------------------
94 // Error handler
95 //----------------------------------------------------------------------
96 
97 void Error(const char* msg, ANNerr level)
98 {
99  if (level == ANNabort) {
100  cerr << "ann2fig: ERROR------->" << msg << "<-------------ERROR\n";
101  exit(1);
102  }
103  else {
104  cerr << "ann2fig: WARNING----->" << msg << "<-------------WARNING\n";
105  }
106 }
107 
108 //----------------------------------------------------------------------
109 // set_slice_val - set all slice values to given value
110 //----------------------------------------------------------------------
111 
112 void set_slice_val(double val)
113 {
114  for (int i = 0; i < MAX_DIM; i++) {
115  slice_val[i] = val;
116  }
117 }
118 
119 //----------------------------------------------------------------------
120 // getArgs - get input arguments
121 //
122 // Syntax:
123 // ann2fig [-upi scale] [-x low_x] [-y low_y]
124 // [-sz size] [-dx dim_x] [-dy dim_y] [-sl dim value]*
125 // [-ps pointsize]
126 // file
127 //
128 // where:
129 // -upi scale fig units per inch (default = 1200)
130 // -x low_x x and y offset of upper left corner (inches)
131 // -y low_y ...(default = 1)
132 // -sz size maximum side length of figure (in inches)
133 // ...(default = 5)
134 // -dx dim_x horizontal dimension (default = 0)
135 // -dy dim_y vertical dimension (default = 1)
136 // -sv value default slice value (default = 0)
137 // -sl dim value each such pair defines the value along the
138 // ...given dimension at which to slice. This
139 // ...may be supplied for all dimensions except
140 // ...dim_x and dim_y.
141 // -ps pointsize size of points in fig units (def = 10)
142 // file file (input=file.dmp, output=file.fig)
143 //
144 //----------------------------------------------------------------------
145 
146 void getArgs(int argc, char **argv)
147 {
148  int i;
149  int sl_dim; // temp slice dimension
150  double sl_val; // temp slice value
151 
152  set_slice_val(DEF_SLICE_VAL); // set initial slice-values
153 
154  if (argc <= 1) {
155  cerr << "Syntax:\n\
156  ann2fig [-upi scale] [-x low_x] [-y low_y]\n\
157  [-sz size] [-dx dim_x] [-dy dim_y] [-sl dim value]*\n\
158  file\n\
159  \n\
160  where:\n\
161  -upi scale fig units per inch (default = 1200)\n\
162  -x low_x x and y offset of upper left corner (inches)\n\
163  -y low_y ...(default = 1)\n\
164  -sz size maximum side length of figure (in inches)\n\
165  ...(default = 5)\n\
166  -dx dim_x horizontal dimension (default = 0)\n\
167  -dy dim_y vertical dimension (default = 1)\n\
168  -sv value default slice value (default = 0)\n\
169  -sl dim value each such pair defines the value along the\n\
170  ...given dimension at which to slice. This\n\
171  ...may be supplied for each dimension except\n\
172  ...dim_x and dim_y.\n\
173  -ps pointsize size of points in fig units (def = 10)\n\
174  file file (input=file.dmp, output=file.fig)\n";
175  exit(0);
176  }
177 
178  ANNbool fileSeen = ANNfalse; // file argument seen?
179 
180  for (i = 1; i < argc; i++) {
181  if (!strcmp(argv[i], "-upi")) { // process -upi option
182  sscanf(argv[++i], "%lf", &u_per_in);
183  }
184  else if (!strcmp(argv[i], "-x")) { // process -x option
185  sscanf(argv[++i], "%lf", &in_low_x);
186  }
187  else if (!strcmp(argv[i], "-y")) { // process -y option
188  sscanf(argv[++i], "%lf", &in_low_y);
189  }
190  else if (!strcmp(argv[i], "-sz")) { // process -sz option
191  sscanf(argv[++i], "%lf", &in_size);
192  }
193  else if (!strcmp(argv[i], "-dx")) { // process -dx option
194  sscanf(argv[++i], "%d", &dim_x);
195  }
196  else if (!strcmp(argv[i], "-dy")) { // process -dy option
197  sscanf(argv[++i], "%d", &dim_y);
198  }
199  else if (!strcmp(argv[i], "-sv")) { // process -sv option
200  sscanf(argv[++i], "%lf", &sl_val);
201  set_slice_val(sl_val); // set slice values
202  }
203  else if (!strcmp(argv[i], "-sl")) { // process -sl option
204  sscanf(argv[++i], "%d", &sl_dim);
205  if (sl_dim < 0 || sl_dim >= MAX_DIM) {
206  Error("Slice dimension out of bounds", ANNabort);
207  }
208  sscanf(argv[++i], "%lf", &slice_val[sl_dim]);
209  }
210  if (!strcmp(argv[i], "-ps")) { // process -ps option
211  sscanf(argv[++i], "%i", &pt_size);
212  }
213  else { // must be file name
214  fileSeen = ANNtrue;
215  sscanf(argv[i], "%s", file_name);
216  strcpy(infile_name, file_name); // copy to input file name
217  strcat(infile_name, DUMP_SUFFIX);
218  strcpy(outfile_name, file_name); // copy to output file name
219  strcat(outfile_name, FIG_SUFFIX);
220  }
221  }
222 
223  if (!fileSeen) { // no file seen
224  Error("File argument is required", ANNabort);
225  }
226 
227  ifile.open(infile_name, ios::in); // open for reading
228  if (!ifile) {
229  Error("Cannot open input file", ANNabort);
230  }
231  ofile.open(outfile_name, ios::out); // open for writing
232  if (!ofile) {
233  Error("Cannot open output file", ANNabort);
234  }
235 
236  u_low_x = u_per_in * in_low_x; // convert inches to fig units
238  u_size = u_per_in * in_size;
239 
240  strcpy(caption, argv[0]); // copy command line to caption
241  for (i = 1; i < argc; i++) {
242  strcat(caption, " ");
243  strcat(caption, argv[i]);
244  }
245 }
246 
247 //----------------------------------------------------------------------
248 // Graphics utilities for fig output
249 //
250 // writeHeader write header for fig file
251 // writePoint write a point
252 // writeBox write a box
253 // writeLine write a line
254 //----------------------------------------------------------------------
255 
257 {
258  ofile << FIG_HEAD << "\n" // fig file header
259  << "Portrait\n"
260  << "Center\n"
261  << "Inches\n"
262  << (int) u_per_in << " 2\n";
263 }
264 
265 void writePoint(ANNpoint p) // write a single point
266 {
267  // filled black point object
268  ofile << "1 3 0 1 -1 7 0 0 0 0.000 1 0.0000 ";
269  int cent_x = (int) TRANS_X(p); // transform center coords
270  int cent_y = (int) TRANS_Y(p);
271  ofile << cent_x << " " << cent_y << " " // write center, radius, bounds
272  << pt_size << " " << pt_size << " "
273  << cent_x << " " << cent_y << " "
274  << cent_x + pt_size << " " << cent_y + pt_size << "\n";
275 }
276 
277 void writeBox(const ANNorthRect &r) // write box
278 {
279  // unfilled box object
280  ofile << "2 2 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 5\n";
281 
282  int p0_x = (int) TRANS_X(r.lo); // transform endpoints
283  int p0_y = (int) TRANS_Y(r.lo);
284  int p1_x = (int) TRANS_X(r.hi);
285  int p1_y = (int) TRANS_Y(r.hi);
286  ofile << "\t"
287  << p0_x << " " << p0_y << " " // write vertices
288  << p1_x << " " << p0_y << " "
289  << p1_x << " " << p1_y << " "
290  << p0_x << " " << p1_y << " "
291  << p0_x << " " << p0_y << "\n";
292 }
293 
294 void writeLine(ANNpoint p0, ANNpoint p1) // write line
295 {
296  // unfilled line object
297  ofile << "2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 2\n";
298 
299  int p0_x = (int) TRANS_X(p0); // transform endpoints
300  int p0_y = (int) TRANS_Y(p0);
301  int p1_x = (int) TRANS_X(p1);
302  int p1_y = (int) TRANS_Y(p1);
303  ofile << "\t"
304  << p0_x << " " << p0_y << " " // write vertices
305  << p1_x << " " << p1_y << "\n";
306 }
307 
308 void writeCaption( // write caption text
309  const ANNorthRect &bnd_box, // bounding box
310  char *caption) // caption
311 {
312  if (!strcmp(caption, "\0")) return; // null string?
313  int px = (int) TRANS_X(bnd_box.lo); // put .5 in. lower left
314  int py = (int) (TRANS_Y(bnd_box.lo) + 0.50 * u_per_in);
315  ofile << "4 0 -1 0 0 0 20 0.0000 4 255 2000 ";
316  ofile << px << " " << py << " " << caption << "\\001\n";
317 }
318 
319 //----------------------------------------------------------------------
320 // overlap - test whether a box overlap slicing region
321 //
322 // The slicing region is a 2-dimensional plane in space
323 // which contains points (x1, x2, ..., xn) satisfying the
324 // n-2 linear equalities:
325 //
326 // xi == slice_val[i] for i != dim_x, dim_y
327 //
328 // This procedure returns true of the box defined by
329 // corner points box.lo and box.hi overlap this plane.
330 //----------------------------------------------------------------------
331 
333 {
334  for (int i = 0; i < dim; i++) {
335  if (i != dim_x && i != dim_y &&
336  (box.lo[i] > slice_val[i] || box.hi[i] < slice_val[i]))
337  return ANNfalse;
338  }
339  return ANNtrue;
340 }
341 
342 //----------------------------------------------------------------------
343 // readTree, recReadTree - inputs tree and outputs figure
344 //
345 // readTree procedure initializes things and then calls recReadTree
346 // which does all the work.
347 //
348 // recReadTree reads in a node of the tree, makes any recursive
349 // calls as needed to input the children of this node (if internal)
350 // and maintains the bounding box. Note that the bounding box
351 // is modified within this procedure, but it is the responsibility
352 // of the procedure that it be restored to its original value
353 // on return.
354 //
355 // Recall that these are the formats. The tree is given in
356 // preorder.
357 //
358 // Leaf node:
359 // leaf <n_pts> <bkt[0]> <bkt[1]> ... <bkt[n-1]>
360 // Splitting nodes:
361 // split <cut_dim> <cut_val> <lo_bound> <hi_bound>
362 // Shrinking nodes:
363 // shrink <n_bnds>
364 // <cut_dim> <cut_val> <side>
365 // <cut_dim> <cut_val> <side>
366 // ... (repeated n_bnds times)
367 //
368 // On reading a leaf we determine whether we should output the
369 // cell's points (if dimension = 2 or this cell overlaps the
370 // slicing region). For splitting nodes we check whether the
371 // current cell overlaps the slicing plane and whether the
372 // cutting dimension coincides with either the x or y drawing
373 // dimensions. If so, we output the corresponding splitting
374 // segment.
375 //----------------------------------------------------------------------
376 
378 {
379  char tag[STRING_LEN]; // tag (leaf, split, shrink)
380  int n_pts; // number of points in leaf
381  int idx; // point index
382  int cd; // cut dimension
383  ANNcoord cv; // cut value
384  ANNcoord lb; // low bound
385  ANNcoord hb; // high bound
386  int n_bnds; // number of bounding sides
387  int sd; // which side
388 
389  ifile >> tag; // input node tag
390  if (strcmp(tag, "leaf") == 0) { // leaf node
391 
392  ifile >> n_pts; // input number of points
393  // check for overlap
394  if (dim == 2 || overlap(box)) {
395  for (int i = 0; i < n_pts; i++) { // yes, write the points
396  ifile >> idx;
397  writePoint(pts[idx]);
398  }
399  }
400  else { // input but ignore points
401  for (int i = 0; i < n_pts; i++) {
402  ifile >> idx;
403  }
404  }
405  }
406  else if (strcmp(tag, "split") == 0) { // splitting node
407 
408  ifile >> cd >> cv >> lb >> hb;
409  if (lb != box.lo[cd] || hb != box.hi[cd]) {
410  Error("Bounding box coordinates are fishy", ANNwarn);
411  }
412 
413  ANNcoord lv = box.lo[cd]; // save bounds for cutting dim
414  ANNcoord hv = box.hi[cd];
415 
416  //--------------------------------------------------------------
417  // The following code is rather fragile so modify at your
418  // own risk. We first decrease the high-end of the bounding
419  // box down to the cutting plane and then read the left subtree.
420  // Then we increase the low-end of the bounding box up to the
421  // cutting plane (thus collapsing the bounding box to a d-1
422  // dimensional hyperrectangle). Then we draw the projection of
423  // its diagonal if it crosses the slicing plane. This will have
424  // the effect of drawing its intersection on the slicing plane.
425  // Then we restore the high-end of the bounding box and read
426  // the right subtree. Finally we restore the low-end of the
427  // bounding box, before returning.
428  //--------------------------------------------------------------
429  box.hi[cd] = cv; // decrease high bounds
430  recReadTree(box); // read left subtree
431  // check for overlap
432  box.lo[cd] = cv; // increase low bounds
433  if (dim == 2 || overlap(box)) { // check for overlap
434  if (cd == dim_x || cd == dim_y) { // cut through slice plane
435  writeLine(box.lo, box.hi); // draw cutting line
436  }
437  }
438  box.hi[cd] = hv; // restore high bounds
439 
440  recReadTree(box); // read right subtree
441  box.lo[cd] = lv; // restore low bounds
442  }
443  else if (strcmp(tag, "shrink") == 0) { // splitting node
444 
445  ANNorthRect inner(dim, box); // copy bounding box
446  ifile >> n_bnds; // number of bounding sides
447  for (int i = 0; i < n_bnds; i++) {
448  ifile >> cd >> cv >> sd; // input bounding halfspace
449  ANNorthHalfSpace hs(cd, cv, sd); // create orthogonal halfspace
450  hs.project(inner.lo); // intersect by projecting
451  hs.project(inner.hi);
452  }
453  if (dim == 2 || overlap(inner)) {
454  writeBox(inner); // draw inner rectangle
455  }
456  recReadTree(inner); // read inner subtree
457  recReadTree(box); // read outer subtree
458  }
459  else {
460  Error("Illegal node type in dump file", ANNabort);
461  }
462 }
463 
464 void readTree(ANNorthRect &bnd_box)
465 {
466  writeHeader(); // output header
467  writeBox(bnd_box); // draw bounding box
468  writeCaption(bnd_box, caption); // write caption
469  recReadTree(bnd_box); // do it
470 }
471 
472 //----------------------------------------------------------------------
473 // readANN - read the ANN dump file
474 //
475 // This procedure reads in the dump file. See the format below.
476 // It first reads the header line with version number. If the
477 // points section is present it reads them (otherwise just leaves
478 // points = NULL), and then it reads the tree section. It inputs
479 // the bounding box and determines the parameters for transforming
480 // the image to figure units. It then invokes the procedure
481 // readTree to do all the real work.
482 //
483 // Dump File Format: <xxx> = coordinate value (ANNcoord)
484 //
485 // #ANN <version number> <comments> [END_OF_LINE]
486 // points <dim> <n_pts> (point coordinates: this is optional)
487 // 0 <xxx> <xxx> ... <xxx> (point indices and coordinates)
488 // 1 <xxx> <xxx> ... <xxx>
489 // ...
490 // tree <dim> <n_pts> <bkt_size>
491 // <xxx> <xxx> ... <xxx> (lower end of bounding box)
492 // <xxx> <xxx> ... <xxx> (upper end of bounding box)
493 // If the tree is null, then a single line "null" is
494 // output. Otherwise the nodes of the tree are printed
495 // one per line in preorder. Leaves and splitting nodes
496 // have the following formats:
497 // Leaf node:
498 // leaf <n_pts> <bkt[0]> <bkt[1]> ... <bkt[n-1]>
499 // Splitting nodes:
500 // split <cut_dim> <cut_val> <lo_bound> <hi_bound>
501 // Shrinking nodes:
502 // shrink <n_bnds>
503 // <cut_dim> <cut_val> <side>
504 // <cut_dim> <cut_val> <side>
505 // ... (repeated n_bnds times)
506 //
507 // Note: Infinite lo_ and hi_bounds are printed as the special
508 // values "-INF" and "+INF", respectively. We do not
509 // check for this, because the current version of ANN
510 // starts with a finite bounding box if the tree is
511 // nonempty.
512 //----------------------------------------------------------------------
513 
514 void readANN()
515 {
516  int j;
517  char str[STRING_LEN]; // storage for string
518  char version[STRING_LEN]; // storage for version
519  int bkt_size; // bucket size
520 
521  ifile >> str; // input header
522  if (strcmp(str, "#ANN") != 0) { // incorrect header
523  Error("Incorrect header for dump file", ANNabort);
524  }
525  ifile.getline(version, STRING_LEN); // get version (ignore)
526  ifile >> str; // get major heading
527  if (strcmp(str, "points") == 0) { // points section
528  ifile >> dim; // read dimension
529  ifile >> n_pts; // number of points
530  pts = annAllocPts(n_pts, dim); // allocate points
531  for (int i = 0; i < n_pts; i++) { // input point coordinates
532  int idx; // point index
533  ifile >> idx; // input point index
534  if (idx < 0 || idx >= n_pts) {
535  Error("Point index is out of range", ANNabort);
536  }
537  for (j = 0; j < dim; j++) {
538  ifile >> pts[idx][j]; // read point coordinates
539  }
540  }
541  ifile >> str; // get next major heading
542  }
543  if (strcmp(str, "tree") == 0) { // tree section
544  ifile >> dim; // read dimension
545  if (dim_x > dim || dim_y > dim) {
546  Error("Dimensions out of bounds", ANNabort);
547  }
548  ifile >> n_pts; // number of points
549  ifile >> bkt_size; // bucket size (ignored)
550  // read bounding box
551  ANNorthRect bnd_box(dim); // create bounding box
552  for (j = 0; j < dim; j++) {
553  ifile >> bnd_box.lo[j]; // read box low coordinates
554  }
555  for (j = 0; j < dim; j++) {
556  ifile >> bnd_box.hi[j]; // read box high coordinates
557  }
558  // compute scaling factors
559  double box_len_x = bnd_box.hi[dim_x] - bnd_box.lo[dim_x];
560  double box_len_y = bnd_box.hi[dim_y] - bnd_box.lo[dim_y];
561  // longer side determines scale
562  if (box_len_x > box_len_y) scale = u_size/box_len_x;
563  else scale = u_size/box_len_y;
564  // compute offsets
565  offset_x = u_low_x - scale*bnd_box.lo[dim_x];
566  offset_y = u_low_y + scale*bnd_box.hi[dim_y];
567  readTree(bnd_box); // read the tree and process
568  }
569  else if (strcmp(str, "null") == 0) return; // empty tree
570  else {
571  cerr << "Input string: " << str << "\n";
572  Error("Illegal ann format. Expecting section heading", ANNabort);
573  }
574 }
575 
576 //----------------------------------------------------------------------
577 // Main program
578 //
579 // Gets the command-line arguments and invokes the main scanning
580 // procedure.
581 //----------------------------------------------------------------------
582 
583 main(int argc, char **argv)
584 {
585  getArgs(argc, argv); // get input arguments
586  readANN(); // read the dump file
587 }
double in_size
Definition: ann2fig.cpp:73
const int MAX_DIM
Definition: ann2fig.cpp:57
void writeBox(const ANNorthRect &r)
Definition: ann2fig.cpp:277
void writeHeader()
Definition: ann2fig.cpp:256
ANNbool
Definition: ANN.h:132
char infile_name[STRING_LEN]
Definition: ann2fig.cpp:64
int n_pts
Definition: ann2fig.cpp:82
void recReadTree(ANNorthRect &box)
Definition: ann2fig.cpp:377
const int STRING_LEN
Definition: ann2fig.cpp:56
and that you are informed that you can do these things To protect your we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it For if you distribute copies of the whether gratis or for a you must give the recipients all the rights that we gave you You must make sure that receive or can get the source code If you link other code with the you must provide complete object files to the so that they can relink them with the library after making changes to the library and recompiling it And you must show them these terms so they know their rights We protect your rights with a two step which gives you legal permission to distribute and or modify the library To protect each we want to make it very clear that there is no warranty for the free library if the library is modified by someone else and passed the recipients should know that what they have is not the original version
Definition: License.txt:60
ANNpointArray pts
Definition: ann2fig.cpp:83
void readANN()
Definition: ann2fig.cpp:514
Definition: ANNx.h:48
char outfile_name[STRING_LEN]
Definition: ann2fig.cpp:65
ofstream ofile
Definition: ann2fig.cpp:67
double ANNcoord
Definition: ANN.h:158
double offset_y
Definition: ann2fig.cpp:87
void getArgs(int argc, char **argv)
Definition: ann2fig.cpp:146
void readTree(ANNorthRect &bnd_box)
Definition: ann2fig.cpp:464
ANNerr
Definition: ANNx.h:48
Definition: ANNx.h:48
char file_name[STRING_LEN]
Definition: ann2fig.cpp:63
double u_low_x
Definition: ann2fig.cpp:77
double u_size
Definition: ann2fig.cpp:76
const char FIG_SUFFIX[]
Definition: ann2fig.cpp:61
double scale
Definition: ann2fig.cpp:85
#define TRANS_X(p)
Definition: ann2fig.cpp:90
main(int argc, char **argv)
Definition: ann2fig.cpp:583
void writePoint(ANNpoint p)
Definition: ann2fig.cpp:265
#define TRANS_Y(p)
Definition: ann2fig.cpp:91
ANNbool overlap(const ANNorthRect &box)
Definition: ann2fig.cpp:332
void writeCaption(const ANNorthRect &bnd_box, char *caption)
Definition: ann2fig.cpp:308
void project(ANNpoint &q)
Definition: ANNx.h:162
int dim_x
Definition: ann2fig.cpp:69
ANNpoint * ANNpointArray
Definition: ANN.h:376
double u_per_in
Definition: ann2fig.cpp:72
char caption[STRING_LEN]
Definition: ann2fig.cpp:66
ANNpoint lo
Definition: ANNx.h:93
void set_slice_val(double val)
Definition: ann2fig.cpp:112
void Error(const char *msg, ANNerr level)
Definition: ann2fig.cpp:97
double slice_val[MAX_DIM]
Definition: ann2fig.cpp:71
int pt_size
Definition: ann2fig.cpp:79
ifstream ifile
Definition: ann2fig.cpp:68
ANNcoord * ANNpoint
Definition: ANN.h:375
double in_low_x
Definition: ann2fig.cpp:74
int dim
Definition: ann2fig.cpp:81
Definition: ANN.h:132
ANNpoint hi
Definition: ANNx.h:94
const char FIG_HEAD[]
Definition: ann2fig.cpp:59
const char DUMP_SUFFIX[]
Definition: ann2fig.cpp:60
DLL_API ANNpointArray annAllocPts(int n, int dim)
Definition: ANN.cpp:117
void writeLine(ANNpoint p0, ANNpoint p1)
Definition: ann2fig.cpp:294
double u_low_y
Definition: ann2fig.cpp:78
const double DEF_SLICE_VAL
Definition: ann2fig.cpp:58
Definition: ANN.h:132
int dim_y
Definition: ann2fig.cpp:70
double offset_x
Definition: ann2fig.cpp:86
double in_low_y
Definition: ann2fig.cpp:75

Generated on Thu Jun 11 2015 13:52:31 for queso-0.53.0 by  doxygen 1.8.5