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 =========================================================================*/
35 #ifndef vtkHyperTreeGridContour_h
36 #define vtkHyperTreeGridContour_h
37 
38 #include "vtkFiltersHyperTreeModule.h" // For export macro
40 #include "vtkContourValues.h" // Needed for inline methods
41 
42 #include <vector> // For STL
43 
44 class vtkBitArray;
45 class vtkContourHelper;
46 class vtkDataArray;
47 class vtkHyperTreeCursor;
48 class vtkHyperTreeGrid;
50 class vtkIdList;
52 class vtkLine;
53 class vtkPixel;
54 class vtkPointData;
56 class vtkVoxel;
57 
58 class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridContour : public vtkHyperTreeGridAlgorithm
59 {
60 public:
61  static vtkHyperTreeGridContour* New();
63  void PrintSelf( ostream&, vtkIndent ) override;
64 
66 
70  void SetLocator(vtkIncrementalPointLocator* );
71  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
73 
78  void CreateDefaultLocator();
79 
83  vtkMTimeType GetMTime() override;
84 
86 
89  void SetValue( int, double );
90  double GetValue( int );
91  double *GetValues();
92  void GetValues( double* );
93  void SetNumberOfContours( int) ;
94  int GetNumberOfContours();
95  void GenerateValues( int, double[2] );
96  void GenerateValues( int, double, double);
98 
99 protected:
101  ~vtkHyperTreeGridContour() override;
102 
106  int FillOutputPortInformation( int, vtkInformation* ) override;
107 
111  int ProcessTrees( vtkHyperTreeGrid*, vtkDataObject* ) override;
112 
116  bool RecursivelyPreProcessTree( vtkHyperTreeGridCursor* );
117 
121  void RecursivelyProcessTree( vtkHyperTreeGridCursor*, vtkBitArray* );
122 
127 
132 
137 
142 
144 
154 
158  std::vector<bool> Signs;
159 
164 
169 
170 private:
172  void operator=(const vtkHyperTreeGridContour&) = delete;
173 };
174 
179 inline void vtkHyperTreeGridContour::SetValue( int i, double value )
180  { this->ContourValues->SetValue( i, value ); }
181 
185 inline double vtkHyperTreeGridContour::GetValue( int i )
186  { return this->ContourValues->GetValue( i );}
187 
193  { return this->ContourValues->GetValues(); }
194 
200 inline void vtkHyperTreeGridContour::GetValues( double* contourValues )
201  { this->ContourValues->GetValues( contourValues ); }
202 
209  { this->ContourValues->SetNumberOfContours( number ); }
210 
215  { return this->ContourValues->GetNumberOfContours(); }
216 
221 inline void vtkHyperTreeGridContour::GenerateValues( int numContours,
222  double range[2] )
223  { this->ContourValues->GenerateValues( numContours, range ); }
224 
229 inline void vtkHyperTreeGridContour::GenerateValues( int numContours,
230  double rangeStart,
231  double rangeEnd )
232  { this->ContourValues->GenerateValues( numContours, rangeStart, rangeEnd ); }
233 
234 #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:141
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:31
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:136
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:158
vtkHyperTreeGridContour
Extract cells from a hyper tree grid where selected scalar value is within given range.
Definition: vtkHyperTreeGridContour.h:58
vtkX3D::range
Definition: vtkX3D.h:238
vtkHyperTreeGridContour::Helper
vtkContourHelper * Helper
Pointers needed to perform isocontouring.
Definition: vtkHyperTreeGridContour.h:147
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:48
vtkHyperTreeGridContour::GenerateValues
void GenerateValues(int, double[2])
Generate numContours equally spaced contour values between specified range.
Definition: vtkHyperTreeGridContour.h:221
vtkLine
cell represents a 1D line
Definition: vtkLine.h:29
vtkHyperTreeGridContour::Pixel
vtkPixel * Pixel
Definition: vtkHyperTreeGridContour.h:150
vtkHyperTreeGridContour::ContourValues
vtkContourValues * ContourValues
Storage for contour values.
Definition: vtkHyperTreeGridContour.h:126
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:208
vtkHyperTreeGridContour::InScalars
vtkDataArray * InScalars
Keep track of selected input scalars.
Definition: vtkHyperTreeGridContour.h:168
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:152
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:185
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
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:149
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:179
vtkHyperTreeGridContour::GetNumberOfContours
int GetNumberOfContours()
Get the number of contours in the list of contour values.
Definition: vtkHyperTreeGridContour.h:214
vtkHyperTreeGridContour::CurrentId
vtkIdType CurrentId
Keep track of current index in output polydata.
Definition: vtkHyperTreeGridContour.h:163
vtkBitArray
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:33
vtkHyperTreeGridContour::CellScalars
vtkDataArray * CellScalars
Definition: vtkHyperTreeGridContour.h:148
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:58
vtkHyperTreeGridContour::Voxel
vtkVoxel * Voxel
Definition: vtkHyperTreeGridContour.h:151
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:192
vtkHyperTreeGrid
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
Definition: vtkHyperTreeGrid.h:67
vtkHyperTreeGridContour::SelectedCells
vtkBitArray * SelectedCells
Storage for pre-selected cells to be processed.
Definition: vtkHyperTreeGridContour.h:131
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
vtkVoxel
a cell that represents a 3D orthogonal parallelepiped
Definition: vtkVoxel.h:38