VTK  9.2.6
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 =========================================================================*/
40 #ifndef vtkHyperTreeGridContour_h
41 #define vtkHyperTreeGridContour_h
42 
43 #include "vtkContourValues.h" // Needed for inline methods
44 #include "vtkFiltersHyperTreeModule.h" // For export macro
46 
47 #include <vector> // For STL
48 
49 class vtkBitArray;
50 class vtkCellData;
51 class vtkContourHelper;
52 class vtkDataArray;
53 class vtkHyperTreeGrid;
54 class vtkIdList;
56 class vtkLine;
57 class vtkPixel;
59 class vtkVoxel;
62 
63 class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridContour : public vtkHyperTreeGridAlgorithm
64 {
65 public:
66  static vtkHyperTreeGridContour* New();
68  void PrintSelf(ostream& os, vtkIndent indent) override;
69 
71 
75  void SetLocator(vtkIncrementalPointLocator*);
76  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
78 
83  void CreateDefaultLocator();
84 
88  vtkMTimeType GetMTime() override;
89 
91 
94  void SetValue(int, double);
95  double GetValue(int);
96  double* GetValues();
97  void GetValues(double*);
98  void SetNumberOfContours(int);
99  vtkIdType GetNumberOfContours();
100  void GenerateValues(int, double[2]);
101  void GenerateValues(int, double, double);
103 
104 protected:
106  ~vtkHyperTreeGridContour() override;
107 
111  int FillOutputPortInformation(int, vtkInformation*) override;
112 
117 
121  bool RecursivelyPreProcessTree(vtkHyperTreeGridNonOrientedCursor*);
122 
126  void RecursivelyProcessTree(vtkHyperTreeGridNonOrientedMooreSuperCursor*);
127 
132 
137 
142 
147 
149 
159 
163  std::vector<bool> Signs;
164 
169 
174 
177 
178 private:
180  void operator=(const vtkHyperTreeGridContour&) = delete;
181 };
182 
187 inline void vtkHyperTreeGridContour::SetValue(int i, double value)
188 {
189  this->ContourValues->SetValue(i, value);
190 }
191 
196 {
197  return this->ContourValues->GetValue(i);
198 }
199 
205 {
206  return this->ContourValues->GetValues();
207 }
208 
214 inline void vtkHyperTreeGridContour::GetValues(double* contourValues)
215 {
216  this->ContourValues->GetValues(contourValues);
217 }
218 
225 {
226  this->ContourValues->SetNumberOfContours(number);
227 }
228 
233 {
234  return this->ContourValues->GetNumberOfContours();
235 }
236 
241 inline void vtkHyperTreeGridContour::GenerateValues(int numContours, double range[2])
242 {
243  this->ContourValues->GenerateValues(numContours, range);
244 }
245 
251  int numContours, double rangeStart, double rangeEnd)
252 {
253  this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
254 }
255 
256 #endif // vtkHyperTreeGridContour_h
vtkBitArray * SelectedCells
Storage for pre-selected cells to be processed.
helper object to manage setting and generating contour values
double * GetValues()
Get a pointer to an array of contour values.
vtkBitArray ** CellSigns
Sign of isovalue if cell not treated.
int FillOutputPortInformation(int, vtkInformation *) override
Define default input and output port types.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
void SetNumberOfContours(const int number)
Set the number of contours to place into the list.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
represent and manipulate cell attribute data
Definition: vtkCellData.h:41
a cell that represents an orthogonal quadrilateral
Definition: vtkPixel.h:37
Abstract class in support of both point location and point insertion.
vtkDataArray * InScalars
Keep track of selected input scalars.
vtkUnsignedCharArray * InGhostArray
std::vector< bool > Signs
Storage for signs relative to current contour value.
vtkContourHelper * Helper
Pointers needed to perform isocontouring.
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
int vtkIdType
Definition: vtkType.h:332
double GetValue(int i)
Get the ith contour value.
void SetNumberOfContours(int)
Set the number of contours to place into the list.
Objects for traversal a HyperTreeGrid.
void GenerateValues(int, double[2])
Generate numContours equally spaced contour values between specified range.
vtkIdList * Leaves
Pointers needed to perform isocontouring.
vtkContourValues * ContourValues
Storage for contour values.
cell represents a 1D line
Definition: vtkLine.h:33
double * GetValues()
Return a pointer to a list of contour values.
a cell that represents a 3D orthogonal parallelepiped
Definition: vtkVoxel.h:41
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkPixel * Pixel
Pointers needed to perform isocontouring.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
list of point or cell ids
Definition: vtkIdList.h:33
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
virtual vtkMTimeType GetMTime()
Return this object's modified time.
void SetValue(int, double)
Methods (inlined) to set / get contour values.
dynamic, self-adjusting array of unsigned char
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:36
Extract cells from a hyper tree grid where selected scalar value is within given range.
vtkIdType CurrentId
Keep track of current index in output polydata.
Superclass for algorithms that produce a hyper tree grid as output.
static vtkAlgorithm * New()
int GetNumberOfContours()
Return the number of contours in the.
double GetValue(int)
Get the ith contour value.
vtkIncrementalPointLocator * Locator
Spatial locator to merge points.
vtkLine * Line
Pointers needed to perform isocontouring.
general representation of visualization data
Definition: vtkDataObject.h:65
vtkDataArray * CellScalars
Pointers needed to perform isocontouring.
A utility class used by various contour filters.
vtkIdType GetNumberOfContours()
Get the number of contours in the list of contour values.
void SetValue(int i, double value)
Set the ith contour value.
vtkVoxel * Voxel
Pointers needed to perform isocontouring.
virtual int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *)=0
Main routine to process individual trees in the grid This is pure virtual method to be implemented by...