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 
130  int GetNumberOfContours()
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