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=========================================================================*/
40#ifndef vtkHyperOctreeDualGridContourFilter_h
41#define vtkHyperOctreeDualGridContourFilter_h
42
43#include "vtkFiltersHyperTreeModule.h" // For export macro
45
46#include "vtkContourValues.h" // Needed for inline methods
47#include "vtkCutter.h" // for VTK_SORT_BY_VALUE
48
49class vtkHyperOctree;
50class vtkTetra;
53
57class vtkIdTypeArray;
58class vtkBitArray;
60
61class VTKFILTERSHYPERTREE_EXPORT vtkHyperOctreeDualGridContourFilter : public vtkPolyDataAlgorithm
62{
63public:
65 void PrintSelf(ostream& os, vtkIndent indent);
66
72
81 void SetValue(int i, double value)
82 {
83 this->ContourValues->SetValue(i,value);
84 }
85
89 double GetValue(int i)
90 {
91 return this->ContourValues->GetValue(i);
92 }
93
98 double *GetValues()
99 {
100 return this->ContourValues->GetValues();
101 }
102
108 void GetValues(double *contourValues)
109 {
110 this->ContourValues->GetValues(contourValues);
111 }
112
118 void SetNumberOfContours(int number)
119 {
120 this->ContourValues->SetNumberOfContours(number);
121 }
122
127 {
128 return this->ContourValues->GetNumberOfContours();
129 }
130
135 void GenerateValues(int numContours, double range[2])
136 {
137 this->ContourValues->GenerateValues(numContours, range);
138 }
139
144 void GenerateValues(int numContours, double
145 rangeStart, double rangeEnd)
146 {
147 this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
148 }
149
154
156
161 vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
163
169
170protected:
173
174 virtual int RequestData(vtkInformation* request,
175 vtkInformationVector** inputVector,
176 vtkInformationVector* outputVector);
181
186
189 unsigned short* xyzIds);
191 unsigned short* xyzIds);
192
194
197
200
202
206 // To compute points on the fly.
207 // These are set to the input origin and size.
208 double Origin[3];
209 double Size[3];
210
211 // This is a table for traversing a neighborhood down an octree.
212 // 8 children x 8 cursors
213 // First three bits encode the child, rest encode the cursor id.
214 // 8xCursorId + childId.
215 unsigned char NeighborhoodTraversalTable[64];
217
218private:
220 void operator=(const vtkHyperOctreeDualGridContourFilter&) VTK_DELETE_FUNCTION;
221};
222#endif
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:37
object to represent cell connectivity
Definition: vtkCellArray.h:51
helper object to manage setting and generating contour values
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
represent and manipulate attribute data in a dataset
Objects that can traverse hyperoctree nodes.
generate isosurfaces/isolines from scalar values
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
double GetValue(int i)
Get the ith contour value.
vtkMTimeType GetMTime()
Modified GetMTime Because we delegate to vtkContourValues.
void CreateDefaultLocator()
Create default locator.
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
void SetLocator(vtkIncrementalPointLocator *locator)
Set / get a spatial locator for merging points.
void GetValues(double *contourValues)
Fill a supplied list with contour values.
double * GetValues()
Get a pointer to an array of contour values.
static vtkHyperOctreeDualGridContourFilter * New()
Construct object with initial range (0,1) and single contour value of 0.0.
void EvaluatePoint(vtkHyperOctreeLightWeightCursor *neighborhood, unsigned short *xyzIds)
void SetValue(int i, double value)
Methods to set / get contour values.
void ContourNode()
Do the recursive contour of the node pointed by Cursor.
void GenerateValues(int numContours, double rangeStart, double rangeEnd)
Generate numContours equally spaced contour values between specified range.
int GetNumberOfContours()
Get the number of contours in the list of contour values.
void TraverseNeighborhoodRecursively(vtkHyperOctreeLightWeightCursor *neighborhood, unsigned short *xyzIds)
A dataset structured as a tree where each node has exactly 2^n children.
dynamic, self-adjusting array of vtkIdType
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:48
dynamic, self-adjusting array of unsigned char
dataset represents arbitrary combinations of all possible cell types
@ info
Definition: vtkX3D.h:376
@ value
Definition: vtkX3D.h:220
@ port
Definition: vtkX3D.h:447
@ range
Definition: vtkX3D.h:238
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248