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 =========================================================================*/
37 #ifndef vtkHyperOctreeDualGridContourFilter_h
38 #define vtkHyperOctreeDualGridContourFilter_h
39 
40 #include "vtkFiltersHyperTreeModule.h" // For export macro
41 #include "vtkPolyDataAlgorithm.h"
42 
43 #include "vtkContourValues.h" // Needed for inline methods
44 #include "vtkCutter.h" // for VTK_SORT_BY_VALUE
45 
46 class vtkHyperOctree;
47 class vtkTetra;
50 
54 class vtkIdTypeArray;
55 class vtkBitArray;
57 
58 class VTKFILTERSHYPERTREE_EXPORT vtkHyperOctreeDualGridContourFilter : public vtkPolyDataAlgorithm
59 {
60 public:
62  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
63 
69 
78  void SetValue(int i, double value)
79  {
80  this->ContourValues->SetValue(i,value);
81  }
82 
86  double GetValue(int i)
87  {
88  return this->ContourValues->GetValue(i);
89  }
90 
95  double *GetValues()
96  {
97  return this->ContourValues->GetValues();
98  }
99 
105  void GetValues(double *contourValues)
106  {
107  this->ContourValues->GetValues(contourValues);
108  }
109 
115  void SetNumberOfContours(int number)
116  {
117  this->ContourValues->SetNumberOfContours(number);
118  }
119 
124  {
125  return this->ContourValues->GetNumberOfContours();
126  }
127 
132  void GenerateValues(int numContours, double range[2])
133  {
134  this->ContourValues->GenerateValues(numContours, range);
135  }
136 
141  void GenerateValues(int numContours, double
142  rangeStart, double rangeEnd)
143  {
144  this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
145  }
146 
150  vtkMTimeType GetMTime() VTK_OVERRIDE;
151 
153 
157  void SetLocator(vtkIncrementalPointLocator *locator);
158  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
160 
165  void CreateDefaultLocator();
166 
167 protected:
169  ~vtkHyperOctreeDualGridContourFilter() VTK_OVERRIDE;
170 
171  int RequestData(vtkInformation* request,
172  vtkInformationVector** inputVector,
173  vtkInformationVector* outputVector) VTK_OVERRIDE;
176  vtkInformationVector*) VTK_OVERRIDE;
177  int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
178 
182  void ContourNode();
183 
184  void TraverseNeighborhoodRecursively(
185  vtkHyperOctreeLightWeightCursor* neighborhood,
186  unsigned short* xyzIds);
187  void EvaluatePoint(vtkHyperOctreeLightWeightCursor* neighborhood,
188  unsigned short* xyzIds);
189 
190  void ContourNode1D();
191 
194 
197 
199 
203  // To compute points on the fly.
204  // These are set to the input origin and size.
205  double Origin[3];
206  double Size[3];
207 
208  // This is a table for traversing a neighborhood down an octree.
209  // 8 children x 8 cursors
210  // First three bits encode the child, rest encode the cursor id.
211  // 8xCursorId + childId.
212  unsigned char NeighborhoodTraversalTable[64];
213  void GenerateTraversalTable();
214 
215 private:
217  void operator=(const vtkHyperOctreeDualGridContourFilter&) VTK_DELETE_FUNCTION;
218 };
219 #endif
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
helper object to manage setting and generating contour values
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
double * GetValues()
Get a pointer to an array of contour values.
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:79
A dataset structured as a tree where each node has exactly 2^n children.
void SetValue(int i, double value)
Methods to set / get contour values.
static vtkPolyDataAlgorithm * New()
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:41
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:33
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:48
virtual vtkMTimeType GetMTime()
Return this object's modified time.
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
double GetValue(int i)
Get the ith contour value.
represent and manipulate attribute data in a dataset
dynamic, self-adjusting array of unsigned char
int GetNumberOfContours()
Get the number of contours in the list of contour values.
Objects that can traverse hyperoctree nodes.
object to represent cell connectivity
Definition: vtkCellArray.h:44
void GetValues(double *contourValues)
Fill a supplied list with contour values.
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:33
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
void GenerateValues(int numContours, double rangeStart, double rangeEnd)
Generate numContours equally spaced contour values between specified range.
generate isosurfaces/isolines from scalar values
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.