g4tools  5.4.0
ccontour
Go to the documentation of this file.
1 // Copyright (C) 2010, Guy Barrand. All rights reserved.
2 // See the file tools.license for terms.
3 
4 #ifndef tools_ccontour
5 #define tools_ccontour
6 
7 // G.Barrand : inline version of the one found in Lib of OSC 16.11.
8 // This code is not mine and I keep it "as it is".
9 
10 // Contour.h: interface for the ccontour class.
11 //
12 // ccontour implements Contour plot algorithm descrided in
13 // IMPLEMENTATION OF
14 // AN IMPROVED CONTOUR
15 // PLOTTING ALGORITHM
16 // BY
17 //
18 // MICHAEL JOSEPH ARAMINI
19 //
20 // B.S., Stevens Institute of Technology, 1980
21 // See http://www.ultranet.com/~aramini/thesis.html
22 //
23 // Ported to C++ by Jonathan de Halleux.
24 //
25 // Using ccontour :
26 //
27 // ccontour is not directly usable. The user has to
28 // 1. derive the function ExportLine that is
29 // supposed to draw/store the segment of the contour
30 // 2. Set the function draw contour of. (using SetFieldFn
31 // The function must be declared as follows
32 // double (*myF)(double x , double y);
33 //
34 // History:
35 // 31-07-2002:
36 // - A lot of contribution from Chenggang Zhou (better strip compressions, merging, area, weight),
37 // - Got rid of ugly MFC lists for STL.
39 
40 //G.Barrand :
41 #include <vector>
42 #include <cstdio>
43 #include <cstdlib>
44 #include <cmath>
45 
46 #ifdef TOOLS_MEM
47 #include "mem"
48 #endif
49 
50 #include "mnmx"
51 
52 namespace tools {
53 
54 class ccontour
55 {
56 #ifdef TOOLS_MEM
57  static const std::string& s_class() {
58  static const std::string s_v("tools::ccontour");
59  return s_v;
60  }
61 #endif
62 protected:
63  // plots a line from (x1,y1) to (x2,y2)
64  virtual void ExportLine(int iPlane,int x1,int y1,int x2,int y2) = 0;
65 
66 public:
67  ccontour();
68  virtual ~ccontour(){
69  CleanMemory();
70 #ifdef TOOLS_MEM
71  mem::decrement(s_class().c_str());
72 #endif
73  }
74 protected: //G.Barrand
75  ccontour(const ccontour&){}
76 private: //G.Barrand
77  ccontour& operator=(const ccontour&){return *this;}
78 public:
79 protected: //G.Barrand
80  // Initialize memory. Called in generate
81  virtual void InitMemory();
82  // Clean work arrays
83  virtual void CleanMemory();
84  // generates contour
85  // Before calling this functions you must
86  // 1. derive the function ExportLine that is
87  // supposed to draw/store the segment of the contour
88  // 2. Set the function draw contour of. (using SetFieldFn
89  // The function must be declared as follows
90  // double (*myF)(double x , double y);
91 public: //G.Barrand
92  virtual void generate();
93 
94  // Set the dimension of the primary grid
95  void set_first_grid(int iCol, int iRow);
96  // Set the dimension of the base grid
97  void set_secondary_grid(int iCol, int iRow);
98  // Sets the region [left, right, bottom,top] to generate contour
99  void set_limits(double pLimits[4]);
100  // Sets the isocurve values
101  void set_planes(const std::vector<double>& vPlanes);
102  // Sets the pointer to the F(x,y) funtion
103  // G.Barrand : handle a user data pointer.
104  void set_field_fcn(double (*_pFieldFcn)(double, double,void*),void*);
105 
106  size_t get_number_of_planes() const { return m_vPlanes.size();};
107  const std::vector<double>& get_planes() const { return m_vPlanes;};
108  double get_plane(unsigned int i) const;
109 
110  // For an indexed point i on the sec. grid, returns x(i)
111  double get_xi(int i) const { return m_pLimits[0] + i%(m_iColSec+1)*(m_pLimits[1]-m_pLimits[0])/(double)( m_iColSec );};
112  // For an indexed point i on the fir. grid, returns y(i)
113  double get_yi(int i) const;
114 
115  void get_limits(double pLimits[4]);
116 protected: //G.Barrand
117 
118  // Retrieve dimension of grids, contouring region and isocurve
119  int GetColFir() const { return m_iColFir;};
120  int GetRowFir() const { return m_iRowFir;};
121  int GetColSec() const { return m_iColSec;};
122  int GetRowSec() const { return m_iRowSec;};
123 
124 private:
125  // A structure used internally by ccontour
126  /*G.Barrand :
127  struct CFnStr {
128  double m_dFnVal;
129  short m_sLeftLen;
130  short m_sRightLen;
131  short m_sTopLen;
132  short m_sBotLen;
133  };
134  */
135  class CFnStr {
136 #ifdef TOOLS_MEM
137  static const std::string& s_class() {
138  static const std::string s_v("tools::ccontour::CFnStr");
139  return s_v;
140  }
141 #endif
142  public:
143  CFnStr():m_dFnVal(0),m_sLeftLen(0),m_sRightLen(0),m_sTopLen(0),m_sBotLen(0){
144 #ifdef TOOLS_MEM
145  mem::increment(s_class().c_str());
146 #endif
147  }
148  ~CFnStr(){
149 #ifdef TOOLS_MEM
150  mem::decrement(s_class().c_str());
151 #endif
152  }
153  protected:
154  CFnStr(const CFnStr&){}
155  CFnStr& operator=(const CFnStr&){return *this;}
156  public:
157  double m_dFnVal;
158  short m_sLeftLen;
159  short m_sRightLen;
160  short m_sTopLen;
161  short m_sBotLen;
162  };
163 
164 
165 protected:
166  // Accesibles variables
167  std::vector<double> m_vPlanes; // value of contour planes
168  double m_pLimits[4]; // left, right, bottom, top
169  int m_iColFir; // primary grid, number of columns
170  int m_iRowFir; // primary grid, number of rows
171  int m_iColSec; // secondary grid, number of columns
172  int m_iRowSec; // secondary grid, number of rows
173  void* m_pFieldFcnData; // G.Barrand : handle a user data pointer.
174  double (*m_pFieldFcn)(double x, double y,void*); // pointer to F(x,y) function
175 
176  // Protected function
177  //virtual void ExportLine(int iPlane, int x1, int y1, int x2, int y2) = 0; // plots a line from (x1,y1) to (x2,y2)
178 
179  // Work functions and variables
180  double m_dDx;
181  double m_dDy;
182  CFnStr** m_ppFnData; // pointer to mesh parts
183  CFnStr* FnctData(int i,int j) { return (m_ppFnData[i]+j);};
184 
185  double Field(int x, int y); /* evaluate funct if we must, */
186  void Cntr1(int x1, int x2, int y1, int y2);
187  void Pass2(int x1, int x2, int y1, int y2); /* draws the contour lines */
188 
189 private:
190  //G.Barrand : have the below in the class.
191  // A simple test function
192  static double ContourTestFunction(double x,double y,void*) {
193  return 0.5*(::cos(x+3.14/4)+::sin(y+3.14/4));
194  }
195 
196 protected:
197  static void _ASSERT_(bool a_what,const char* a_where) {
198  if(!a_what) {
199  ::printf("debug : Contour : assert failure in %s\n",a_where);
200  ::exit(0);
201  }
202  }
203 
204  static void _ASSERTP_(void* a_what,const char* a_where) {
205  if(!a_what) {
206  ::printf("debug : Contour : assert failure in %s\n",a_where);
207  ::exit(0);
208  }
209  }
210 
211 };
212 
213 // implementation :
214 //
215 // Code get on the web at :
216 // http://www.codeproject.com/cpp/contour.asp
217 //
218 // G.Barrand
219 //
220 
222 // Construction/Destruction
224 
226 {
227 #ifdef TOOLS_MEM
228  mem::increment(s_class().c_str());
229 #endif
230  m_iColFir=m_iRowFir=32;
231  m_iColSec=m_iRowSec=256;
232  m_dDx=m_dDy=0;
233  m_pFieldFcnData = NULL;
234  m_pFieldFcn=NULL;
235  m_pLimits[0]=m_pLimits[2]=0;
236  m_pLimits[1]=m_pLimits[3]=5.;
237  m_ppFnData=NULL;
238 
239  // temporary stuff
240  m_pFieldFcn=ContourTestFunction;
241  m_vPlanes.resize(20);
242  for (unsigned int i=0;i<m_vPlanes.size();i++)
243  {
244  m_vPlanes[i]=(i-m_vPlanes.size()/2.0)*0.1;
245  }
246 }
247 
248 //G.Barrand : inline
249 
250 inline void ccontour::InitMemory()
251 {
252  if (!m_ppFnData)
253  {
254  m_ppFnData=new CFnStr*[m_iColSec+1];
255  for (int i=0;i<m_iColSec+1;i++)
256  {
257  m_ppFnData[i]=NULL;
258  }
259  }
260 }
261 
263 {
264  if (m_ppFnData)
265  {
266  int i;
267  for (i=0;i<m_iColSec+1;i++)
268  {
269  if (m_ppFnData[i])
270  delete[] (m_ppFnData[i]);
271  }
272  delete[] m_ppFnData;
273  m_ppFnData=NULL;
274  }
275 }
276 
277 inline void ccontour::generate()
278 {
279 
280  int i, j;
281  int x3, x4, y3, y4, x, y, oldx3, xlow;
282  const int cols=m_iColSec+1;
283  const int rows=m_iRowSec+1;
284  //double xoff,yoff;
285 
286  // Initialize memroy if needed
287  InitMemory();
288 
289  m_dDx = (m_pLimits[1]-m_pLimits[0])/(double)(m_iColSec);
290  //xoff = m_pLimits[0];
291  m_dDy = (m_pLimits[3]-m_pLimits[2])/(double)(m_iRowSec);
292  //yoff = m_pLimits[2];
293 
294  xlow = 0;
295  oldx3 = 0;
296  x3 = (cols-1)/m_iRowFir;
297  x4 = ( 2*(cols-1) )/m_iRowFir;
298  for (x = oldx3; x <= x4; x++)
299  { /* allocate new columns needed
300  */
301  if (x >= cols)
302  break;
303  if (m_ppFnData[x]==NULL)
304  m_ppFnData[x] = new CFnStr[rows];
305 
306  for (y = 0; y < rows; y++)
307  FnctData(x,y)->m_sTopLen = -1;
308  }
309 
310  y4 = 0;
311  for (j = 0; j < m_iColFir; j++)
312  {
313  y3 = y4;
314  y4 = ((j+1)*(rows-1))/m_iColFir;
315  Cntr1(oldx3, x3, y3, y4);
316  }
317 
318  for (i = 1; i < m_iRowFir; i++)
319  {
320  y4 = 0;
321  for (j = 0; j < m_iColFir; j++)
322  {
323  y3 = y4;
324  y4 = ((j+1)*(rows-1))/m_iColFir;
325  Cntr1(x3, x4, y3, y4);
326  }
327 
328  y4 = 0;
329  for (j = 0; j < m_iColFir; j++)
330  {
331  y3 = y4;
332  y4 = ((j+1)*(rows-1))/m_iColFir;
333  Pass2(oldx3,x3,y3,y4);
334  }
335 
336  if (i < (m_iRowFir-1))
337  { /* re-use columns no longer needed */
338  oldx3 = x3;
339  x3 = x4;
340  x4 = ((i+2)*(cols-1))/m_iRowFir;
341  for (x = x3+1; x <= x4; x++)
342  {
343  if (xlow < oldx3)
344  {
345  if (m_ppFnData[x])
346  delete[] m_ppFnData[x];
347  m_ppFnData[x] = m_ppFnData[xlow];
348  m_ppFnData[ xlow++ ] = NULL;
349  }
350  else
351  if (m_ppFnData[x]==NULL)
352  m_ppFnData[x] = new CFnStr[rows];
353 
354  for (y = 0; y < rows; y++)
355  FnctData(x,y)->m_sTopLen = -1;
356  }
357  }
358  }
359 
360  y4 = 0;
361  for (j = 0; j < m_iColFir; j++)
362  {
363  y3 = y4;
364  y4 = ((j+1)*(rows-1))/m_iColFir;
365  Pass2(x3,x4,y3,y4);
366  }
367 }
368 
369 inline void ccontour::Cntr1(int x1, int x2, int y1, int y2)
370 {
371  double f11, f12, f21, f22, f33;
372  int x3, y3, i, j;
373 
374  if ((x1 == x2) || (y1 == y2)) /* if not a real cell, punt */
375  return;
376  f11 = Field(x1, y1);
377  f12 = Field(x1, y2);
378  f21 = Field(x2, y1);
379  f22 = Field(x2, y2);
380  if ((x2 > x1+1) || (y2 > y1+1)) { /* is cell divisible? */
381  x3 = (x1+x2)/2;
382  y3 = (y1+y2)/2;
383  f33 = Field(x3, y3);
384  i = j = 0;
385  if (f33 < f11) i++; else if (f33 > f11) j++;
386  if (f33 < f12) i++; else if (f33 > f12) j++;
387  if (f33 < f21) i++; else if (f33 > f21) j++;
388  if (f33 < f22) i++; else if (f33 > f22) j++;
389  if ((i > 2) || (j > 2)) /* should we divide cell? */
390  {
391  /* subdivide cell */
392  Cntr1(x1, x3, y1, y3);
393  Cntr1(x3, x2, y1, y3);
394  Cntr1(x1, x3, y3, y2);
395  Cntr1(x3, x2, y3, y2);
396  return;
397  }
398  }
399  /* install cell in array */
400  FnctData(x1,y2)->m_sBotLen = FnctData(x1,y1)->m_sTopLen = x2-x1;
401  FnctData(x2,y1)->m_sLeftLen = FnctData(x1,y1)->m_sRightLen = y2-y1;
402 }
403 
404 inline void ccontour::Pass2(int x1, int x2, int y1, int y2)
405 {
406  int left = 0, right = 0, top = 0, bot = 0,old, iNew, i, j, x3, y3;
407  double yy0 = 0, yy1 = 0, xx0 = 0, xx1 = 0, xx3, yy3;
408  double v, f11, f12, f21, f22, f33, fold, fnew, f;
409  double xoff=m_pLimits[0];
410  double yoff=m_pLimits[2];
411 
412  if ((x1 == x2) || (y1 == y2)) /* if not a real cell, punt */
413  return;
414  f11 = FnctData(x1,y1)->m_dFnVal;
415  f12 = FnctData(x1,y2)->m_dFnVal;
416  f21 = FnctData(x2,y1)->m_dFnVal;
417  f22 = FnctData(x2,y2)->m_dFnVal;
418  if ((x2 > x1+1) || (y2 > y1+1)) /* is cell divisible? */
419  {
420  x3 = (x1+x2)/2;
421  y3 = (y1+y2)/2;
422  f33 = FnctData(x3, y3)->m_dFnVal;
423  i = j = 0;
424  if (f33 < f11) i++; else if (f33 > f11) j++;
425  if (f33 < f12) i++; else if (f33 > f12) j++;
426  if (f33 < f21) i++; else if (f33 > f21) j++;
427  if (f33 < f22) i++; else if (f33 > f22) j++;
428  if ((i > 2) || (j > 2)) /* should we divide cell? */
429  {
430  /* subdivide cell */
431  Pass2(x1, x3, y1, y3);
432  Pass2(x3, x2, y1, y3);
433  Pass2(x1, x3, y3, y2);
434  Pass2(x3, x2, y3, y2);
435  return;
436  }
437  }
438 
439  for (i = 0; i < (int)m_vPlanes.size(); i++)
440  {
441  v = m_vPlanes[i];
442  j = 0;
443  if (f21 > v) j++;
444  if (f11 > v) j |= 2;
445  if (f22 > v) j |= 4;
446  if (f12 > v) j |= 010;
447  if ((f11 > v) ^ (f12 > v))
448  {
449  if ((FnctData(x1,y1)->m_sLeftLen != 0) &&
450  (FnctData(x1,y1)->m_sLeftLen < FnctData(x1,y1)->m_sRightLen))
451  {
452  old = y1;
453  fold = f11;
454  while (1)
455  {
456  iNew = old+FnctData(x1,old)->m_sLeftLen;
457  fnew = FnctData(x1,iNew)->m_dFnVal;
458  if ((fnew > v) ^ (fold > v))
459  break;
460  old = iNew;
461  fold = fnew;
462  }
463  yy0 = ((old-y1)+(iNew-old)*(v-fold)/(fnew-fold))/(y2-y1);
464  }
465  else
466  yy0 = (v-f11)/(f12-f11);
467 
468  left = (int)(y1+(y2-y1)*yy0+0.5);
469  }
470  if ((f21 > v) ^ (f22 > v))
471  {
472  if ((FnctData(x2,y1)->m_sRightLen != 0) &&
473  (FnctData(x2,y1)->m_sRightLen < FnctData(x2,y1)->m_sLeftLen))
474  {
475  old = y1;
476  fold = f21;
477  while (1)
478  {
479  iNew = old+FnctData(x2,old)->m_sRightLen;
480  fnew = FnctData(x2,iNew)->m_dFnVal;
481  if ((fnew > v) ^ (fold > v))
482  break;
483  old = iNew;
484  fold = fnew;
485  }
486  yy1 = ((old-y1)+(iNew-old)*(v-fold)/(fnew-fold))/(y2-y1);
487  }
488  else
489  yy1 = (v-f21)/(f22-f21);
490 
491  right = (int)(y1+(y2-y1)*yy1+0.5);
492  }
493  if ((f21 > v) ^ (f11 > v))
494  {
495  if ((FnctData(x1,y1)->m_sBotLen != 0) &&
496  (FnctData(x1,y1)->m_sBotLen < FnctData(x1,y1)->m_sTopLen)) {
497  old = x1;
498  fold = f11;
499  while (1) {
500  iNew = old+FnctData(old,y1)->m_sBotLen;
501  fnew = FnctData(iNew,y1)->m_dFnVal;
502  if ((fnew > v) ^ (fold > v))
503  break;
504  old = iNew;
505  fold = fnew;
506  }
507  xx0 = ((old-x1)+(iNew-old)*(v-fold)/(fnew-fold))/(x2-x1);
508  }
509  else
510  xx0 = (v-f11)/(f21-f11);
511 
512  bot = (int)(x1+(x2-x1)*xx0+0.5);
513  }
514  if ((f22 > v) ^ (f12 > v))
515  {
516  if ((FnctData(x1,y2)->m_sTopLen != 0) &&
517  (FnctData(x1,y2)->m_sTopLen < FnctData(x1,y2)->m_sBotLen)) {
518  old = x1;
519  fold = f12;
520  while (1) {
521  iNew = old+FnctData(old,y2)->m_sTopLen;
522  fnew = FnctData(iNew,y2)->m_dFnVal;
523  if ((fnew > v) ^ (fold > v))
524  break;
525  old = iNew;
526  fold = fnew;
527  }
528  xx1 = ((old-x1)+(iNew-old)*(v-fold)/(fnew-fold))/(x2-x1);
529  }
530  else
531  xx1 = (v-f12)/(f22-f12);
532 
533  top = (int)(x1+(x2-x1)*xx1+0.5);
534  }
535 
536  switch (j)
537  {
538  case 7:
539  case 010:
540  ExportLine(i,x1,left,top,y2);
541  break;
542  case 5:
543  case 012:
544  ExportLine(i,bot,y1,top,y2);
545  break;
546  case 2:
547  case 015:
548  ExportLine(i,x1,left,bot,y1);
549  break;
550  case 4:
551  case 013:
552  ExportLine(i,top,y2,x2,right);
553  break;
554  case 3:
555  case 014:
556  ExportLine(i,x1,left,x2,right);
557  break;
558  case 1:
559  case 016:
560  ExportLine(i,bot,y1,x2,right);
561  break;
562  case 0:
563  case 017:
564  break;
565  case 6:
566  case 011:
567  yy3 = (xx0*(yy1-yy0)+yy0)/(1.0-(xx1-xx0)*(yy1-yy0));
568  xx3 = yy3*(xx1-xx0)+xx0;
569  xx3 = x1+xx3*(x2-x1);
570  yy3 = y1+yy3*(y2-y1);
571  xx3 = xoff+xx3*m_dDx;
572  yy3 = yoff+yy3*m_dDy;
573  f = (*m_pFieldFcn)(xx3, yy3,m_pFieldFcnData);
574  if (f == v) {
575  ExportLine(i,bot,y1,top,y2);
576  ExportLine(i,x1,left,x2,right);
577  } else
578  if (((f > v) && (f22 > v)) || ((f < v) && (f22 < v))) {
579  ExportLine(i,x1,left,top,y2);
580  ExportLine(i,bot,y1,x2,right);
581  } else {
582  ExportLine(i,x1,left,bot,y1);
583  ExportLine(i,top,y2,x2,right);
584  }
585  }
586  }
587 }
588 
589 inline double ccontour::Field(int x, int y) /* evaluate funct if we must,*/
590 {
591  double x1, y1;
592 
593  if (FnctData(x,y)->m_sTopLen != -1) /* is it already in the array */
594  return(FnctData(x,y)->m_dFnVal);
595 
596  /* not in the array, create new array element */
597  x1 = m_pLimits[0]+m_dDx*x;
598  y1 = m_pLimits[2]+m_dDy*y;
599  FnctData(x,y)->m_sTopLen = 0;
600  FnctData(x,y)->m_sBotLen = 0;
601  FnctData(x,y)->m_sRightLen = 0;
602  FnctData(x,y)->m_sLeftLen = 0;
603  return (FnctData(x,y)->m_dFnVal = (*m_pFieldFcn)(x1, y1,m_pFieldFcnData));
604 }
605 
606 inline void ccontour::set_planes(const std::vector<double>& vPlanes)
607 {
608  // cleaning memory
609  CleanMemory();
610 
611  m_vPlanes = vPlanes;
612 }
613 
614 inline void ccontour::set_field_fcn(double (*_pFieldFcn)(double, double,void*),void* aData)
615 {
616  m_pFieldFcnData = aData;
617  m_pFieldFcn=_pFieldFcn;
618 }
619 
620 inline void ccontour::set_first_grid(int iCol, int iRow)
621 {
622  m_iColFir=mx<int>(iCol,2);
623  m_iRowFir=mx<int>(iRow,2);
624 }
625 
626 inline void ccontour::set_secondary_grid(int iCol, int iRow)
627 {
628  // cleaning work matrices if allocated
629  CleanMemory();
630 
631  m_iColSec=mx<int>(iCol,2);
632  m_iRowSec=mx<int>(iRow,2);
633 }
634 
635 inline void ccontour::set_limits(double pLimits[])
636 {
637  _ASSERT_(pLimits[0]<pLimits[1],"ccontour::set_limits");
638  _ASSERT_(pLimits[2]<pLimits[3],"ccontour::set_limits");
639  for (int i=0;i<4;i++)
640  {
641  m_pLimits[i]=pLimits[i];
642  }
643 }
644 
645 inline void ccontour::get_limits(double pLimits[])
646 {
647  for (int i=0;i<4;i++)
648  {
649  pLimits[i]=m_pLimits[i];
650  }
651 }
652 
653 //G.Barrand : from .h to .cxx to avoid _ASSERT_ in .h
654 inline double ccontour::get_plane(unsigned int i) const {
655  /*_ASSERT_(i>=0);*/
656  _ASSERT_(i<m_vPlanes.size(),"ccontour::get_plane");
657  return m_vPlanes[i];
658 }
659 
660 inline double ccontour::get_yi(int i) const {
661  if(i<0) ::printf("ccontour::get_yi : %d\n",i);
662  _ASSERT_(i>=0,"ccontour::get_yi");
663  return m_pLimits[2] + i/(m_iColSec+1)*(m_pLimits[3]-m_pLimits[2])/(double)( m_iRowSec );
664 }
665 
666 }
667 
668 #endif
tools::ccontour::m_iRowFir
int m_iRowFir
Definition: ccontour:170
tools::ccontour::FnctData
CFnStr * FnctData(int i, int j)
Definition: ccontour:183
tools::ccontour::m_dDx
double m_dDx
Definition: ccontour:180
tools::ccontour::ccontour
ccontour(const ccontour &)
Definition: ccontour:75
tools::ccontour::Cntr1
void Cntr1(int x1, int x2, int y1, int y2)
Definition: ccontour:369
tools::ccontour::GetColSec
int GetColSec() const
Definition: ccontour:121
tools::ccontour::generate
virtual void generate()
Definition: ccontour:277
tools::ccontour::get_number_of_planes
size_t get_number_of_planes() const
Definition: ccontour:106
tools::ccontour::m_iColFir
int m_iColFir
Definition: ccontour:169
tools::ccontour::InitMemory
virtual void InitMemory()
Definition: ccontour:250
tools::ccontour::ccontour
ccontour()
Definition: ccontour:225
tools::sg::right
@ right
Definition: enums:76
tools::ccontour::Pass2
void Pass2(int x1, int x2, int y1, int y2)
Definition: ccontour:404
tools::ccontour::m_dDy
double m_dDy
Definition: ccontour:181
tools::sg::top
@ top
Definition: enums:82
tools::ccontour::GetRowSec
int GetRowSec() const
Definition: ccontour:122
tools::ccontour::get_plane
double get_plane(unsigned int i) const
Definition: ccontour:654
tools::ccontour::get_limits
void get_limits(double pLimits[4])
Definition: ccontour:645
tools::ccontour::CleanMemory
virtual void CleanMemory()
Definition: ccontour:262
mem
tools::sg::left
@ left
Definition: enums:74
tools::ccontour::Field
double Field(int x, int y)
Definition: ccontour:589
tools::ccontour::m_pFieldFcn
double(* m_pFieldFcn)(double x, double y, void *)
Definition: ccontour:174
tools::ccontour::get_yi
double get_yi(int i) const
Definition: ccontour:660
mnmx
tools::ccontour::set_limits
void set_limits(double pLimits[4])
Definition: ccontour:635
tools::ccontour::get_xi
double get_xi(int i) const
Definition: ccontour:111
tools::ccontour::m_ppFnData
CFnStr ** m_ppFnData
Definition: ccontour:182
tools
inlined C code : ///////////////////////////////////
Definition: aida_ntuple:26
tools::ccontour::set_planes
void set_planes(const std::vector< double > &vPlanes)
Definition: ccontour:606
tools::ccontour::m_iColSec
int m_iColSec
Definition: ccontour:171
tools::ccontour::m_iRowSec
int m_iRowSec
Definition: ccontour:172
tools::ccontour::ExportLine
virtual void ExportLine(int iPlane, int x1, int y1, int x2, int y2)=0
tools::ccontour::GetRowFir
int GetRowFir() const
Definition: ccontour:120
tools::ccontour::set_first_grid
void set_first_grid(int iCol, int iRow)
Definition: ccontour:620
tools::ccontour::get_planes
const std::vector< double > & get_planes() const
Definition: ccontour:107
tools::ccontour::set_field_fcn
void set_field_fcn(double(*_pFieldFcn)(double, double, void *), void *)
Definition: ccontour:614
tools::ccontour::m_vPlanes
std::vector< double > m_vPlanes
Definition: ccontour:167
tools::ccontour::m_pLimits
double m_pLimits[4]
Definition: ccontour:168
tools::ccontour::GetColFir
int GetColFir() const
Definition: ccontour:119
tools::ccontour::~ccontour
virtual ~ccontour()
Definition: ccontour:68
tools::ccontour::set_secondary_grid
void set_secondary_grid(int iCol, int iRow)
Definition: ccontour:626
tools::ccontour::_ASSERT_
static void _ASSERT_(bool a_what, const char *a_where)
Definition: ccontour:197
tools::ccontour
Definition: ccontour:55
tools::ccontour::m_pFieldFcnData
void * m_pFieldFcnData
Definition: ccontour:173
tools::ccontour::_ASSERTP_
static void _ASSERTP_(void *a_what, const char *a_where)
Definition: ccontour:204