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 "vtkPolyDataAlgorithm.h"
43 
44 #include "vtkContourValues.h" // Needed for inline methods
45 #include "vtkCutter.h" // for VTK_SORT_BY_VALUE
46 
47 class vtkHyperOctree;
48 class vtkTetra;
51 
55 class vtkIdTypeArray;
56 class vtkBitArray;
58 
60 {
61 public:
63  void PrintSelf(ostream& os, vtkIndent indent);
64 
68 
74  void SetValue(int i, double value)
75  {
76  this->ContourValues->SetValue(i,value);
77  }
79 
81 
82  double GetValue(int i)
83  {
84  return this->ContourValues->GetValue(i);
85  }
87 
89 
91  double *GetValues()
92  {
93  return this->ContourValues->GetValues();
94  }
96 
98 
101  void GetValues(double *contourValues)
102  {
103  this->ContourValues->GetValues(contourValues);
104  }
106 
108 
111  void SetNumberOfContours(int number)
112  {
113  this->ContourValues->SetNumberOfContours(number);
114  }
116 
118 
120  {
121  return this->ContourValues->GetNumberOfContours();
122  }
124 
126 
128  void GenerateValues(int numContours, double range[2])
129  {
130  this->ContourValues->GenerateValues(numContours, range);
131  }
133 
135 
137  void GenerateValues(int numContours, double
138  rangeStart, double rangeEnd)
139  {
140  this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
141  }
143 
145  unsigned long GetMTime();
146 
148 
150  void SetLocator(vtkIncrementalPointLocator *locator);
151  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
153 
156  void CreateDefaultLocator();
157 
158 protected:
161 
162  virtual int RequestData(vtkInformation* request,
163  vtkInformationVector** inputVector,
164  vtkInformationVector* outputVector);
165  virtual int RequestUpdateExtent(vtkInformation*,
169 
171  void ContourNode();
172 
173  void TraverseNeighborhoodRecursively(
174  vtkHyperOctreeLightWeightCursor* neighborhood,
175  unsigned short* xyzIds);
176  void EvaluatePoint(vtkHyperOctreeLightWeightCursor* neighborhood,
177  unsigned short* xyzIds);
178 
179  void ContourNode1D();
180 
183 
186 
188 
192  // To compute points on the fly.
193  // These are set to the input origin and size.
194  double Origin[3];
195  double Size[3];
196 
197  // This is a table for traversing a neighborhood down an octree.
198  // 8 children x 8 cursors
199  // First three bits encode the child, rest encode the cursor id.
200  // 8xCursorId + childId.
201  unsigned char NeighborhoodTraversalTable[64];
202  void GenerateTraversalTable();
203 
204 private:
206  void operator=(const vtkHyperOctreeDualGridContourFilter&); // Not implemented.
207 };
208 #endif
void GenerateValues(int numContours, double range[2])
helper object to manage setting and generating contour values
#define VTK_GRAPHICS_EXPORT
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:81
A dataset structured as a tree where each node has exactly 2^n children.
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 *)
Superclass for algorithms that produce only polydata as output.
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:37
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
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:48
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:34
Store zero or more vtkInformation instances.
void GenerateValues(int numContours, double rangeStart, double rangeEnd)
generate isosurfaces/isolines from scalar values