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 "vtkPolyDataAlgorithm.h"
54 
55 #include "vtkContourValues.h" // Needed for inline methods
56 #include "vtkCutter.h" // for VTK_SORT_BY_VALUE
57 
59 class vtkHyperOctree;
61 class vtkTetra;
63 
66 class vtkIdTypeArray;
67 class vtkHyperOctreeContourPointsGrabber;
68 class vtkBitArray;
69 
71 {
72 public:
74  void PrintSelf(ostream& os, vtkIndent indent);
75 
79 
85  void SetValue(int i, double value)
86  {
87  this->ContourValues->SetValue(i,value);
88  }
90 
92 
93  double GetValue(int i)
94  {
95  return this->ContourValues->GetValue(i);
96  }
98 
100 
102  double *GetValues()
103  {
104  return this->ContourValues->GetValues();
105  }
107 
109 
112  void GetValues(double *contourValues)
113  {
114  this->ContourValues->GetValues(contourValues);
115  }
117 
119 
122  void SetNumberOfContours(int number)
123  {
124  this->ContourValues->SetNumberOfContours(number);
125  }
127 
129 
131  {
132  return this->ContourValues->GetNumberOfContours();
133  }
135 
137 
139  void GenerateValues(int numContours, double range[2])
140  {
141  this->ContourValues->GenerateValues(numContours, range);
142  }
144 
146 
148  void GenerateValues(int numContours, double
149  rangeStart, double rangeEnd)
150  {
151  this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
152  }
154 
156  unsigned long GetMTime();
157 
159 
161  void SetLocator(vtkIncrementalPointLocator *locator);
162  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
164 
167  void CreateDefaultLocator();
168 
169 protected:
172 
173  virtual int RequestData(vtkInformation* request,
174  vtkInformationVector** inputVector,
175  vtkInformationVector* outputVector);
176  virtual int RequestUpdateExtent(vtkInformation*,
180 
182  void ContourNode();
183 
185  double ComputePointValue(int ptIndices[3]);
186 
187  void ContourNode1D();
188 
191 
192  vtkIdList *CellPts; // for 2D case
193 
196 
200 
206 
207  vtkHyperOctreeCursor *Sibling; // to avoid allocation in the loop
208 
209 
213 
215 
218 
219  vtkIdType CellTypeCounter[65536]; // up-to-65536 points per octant
221  vtkIdType TemplateCounter; // record the number of octants that succceed
222  // to use the template triangulator
223 
225  vtkHyperOctreeContourPointsGrabber *Grabber;
226 
228  int SortBy;
229  int Iter; // iterate over contour values in case of VTK_SORT_BY_CELL
230 
232  double LeftValue;
233  double LeftCoord;
234 
235  //BTX
236  friend class vtkHyperOctreeContourPointsGrabber;
237  //ETX
238 private:
239  vtkHyperOctreeContourFilter(const vtkHyperOctreeContourFilter&); // Not implemented.
240  void operator=(const vtkHyperOctreeContourFilter&); // Not implemented.
241 };
242 #endif
helper object to manage setting and generating contour values
#define VTK_GRAPHICS_EXPORT
virtual int FillInputPortInformation(int port, vtkInformation *info)
represent and manipulate point attribute data
Definition: vtkPointData.h:35
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:36
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:255
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:81
A dataset structured as a tree where each node has exactly 2^n children.
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:45
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
cell represents a 1D line
Definition: vtkLine.h:33
Superclass for algorithms that produce only polydata as output.
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:37
list of point or cell ids
Definition: vtkIdList.h:34
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
void GetValues(double *contourValues)
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:43
dynamic, self-adjusting array of unsigned char
Objects that can traverse hyperoctree nodes.
object to represent cell connectivity
Definition: vtkCellArray.h:48
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:34
generate isosurfaces/isolines from scalar values
Store zero or more vtkInformation instances.