VTK  9.0.20200920
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 =========================================================================*/
42 #ifndef vtkScalarTree_h
43 #define vtkScalarTree_h
44 
45 #include "vtkCommonExecutionModelModule.h" // For export macro
46 #include "vtkObject.h"
47 
48 class vtkCell;
49 class vtkDataArray;
50 class vtkDataSet;
51 class vtkIdList;
52 class vtkTimeStamp;
53 
54 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkScalarTree : public vtkObject
55 {
56 public:
58 
61  vtkTypeMacro(vtkScalarTree, vtkObject);
62  void PrintSelf(ostream& os, vtkIndent indent) override;
64 
69  virtual void ShallowCopy(vtkScalarTree* stree);
70 
72 
76  virtual void SetDataSet(vtkDataSet*);
77  vtkGetObjectMacro(DataSet, vtkDataSet);
79 
81 
89  virtual void SetScalars(vtkDataArray*);
90  vtkGetObjectMacro(Scalars, vtkDataArray);
92 
97  virtual void BuildTree() = 0;
98 
102  virtual void Initialize() = 0;
103 
110  virtual void InitTraversal(double scalarValue) = 0;
111 
118  virtual vtkCell* GetNextCell(vtkIdType& cellId, vtkIdList*& ptIds, vtkDataArray* cellScalars) = 0;
119 
124  double GetScalarValue() { return this->ScalarValue; }
125 
126  // The following methods supports parallel (threaded) traversal. Basically
127  // batches of cells (which are a portion of the whole dataset) are available for
128  // processing in a parallel For() operation.
129 
135  virtual vtkIdType GetNumberOfCellBatches(double scalarValue) = 0;
136 
142  virtual const vtkIdType* GetCellBatch(vtkIdType batchNum, vtkIdType& numCells) = 0;
143 
144 protected:
145  vtkScalarTree();
146  ~vtkScalarTree() override;
147 
148  vtkDataSet* DataSet; // the dataset over which the scalar tree is built
149  vtkDataArray* Scalars; // the scalars of the DataSet
150  double ScalarValue; // current scalar value for traversal
151 
152  vtkTimeStamp BuildTime; // time at which tree was built
153 
154 private:
155  vtkScalarTree(const vtkScalarTree&) = delete;
156  void operator=(const vtkScalarTree&) = delete;
157 };
158 
159 #endif
vtx::types::DataSet
std::map< std::string, DataArray > DataSet
key: variable name, value: DataArray
Definition: VTXTypes.h:39
vtkScalarTree::Scalars
vtkDataArray * Scalars
Definition: vtkScalarTree.h:149
vtkIdType
int vtkIdType
Definition: vtkType.h:330
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:32
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:49
vtkScalarTree::ScalarValue
double ScalarValue
Definition: vtkScalarTree.h:150
vtkScalarTree::GetScalarValue
double GetScalarValue()
Return the current scalar value over which tree traversal is proceeding.
Definition: vtkScalarTree.h:124
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:57
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:30
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObject.h
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
vtkScalarTree::DataSet
vtkDataSet * DataSet
Definition: vtkScalarTree.h:148
vtkScalarTree::BuildTime
vtkTimeStamp BuildTime
Definition: vtkScalarTree.h:152
vtkScalarTree
organize data according to scalar values (used to accelerate contouring operations)
Definition: vtkScalarTree.h:54