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 =========================================================================*/
51 #ifndef vtkHyperOctreeContourFilter_h
52 #define vtkHyperOctreeContourFilter_h
53 
54 #include "vtkFiltersHyperTreeModule.h" // For export macro
55 #include "vtkPolyDataAlgorithm.h"
56 
57 #include "vtkContourValues.h" // Needed for inline methods
58 #include "vtkCutter.h" // for VTK_SORT_BY_VALUE
59 
60 #if !defined(VTK_LEGACY_REMOVE)
62 class vtkHyperOctree;
64 class vtkTetra;
66 
69 class vtkIdTypeArray;
70 class vtkHyperOctreeContourPointsGrabber;
71 class vtkBitArray;
72 
73 class VTKFILTERSHYPERTREE_EXPORT vtkHyperOctreeContourFilter : public vtkPolyDataAlgorithm
74 {
75 public:
77  void PrintSelf(ostream& os, vtkIndent indent) override;
78 
84 
94  void SetValue(int i, double value)
95  {
96  this->ContourValues->SetValue(i,value);
97  }
98 
102  double GetValue(int i)
103  {
104  return this->ContourValues->GetValue(i);
105  }
106 
111  double *GetValues()
112  {
113  return this->ContourValues->GetValues();
114  }
115 
121  void GetValues(double *contourValues)
122  {
123  this->ContourValues->GetValues(contourValues);
124  }
125 
131  void SetNumberOfContours(int number)
132  {
133  this->ContourValues->SetNumberOfContours(number);
134  }
135 
140  {
141  return this->ContourValues->GetNumberOfContours();
142  }
143 
148  void GenerateValues(int numContours, double range[2])
149  {
150  this->ContourValues->GenerateValues(numContours, range);
151  }
152 
157  void GenerateValues(int numContours, double
158  rangeStart, double rangeEnd)
159  {
160  this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
161  }
162 
166  vtkMTimeType GetMTime() override;
167 
169 
173  void SetLocator(vtkIncrementalPointLocator *locator);
174  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
176 
181  void CreateDefaultLocator();
182 
183 protected:
185  ~vtkHyperOctreeContourFilter() override;
186 
187  int RequestData(vtkInformation* request,
188  vtkInformationVector** inputVector,
189  vtkInformationVector* outputVector) override;
192  vtkInformationVector*) override;
193  int FillInputPortInformation(int port, vtkInformation *info) override;
194 
198  void ContourNode();
199 
203  double ComputePointValue(int ptIndices[3]);
204 
205  void ContourNode1D();
206 
209 
210  vtkIdList *CellPts; // for 2D case
211 
214 
218 
224 
225  vtkHyperOctreeCursor *Sibling; // to avoid allocation in the loop
226 
227 
231 
233 
236 
237  vtkIdType CellTypeCounter[65536]; // up-to-65536 points per octant
239  vtkIdType TemplateCounter; // record the number of octants that succceed
240  // to use the template triangulator
241 
243  vtkHyperOctreeContourPointsGrabber *Grabber;
244 
246  int SortBy;
247  int Iter; // iterate over contour values in case of VTK_SORT_BY_CELL
248 
250  double LeftValue;
251  double LeftCoord;
252 
253  friend class vtkHyperOctreeContourPointsGrabber;
254 
255 private:
257  void operator=(const vtkHyperOctreeContourFilter&) = delete;
258 };
259 #endif // LEGACY remove
260 
261 #endif
helper object to manage setting and generating contour values
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkHyperOctreeContourPointsGrabber * Grabber
double * GetValues()
Get a pointer to an array of 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.
vtkIncrementalPointLocator * Locator
represent and manipulate cell attribute data
Definition: vtkCellData.h:38
Abstract class in support of both point location and point insertion.
void SetValue(int i, double value)
Methods to set / get contour values.
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
helper class to generate triangulations
void GenerateValues(int numContours, double rangeStart, double rangeEnd)
Generate numContours equally spaced contour values between specified range.
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:345
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
A dataset structured as a tree where each node has exactly 2^n children.
int GetNumberOfContours()
Get the number of contours in the list of contour values.
dynamic, self-adjusting array of double
static vtkPolyDataAlgorithm * New()
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:47
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
cell represents a 1D line
Definition: vtkLine.h:35
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:39
list of point or cell ids
Definition: vtkIdList.h:36
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
virtual vtkMTimeType GetMTime()
Return this object's modified time.
void GetValues(double *contourValues)
Fill a supplied list with contour values.
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:45
dynamic, self-adjusting array of unsigned char
Objects that can traverse hyperoctree nodes.
object to represent cell connectivity
Definition: vtkCellArray.h:50
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:36
double GetValue(int i)
Get the ith contour value.
generate isosurfaces/isolines from scalar values
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.