OpendTect-6_4  6.4
arraytesselator.h
Go to the documentation of this file.
1 #ifndef arraytesselator_h
2 #define arraytesselator_h
3 
4 /*+
5 ________________________________________________________________________
6 (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7 Author: Yuancheng Liu
8 Date: April 2011
9 RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "geometrymod.h"
15 #include "arraynd.h"
16 #include "ranges.h"
17 
18 
19 template <class T> class Array2D;
20 
21 namespace Geometry
22 {
23 
28 {
29 public:
30  ArrayTesselator(const float* data,
31  int datarowsize,int datacolsize,
32  const StepInterval<int>& rrg,
33  const StepInterval<int>& crg);
34 
35  ArrayTesselator(const Array2D<float>& data,
36  const StepInterval<int>& rrg,
37  const StepInterval<int>& crg);
38 
40  { return (rowrange_.nrSteps()+1) *
41  (colrange_.nrSteps()+1); }
42 
43  /*<s= 0 for points, 1 for lines, 2 for triangles.*/
44  TypeSet<int> getIndices(char s=2) const
45  { return s==2 ? stripcis_ : (s ? linecis_ : pointcis_);}
46  virtual int getCoordIndex(int row,int col ) { return 0; }
47  const char* message() const { return "Tesselating geometry"; }
48 
49 protected:
50 
51  bool doWork(od_int64 start,od_int64 stop,int);
52 
53  int maxNrThreads() const { return 1; }
54 
55  const float* data_;
60 
64 };
65 
66 }; // namespace
67 #endif
#define mExpClass(module)
Definition: commondefs.h:160
int datarowsize_
Definition: arraytesselator.h:56
const char * message() const
Definition: arraytesselator.h:47
const float * data_
Definition: arraytesselator.h:55
TypeSet< int > getIndices(char s=2) const
Definition: arraytesselator.h:44
virtual int getCoordIndex(int row, int col)
Definition: arraytesselator.h:46
#define od_int64
Definition: plftypes.h:36
const StepInterval< int > & colrange_
Definition: arraytesselator.h:59
Generalization of a task that can be run in parallel.
Definition: paralleltask.h:66
TypeSet< int > pointcis_
Definition: arraytesselator.h:61
Array2D ( Subclass of ArrayND ) is a two dimensional array.
Definition: arraynd.h:131
TypeSet< int > stripcis_
Definition: arraytesselator.h:63
Definition: arraytesselator.h:27
const StepInterval< int > & rowrange_
Definition: arraytesselator.h:58
int datacolsize_
Definition: arraytesselator.h:57
int maxNrThreads() const
Definition: arraytesselator.h:53
TypeSet< int > linecis_
Definition: arraytesselator.h:62
od_int64 nrIterations() const
Definition: arraytesselator.h:39
Definition: arraytesselator.h:21

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019