VTK  9.0.1
vtkHyperTreeGridContour.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHyperTreeGridContour.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 vtkHyperTreeGridContour_h
38 #define vtkHyperTreeGridContour_h
39 
40 #include "vtkContourValues.h" // Needed for inline methods
41 #include "vtkFiltersHyperTreeModule.h" // For export macro
43 
44 #include <vector> // For STL
45 
46 class vtkBitArray;
47 class vtkContourHelper;
48 class vtkDataArray;
49 class vtkHyperTreeGrid;
50 class vtkIdList;
52 class vtkLine;
53 class vtkPixel;
54 class vtkPointData;
56 class vtkVoxel;
59 
60 class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridContour : public vtkHyperTreeGridAlgorithm
61 {
62 public:
65  void PrintSelf(ostream&, vtkIndent) override;
66 
68 
73  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
75 
81 
85  vtkMTimeType GetMTime() override;
86 
88 
91  void SetValue(int, double);
92  double GetValue(int);
93  double* GetValues();
94  void GetValues(double*);
95  void SetNumberOfContours(int);
96  vtkIdType GetNumberOfContours();
97  void GenerateValues(int, double[2]);
98  void GenerateValues(int, double, double);
100 
101 protected:
104 
109 
114 
119 
124 
129 
134 
139 
144 
146 
156 
160  std::vector<bool> Signs;
161 
166 
171 
174 
175 private:
177  void operator=(const vtkHyperTreeGridContour&) = delete;
178 };
179 
184 inline void vtkHyperTreeGridContour::SetValue(int i, double value)
185 {
186  this->ContourValues->SetValue(i, value);
187 }
188 
193 {
194  return this->ContourValues->GetValue(i);
195 }
196 
202 {
203  return this->ContourValues->GetValues();
204 }
205 
211 inline void vtkHyperTreeGridContour::GetValues(double* contourValues)
212 {
213  this->ContourValues->GetValues(contourValues);
214 }
215 
222 {
223  this->ContourValues->SetNumberOfContours(number);
224 }
225 
230 {
231  return this->ContourValues->GetNumberOfContours();
232 }
233 
238 inline void vtkHyperTreeGridContour::GenerateValues(int numContours, double range[2])
239 {
240  this->ContourValues->GenerateValues(numContours, range);
241 }
242 
248  int numContours, double rangeStart, double rangeEnd)
249 {
250  this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
251 }
252 
253 #endif // vtkHyperTreeGridContour_h
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:34
A utility class used by various contour filters.
helper object to manage setting and generating contour values
int GetNumberOfContours()
Return the number of contours in the.
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
void SetNumberOfContours(const int number)
Set the number of contours to place into the list.
void SetValue(int i, double value)
Set the ith contour value.
double GetValue(int i)
Get the ith contour value.
double * GetValues()
Return a pointer to a list of contour values.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:50
general representation of visualization data
Definition: vtkDataObject.h:60
Superclass for algorithms that produce a hyper tree grid as output.
Extract cells from a hyper tree grid where selected scalar value is within given range.
vtkBitArray ** CellSigns
Sign of isovalue if cell not treated.
void CreateDefaultLocator()
Create default locator.
static vtkHyperTreeGridContour * New()
vtkIdType GetNumberOfContours()
Get the number of contours in the list of contour values.
void SetValue(int, double)
Methods (inlined) to set / get contour values.
vtkIdType CurrentId
Keep track of current index in output polydata.
double GetValue(int)
Get the ith contour value.
vtkMTimeType GetMTime() override
Modified GetMTime Because we delegate to vtkContourValues.
int FillOutputPortInformation(int, vtkInformation *) override
For this algorithm the output is a vtkPolyData instance.
vtkIncrementalPointLocator * Locator
Spatial locator to merge points.
std::vector< bool > Signs
Storage for signs relative to current contour value.
vtkDataArray * InScalars
Keep track of selected input scalars.
void PrintSelf(ostream &, vtkIndent) override
Methods invoked by print to print information about the object including superclasses.
void SetNumberOfContours(int)
Set the number of contours to place into the list.
double * GetValues()
Get a pointer to an array of contour values.
void RecursivelyProcessTree(vtkHyperTreeGridNonOrientedMooreSuperCursor *)
Recursively descend into tree down to leaves.
bool RecursivelyPreProcessTree(vtkHyperTreeGridNonOrientedCursor *)
Recursively decide whether a cell is intersected by a contour.
vtkContourValues * ContourValues
Storage for contour values.
void SetLocator(vtkIncrementalPointLocator *)
Set / get a spatial locator for merging points.
int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *) override
Main routine to generate isocontours of hyper tree grid.
vtkBitArray * SelectedCells
Storage for pre-selected cells to be processed.
~vtkHyperTreeGridContour() override
vtkContourHelper * Helper
Pointers needed to perform isocontouring.
vtkUnsignedCharArray * InGhostArray
void GenerateValues(int, double[2])
Generate numContours equally spaced contour values between specified range.
Objects for traversal a HyperTreeGrid.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
list of point or cell ids
Definition: vtkIdList.h:31
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:34
Store vtkAlgorithm input/output information.
cell represents a 1D line
Definition: vtkLine.h:30
a cell that represents an orthogonal quadrilateral
Definition: vtkPixel.h:35
represent and manipulate point attribute data
Definition: vtkPointData.h:32
dynamic, self-adjusting array of unsigned char
a cell that represents a 3D orthogonal parallelepiped
Definition: vtkVoxel.h:39
@ value
Definition: vtkX3D.h:226
@ range
Definition: vtkX3D.h:244
int vtkIdType
Definition: vtkType.h:338
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293