VTK
vtkHyperOctreeDualGridContourFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHyperOctreeDualGridContourFilter.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 =========================================================================*/
39 #ifndef vtkHyperOctreeDualGridContourFilter_h
40 #define vtkHyperOctreeDualGridContourFilter_h
41 
42 #include "vtkFiltersHyperTreeModule.h" // For export macro
43 #include "vtkPolyDataAlgorithm.h"
44 
45 #include "vtkContourValues.h" // Needed for inline methods
46 #include "vtkCutter.h" // for VTK_SORT_BY_VALUE
47 
48 class vtkHyperOctree;
49 class vtkTetra;
52 
56 class vtkIdTypeArray;
57 class vtkBitArray;
59 
61 {
62 public:
64  void PrintSelf(ostream& os, vtkIndent indent);
65 
69 
75  void SetValue(int i, double value)
76  {
77  this->ContourValues->SetValue(i,value);
78  }
80 
82 
83  double GetValue(int i)
84  {
85  return this->ContourValues->GetValue(i);
86  }
88 
90 
92  double *GetValues()
93  {
94  return this->ContourValues->GetValues();
95  }
97 
99 
102  void GetValues(double *contourValues)
103  {
104  this->ContourValues->GetValues(contourValues);
105  }
107 
109 
112  void SetNumberOfContours(int number)
113  {
114  this->ContourValues->SetNumberOfContours(number);
115  }
117 
119 
121  {
122  return this->ContourValues->GetNumberOfContours();
123  }
125 
127 
129  void GenerateValues(int numContours, double range[2])
130  {
131  this->ContourValues->GenerateValues(numContours, range);
132  }
134 
136 
138  void GenerateValues(int numContours, double
139  rangeStart, double rangeEnd)
140  {
141  this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
142  }
144 
146  unsigned long GetMTime();
147 
149 
151  void SetLocator(vtkIncrementalPointLocator *locator);
152  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
154 
157  void CreateDefaultLocator();
158 
159 protected:
162 
163  virtual int RequestData(vtkInformation* request,
164  vtkInformationVector** inputVector,
165  vtkInformationVector* outputVector);
166  virtual int RequestUpdateExtent(vtkInformation*,
170 
172  void ContourNode();
173 
174  void TraverseNeighborhoodRecursively(
175  vtkHyperOctreeLightWeightCursor* neighborhood,
176  unsigned short* xyzIds);
177  void EvaluatePoint(vtkHyperOctreeLightWeightCursor* neighborhood,
178  unsigned short* xyzIds);
179 
180  void ContourNode1D();
181 
184 
187 
189 
193  // To compute points on the fly.
194  // These are set to the input origin and size.
195  double Origin[3];
196  double Size[3];
197 
198  // This is a table for traversing a neighborhood down an octree.
199  // 8 children x 8 cursors
200  // First three bits encode the child, rest encode the cursor id.
201  // 8xCursorId + childId.
202  unsigned char NeighborhoodTraversalTable[64];
203  void GenerateTraversalTable();
204 
205 private:
207  void operator=(const vtkHyperOctreeDualGridContourFilter&); // Not implemented.
208 };
209 #endif
void GenerateValues(int numContours, double range[2])
helper object to manage setting and generating contour values
virtual int FillInputPortInformation(int port, vtkInformation *info)
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Abstract class in support of both point location and point insertion.
dynamic, self-adjusting array of vtkIdType
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
A dataset structured as a tree where each node has exactly 2^n children.
#define VTKFILTERSHYPERTREE_EXPORT
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 *)
Superclass for algorithms that produce only polydata as output.
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
represent and manipulate attribute data in a dataset
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
Store zero or more vtkInformation instances.
void GenerateValues(int numContours, double rangeStart, double rangeEnd)
generate isosurfaces/isolines from scalar values