VTK
vtkHyperOctreeContourFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHyperOctreeContourFilter.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 =========================================================================*/
50 #ifndef vtkHyperOctreeContourFilter_h
51 #define vtkHyperOctreeContourFilter_h
52 
53 #include "vtkFiltersHyperTreeModule.h" // For export macro
54 #include "vtkPolyDataAlgorithm.h"
55 
56 #include "vtkContourValues.h" // Needed for inline methods
57 #include "vtkCutter.h" // for VTK_SORT_BY_VALUE
58 
60 class vtkHyperOctree;
62 class vtkTetra;
64 
67 class vtkIdTypeArray;
68 class vtkHyperOctreeContourPointsGrabber;
69 class vtkBitArray;
70 
72 {
73 public:
75  void PrintSelf(ostream& os, vtkIndent indent);
76 
80 
86  void SetValue(int i, double value)
87  {
88  this->ContourValues->SetValue(i,value);
89  }
91 
93 
94  double GetValue(int i)
95  {
96  return this->ContourValues->GetValue(i);
97  }
99 
101 
103  double *GetValues()
104  {
105  return this->ContourValues->GetValues();
106  }
108 
110 
113  void GetValues(double *contourValues)
114  {
115  this->ContourValues->GetValues(contourValues);
116  }
118 
120 
123  void SetNumberOfContours(int number)
124  {
125  this->ContourValues->SetNumberOfContours(number);
126  }
128 
130 
132  {
133  return this->ContourValues->GetNumberOfContours();
134  }
136 
138 
140  void GenerateValues(int numContours, double range[2])
141  {
142  this->ContourValues->GenerateValues(numContours, range);
143  }
145 
147 
149  void GenerateValues(int numContours, double
150  rangeStart, double rangeEnd)
151  {
152  this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
153  }
155 
157  unsigned long GetMTime();
158 
160 
162  void SetLocator(vtkIncrementalPointLocator *locator);
163  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
165 
168  void CreateDefaultLocator();
169 
170 protected:
173 
174  virtual int RequestData(vtkInformation* request,
175  vtkInformationVector** inputVector,
176  vtkInformationVector* outputVector);
177  virtual int RequestUpdateExtent(vtkInformation*,
181 
183  void ContourNode();
184 
186  double ComputePointValue(int ptIndices[3]);
187 
188  void ContourNode1D();
189 
192 
193  vtkIdList *CellPts; // for 2D case
194 
197 
201 
207 
208  vtkHyperOctreeCursor *Sibling; // to avoid allocation in the loop
209 
210 
214 
216 
219 
220  vtkIdType CellTypeCounter[65536]; // up-to-65536 points per octant
222  vtkIdType TemplateCounter; // record the number of octants that succceed
223  // to use the template triangulator
224 
226  vtkHyperOctreeContourPointsGrabber *Grabber;
227 
229  int SortBy;
230  int Iter; // iterate over contour values in case of VTK_SORT_BY_CELL
231 
233  double LeftValue;
234  double LeftCoord;
235 
236  //BTX
237  friend class vtkHyperOctreeContourPointsGrabber;
238  //ETX
239 private:
240  vtkHyperOctreeContourFilter(const vtkHyperOctreeContourFilter&); // Not implemented.
241  void operator=(const vtkHyperOctreeContourFilter&); // Not implemented.
242 };
243 #endif
helper object to manage setting and generating contour values
virtual int FillInputPortInformation(int port, vtkInformation *info)
represent and manipulate point attribute data
Definition: vtkPointData.h:36
vtkHyperOctreeContourPointsGrabber * Grabber
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkIncrementalPointLocator * Locator
represent and manipulate cell attribute data
Definition: vtkCellData.h:37
Abstract class in support of both point location and point insertion.
void SetValue(int i, double value)
void GenerateValues(int numContours, double range[2])
helper class to generate triangulations
void GenerateValues(int numContours, double rangeStart, double rangeEnd)
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:275
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
A dataset structured as a tree where each node has exactly 2^n children.
#define VTKFILTERSHYPERTREE_EXPORT
dynamic, self-adjusting array of double
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:46
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
cell represents a 1D line
Definition: vtkLine.h:34
Superclass for algorithms that produce only polydata as output.
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
list of point or cell ids
Definition: vtkIdList.h:35
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
void GetValues(double *contourValues)
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:44
dynamic, self-adjusting array of unsigned char
Objects that can traverse hyperoctree nodes.
object to represent cell connectivity
Definition: vtkCellArray.h:49
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:35
generate isosurfaces/isolines from scalar values
Store zero or more vtkInformation instances.