VTK
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 =========================================================================*/
38 #ifndef vtkHyperTreeGridContour_h
39 #define vtkHyperTreeGridContour_h
40 
41 #include "vtkFiltersHyperTreeModule.h" // For export macro
43 #include "vtkContourValues.h" // Needed for inline methods
44 
45 #include <vector> // For STL
46 
47 class vtkBitArray;
48 class vtkContourHelper;
49 class vtkDataArray;
50 class vtkHyperTreeCursor;
51 class vtkHyperTreeGrid;
53 class vtkIdList;
55 class vtkLine;
56 class vtkPixel;
57 class vtkPointData;
59 class vtkVoxel;
60 
61 class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridContour : public vtkHyperTreeGridAlgorithm
62 {
63 public:
64  static vtkHyperTreeGridContour* New();
66  void PrintSelf( ostream&, vtkIndent ) override;
67 
69 
73  void SetLocator(vtkIncrementalPointLocator* );
74  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
76 
81  void CreateDefaultLocator();
82 
86  vtkMTimeType GetMTime() override;
87 
89 
92  void SetValue( int, double );
93  double GetValue( int );
94  double *GetValues();
95  void GetValues( double* );
96  void SetNumberOfContours( int) ;
97  int GetNumberOfContours();
98  void GenerateValues( int, double[2] );
99  void GenerateValues( int, double, double);
101 
102 protected:
104  ~vtkHyperTreeGridContour() override;
105 
109  int FillOutputPortInformation( int, vtkInformation* ) override;
110 
114  int ProcessTrees( vtkHyperTreeGrid*, vtkDataObject* ) override;
115 
119  bool RecursivelyPreProcessTree( vtkHyperTreeGridCursor* );
120 
124  void RecursivelyProcessTree( vtkHyperTreeGridCursor*, vtkBitArray* );
125 
130 
135 
140 
145 
147 
157 
161  std::vector<bool> Signs;
162 
167 
172 
173 private:
175  void operator=(const vtkHyperTreeGridContour&) = delete;
176 };
177 
182 inline void vtkHyperTreeGridContour::SetValue( int i, double value )
183  { this->ContourValues->SetValue( i, value ); }
184 
188 inline double vtkHyperTreeGridContour::GetValue( int i )
189  { return this->ContourValues->GetValue( i );}
190 
196  { return this->ContourValues->GetValues(); }
197 
203 inline void vtkHyperTreeGridContour::GetValues( double* contourValues )
204  { this->ContourValues->GetValues( contourValues ); }
205 
212  { this->ContourValues->SetNumberOfContours( number ); }
213 
218  { return this->ContourValues->GetNumberOfContours(); }
219 
224 inline void vtkHyperTreeGridContour::GenerateValues( int numContours,
225  double range[2] )
226  { this->ContourValues->GenerateValues( numContours, range ); }
227 
232 inline void vtkHyperTreeGridContour::GenerateValues( int numContours,
233  double rangeStart,
234  double rangeEnd )
235  { this->ContourValues->GenerateValues( numContours, rangeStart, rangeEnd ); }
236 
237 #endif /* vtkHyperTreeGridContour_h */
vtkBitArray * SelectedCells
Storage for pre-selected cells to be processed.
helper object to manage setting and generating contour values
represent and manipulate point attribute data
Definition: vtkPointData.h:37
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:302
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
a cell that represents an orthogonal quadrilateral
Definition: vtkPixel.h:40
Abstract class in support of both point location and point insertion.
vtkDataArray * InScalars
Keep track of selected input scalars.
std::vector< bool > Signs
Storage for signs relative to current contour value.
vtkContourHelper * Helper
Pointers needed to perform isocontouring.
int vtkIdType
Definition: vtkType.h:347
void SetNumberOfContours(int)
Set the number of contours to place into the list.
void GenerateValues(int, double[2])
Generate numContours equally spaced contour values between specified range.
vtkIdList * Leaves
Pointers needed to perform isocontouring.
Objects for depth-first traversal HyperTrees.
vtkContourValues * ContourValues
Storage for contour values.
cell represents a 1D line
Definition: vtkLine.h:35
Objects for depth-first traversal HyperTreeGrids.
a cell that represents a 3D orthogonal parallelepiped
Definition: vtkVoxel.h:44
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:36
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
virtual vtkMTimeType GetMTime()
Return this object&#39;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.
int GetNumberOfContours()
Get the number of contours in the list of contour values.
vtkIdType CurrentId
Keep track of current index in output polydata.
Superclass for algorithms that produce a hyper tree grid as output.
static vtkAlgorithm * New()
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:64
vtkDataArray * CellScalars
Pointers needed to perform isocontouring.
A utility class used by various contour filters.
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...