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:
63  static vtkHyperTreeGridContour* New();
65  void PrintSelf(ostream&, vtkIndent) override;
66 
68 
72  void SetLocator(vtkIncrementalPointLocator*);
73  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
75 
80  void CreateDefaultLocator();
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:
103  ~vtkHyperTreeGridContour() override;
104 
108  int FillOutputPortInformation(int, vtkInformation*) override;
109 
114 
118  bool RecursivelyPreProcessTree(vtkHyperTreeGridNonOrientedCursor*);
119 
123  void RecursivelyProcessTree(vtkHyperTreeGridNonOrientedMooreSuperCursor*);
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
vtkHyperTreeGridContour::Locator
vtkIncrementalPointLocator * Locator
Spatial locator to merge points.
Definition: vtkHyperTreeGridContour.h:143
vtkHyperTreeGridNonOrientedMooreSuperCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridNonOrientedMooreSuperCursor.h:48
vtkContourValues::GetValues
double * GetValues()
Return a pointer to a list of contour values.
vtkContourValues::GetNumberOfContours
int GetNumberOfContours()
Return the number of contours in the.
vtkHyperTreeGridContour::InMask
vtkBitArray * InMask
Definition: vtkHyperTreeGridContour.h:172
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:31
vtkX3D::value
@ value
Definition: vtkX3D.h:226
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkHyperTreeGridContour::CellSigns
vtkBitArray ** CellSigns
Sign of isovalue if cell not treated.
Definition: vtkHyperTreeGridContour.h:138
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:35
vtkHyperTreeGridContour::Signs
std::vector< bool > Signs
Storage for signs relative to current contour value.
Definition: vtkHyperTreeGridContour.h:160
vtkHyperTreeGridContour
Extract cells from a hyper tree grid where selected scalar value is within given range.
Definition: vtkHyperTreeGridContour.h:60
vtkX3D::range
@ range
Definition: vtkX3D.h:244
vtkHyperTreeGridContour::Helper
vtkContourHelper * Helper
Pointers needed to perform isocontouring.
Definition: vtkHyperTreeGridContour.h:149
vtkHyperTreeGridAlgorithm::ProcessTrees
virtual int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *)=0
Main routine to process individual trees in the grid This is pure virtual method to be implemented by...
vtkHyperTreeGridAlgorithm.h
vtkHyperTreeGridNonOrientedCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridNonOrientedCursor.h:50
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:49
vtkHyperTreeGridContour::GenerateValues
void GenerateValues(int, double[2])
Generate numContours equally spaced contour values between specified range.
Definition: vtkHyperTreeGridContour.h:238
vtkLine
cell represents a 1D line
Definition: vtkLine.h:29
vtkHyperTreeGridContour::Pixel
vtkPixel * Pixel
Definition: vtkHyperTreeGridContour.h:152
vtkHyperTreeGridContour::ContourValues
vtkContourValues * ContourValues
Storage for contour values.
Definition: vtkHyperTreeGridContour.h:128
vtkHyperTreeGridAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkHyperTreeGridContour::SetNumberOfContours
void SetNumberOfContours(int)
Set the number of contours to place into the list.
Definition: vtkHyperTreeGridContour.h:221
vtkHyperTreeGridContour::InScalars
vtkDataArray * InScalars
Keep track of selected input scalars.
Definition: vtkHyperTreeGridContour.h:170
vtkHyperTreeGridContour::InGhostArray
vtkUnsignedCharArray * InGhostArray
Definition: vtkHyperTreeGridContour.h:173
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkContourValues
helper object to manage setting and generating contour values
Definition: vtkContourValues.h:35
vtkHyperTreeGridContour::Leaves
vtkIdList * Leaves
Definition: vtkHyperTreeGridContour.h:154
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkContourValues::GenerateValues
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
vtkContourValues::GetValue
double GetValue(int i)
Get the ith contour value.
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:51
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:30
vtkContourValues::SetValue
void SetValue(int i, double value)
Set the ith contour value.
vtkContourHelper
A utility class used by various contour filters.
Definition: vtkContourHelper.h:42
vtkContourValues.h
vtkHyperTreeGridContour::GetValue
double GetValue(int)
Get the ith contour value.
Definition: vtkHyperTreeGridContour.h:192
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkHyperTreeGridAlgorithm::FillOutputPortInformation
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
vtkHyperTreeGridContour::Line
vtkLine * Line
Definition: vtkHyperTreeGridContour.h:151
vtkPixel
a cell that represents an orthogonal quadrilateral
Definition: vtkPixel.h:34
vtkHyperTreeGridContour::SetValue
void SetValue(int, double)
Methods (inlined) to set / get contour values.
Definition: vtkHyperTreeGridContour.h:184
vtkHyperTreeGridContour::CurrentId
vtkIdType CurrentId
Keep track of current index in output polydata.
Definition: vtkHyperTreeGridContour.h:165
vtkBitArray
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:33
vtkHyperTreeGridContour::CellScalars
vtkDataArray * CellScalars
Definition: vtkHyperTreeGridContour.h:150
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59
vtkHyperTreeGridContour::Voxel
vtkVoxel * Voxel
Definition: vtkHyperTreeGridContour.h:153
vtkHyperTreeGridAlgorithm
Superclass for algorithms that produce a hyper tree grid as output.
Definition: vtkHyperTreeGridAlgorithm.h:47
vtkContourValues::SetNumberOfContours
void SetNumberOfContours(const int number)
Set the number of contours to place into the list.
vtkHyperTreeGridContour::GetValues
double * GetValues()
Get a pointer to an array of contour values.
Definition: vtkHyperTreeGridContour.h:201
vtkHyperTreeGrid
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
Definition: vtkHyperTreeGrid.h:96
vtkHyperTreeGridContour::SelectedCells
vtkBitArray * SelectedCells
Storage for pre-selected cells to be processed.
Definition: vtkHyperTreeGridContour.h:133
vtkHyperTreeGridContour::GetNumberOfContours
vtkIdType GetNumberOfContours()
Get the number of contours in the list of contour values.
Definition: vtkHyperTreeGridContour.h:229
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
vtkVoxel
a cell that represents a 3D orthogonal parallelepiped
Definition: vtkVoxel.h:38