VTK
vtkScalarTree.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkScalarTree.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
41 #ifndef vtkScalarTree_h
42 #define vtkScalarTree_h
43 
44 #include "vtkCommonExecutionModelModule.h" // For export macro
45 #include "vtkObject.h"
46 
47 class vtkCell;
48 class vtkDataArray;
49 class vtkDataSet;
50 class vtkIdList;
51 class vtkTimeStamp;
52 
54 {
55 public:
56  vtkTypeMacro(vtkScalarTree,vtkObject);
57  void PrintSelf(ostream& os, vtkIndent indent);
58 
60 
62  virtual void SetDataSet(vtkDataSet*);
63  vtkGetObjectMacro(DataSet,vtkDataSet);
65 
67 
72  virtual void SetScalars(vtkDataArray*);
73  vtkGetObjectMacro(Scalars,vtkDataArray);
75 
79  virtual void BuildTree() = 0;
80 
82  virtual void Initialize() = 0;
83 
88  virtual void InitTraversal(double scalarValue) = 0;
89 
91 
95  virtual vtkCell *GetNextCell(vtkIdType &cellId, vtkIdList* &ptIds,
96  vtkDataArray *cellScalars) = 0;
98 
100 
102  double GetScalarValue()
103  {return this->ScalarValue;}
105 
106  // The following methods supports parallel (threaded) applications. Basically
107  // batches of cells (which are a portion of the whole dataset) are available for
108  // processing in a parallel For() operation.
109 
116  virtual vtkIdType GetNumberOfCellBatches() = 0;
117 
119 
122  virtual const vtkIdType* GetCellBatch(vtkIdType batchNum,
123  vtkIdType& numCells) = 0;
125 
126 
127 protected:
128  vtkScalarTree();
129  ~vtkScalarTree();
130 
131  vtkDataSet *DataSet; //the dataset over which the scalar tree is built
132  vtkDataArray *Scalars; //the scalars of the DataSet
133  double ScalarValue; //current scalar value for traversal
134 
135  vtkTimeStamp BuildTime; //time at which tree was built
136 
137 private:
138  vtkScalarTree(const vtkScalarTree&); // Not implemented.
139  void operator=(const vtkScalarTree&); // Not implemented.
140 };
141 
142 #endif
#define VTKCOMMONEXECUTIONMODEL_EXPORT
abstract base class for most VTK objects
Definition: vtkObject.h:61
double ScalarValue
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
double GetScalarValue()
record modification and/or execution time
Definition: vtkTimeStamp.h:34
int vtkIdType
Definition: vtkType.h:247
vtkDataArray * Scalars
abstract class to specify cell behavior
Definition: vtkCell.h:58
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkDataSet * DataSet
a simple class to control print indentation
Definition: vtkIndent.h:38
list of point or cell ids
Definition: vtkIdList.h:35
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
organize data according to scalar values (used to accelerate contouring operations) ...
Definition: vtkScalarTree.h:53
vtkTimeStamp BuildTime