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 */
vtkHyperTreeGridCursor
Objects for depth-first traversal HyperTreeGrids.
Definition: vtkHyperTreeGridCursor.h:45
vtkHyperTreeGridContour::Locator
vtkIncrementalPointLocator * Locator
Spatial locator to merge points.
Definition: vtkHyperTreeGridContour.h:144
vtkContourValues::GetValues
double * GetValues()
Return a pointer to a list of contour values.
vtkContourValues::GetNumberOfContours
int GetNumberOfContours()
Return the number of contours in the.
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkX3D::value
Definition: vtkX3D.h:220
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkHyperTreeGridContour::CellSigns
vtkBitArray ** CellSigns
Sign of isovalue if cell not treated.
Definition: vtkHyperTreeGridContour.h:139
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:41
vtkHyperTreeGridContour::Signs
std::vector< bool > Signs
Storage for signs relative to current contour value.
Definition: vtkHyperTreeGridContour.h:161
vtkHyperTreeGridContour
Extract cells from a hyper tree grid where selected scalar value is within given range.
Definition: vtkHyperTreeGridContour.h:61
vtkX3D::range
Definition: vtkX3D.h:238
vtkHyperTreeGridContour::Helper
vtkContourHelper * Helper
Pointers needed to perform isocontouring.
Definition: vtkHyperTreeGridContour.h:150
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
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkHyperTreeGridContour::GenerateValues
void GenerateValues(int, double[2])
Generate numContours equally spaced contour values between specified range.
Definition: vtkHyperTreeGridContour.h:224
vtkLine
cell represents a 1D line
Definition: vtkLine.h:35
vtkHyperTreeGridContour::Pixel
vtkPixel * Pixel
Definition: vtkHyperTreeGridContour.h:153
vtkHyperTreeGridContour::ContourValues
vtkContourValues * ContourValues
Storage for contour values.
Definition: vtkHyperTreeGridContour.h:129
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:211
vtkHyperTreeGridContour::InScalars
vtkDataArray * InScalars
Keep track of selected input scalars.
Definition: vtkHyperTreeGridContour.h:171
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkHyperTreeCursor
Objects for depth-first traversal HyperTrees.
Definition: vtkHyperTreeCursor.h:42
vtkContourValues
helper object to manage setting and generating contour values
Definition: vtkContourValues.h:35
vtkHyperTreeGridContour::Leaves
vtkIdList * Leaves
Definition: vtkHyperTreeGridContour.h:155
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
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:36
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:188
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
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:152
vtkPixel
a cell that represents an orthogonal quadrilateral
Definition: vtkPixel.h:40
vtkHyperTreeGridContour::SetValue
void SetValue(int, double)
Methods (inlined) to set / get contour values.
Definition: vtkHyperTreeGridContour.h:182
vtkHyperTreeGridContour::GetNumberOfContours
int GetNumberOfContours()
Get the number of contours in the list of contour values.
Definition: vtkHyperTreeGridContour.h:217
vtkHyperTreeGridContour::CurrentId
vtkIdType CurrentId
Keep track of current index in output polydata.
Definition: vtkHyperTreeGridContour.h:166
vtkBitArray
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:36
vtkHyperTreeGridContour::CellScalars
vtkDataArray * CellScalars
Definition: vtkHyperTreeGridContour.h:151
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64
vtkHyperTreeGridContour::Voxel
vtkVoxel * Voxel
Definition: vtkHyperTreeGridContour.h:154
vtkHyperTreeGridAlgorithm
Superclass for algorithms that produce a hyper tree grid as output.
Definition: vtkHyperTreeGridAlgorithm.h:46
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:195
vtkHyperTreeGrid
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
Definition: vtkHyperTreeGrid.h:70
vtkHyperTreeGridContour::SelectedCells
vtkBitArray * SelectedCells
Storage for pre-selected cells to be processed.
Definition: vtkHyperTreeGridContour.h:134
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
vtkVoxel
a cell that represents a 3D orthogonal parallelepiped
Definition: vtkVoxel.h:44