VTK
vtkHyperOctreeDualGridContourFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHyperOctreeDualGridContourFilter.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 vtkHyperOctreeDualGridContourFilter_h
41 #define vtkHyperOctreeDualGridContourFilter_h
42 
43 #include "vtkFiltersHyperTreeModule.h" // For export macro
44 #include "vtkPolyDataAlgorithm.h"
45 
46 #include "vtkContourValues.h" // Needed for inline methods
47 #include "vtkCutter.h" // for VTK_SORT_BY_VALUE
48 
49 class vtkHyperOctree;
50 class vtkTetra;
53 
57 class vtkIdTypeArray;
58 class vtkBitArray;
60 
61 class VTKFILTERSHYPERTREE_EXPORT vtkHyperOctreeDualGridContourFilter : public vtkPolyDataAlgorithm
62 {
63 public:
65  void PrintSelf(ostream& os, vtkIndent indent);
66 
72 
81  void SetValue(int i, double value)
82  {
83  this->ContourValues->SetValue(i,value);
84  }
85 
89  double GetValue(int i)
90  {
91  return this->ContourValues->GetValue(i);
92  }
93 
98  double *GetValues()
99  {
100  return this->ContourValues->GetValues();
101  }
102 
108  void GetValues(double *contourValues)
109  {
110  this->ContourValues->GetValues(contourValues);
111  }
112 
118  void SetNumberOfContours(int number)
119  {
120  this->ContourValues->SetNumberOfContours(number);
121  }
122 
127  {
128  return this->ContourValues->GetNumberOfContours();
129  }
130 
135  void GenerateValues(int numContours, double range[2])
136  {
137  this->ContourValues->GenerateValues(numContours, range);
138  }
139 
144  void GenerateValues(int numContours, double
145  rangeStart, double rangeEnd)
146  {
147  this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
148  }
149 
154 
156 
161  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
163 
169 
170 protected:
173 
174  virtual int RequestData(vtkInformation* request,
175  vtkInformationVector** inputVector,
176  vtkInformationVector* outputVector);
181 
185  void ContourNode();
186 
188  vtkHyperOctreeLightWeightCursor* neighborhood,
189  unsigned short* xyzIds);
191  unsigned short* xyzIds);
192 
194 
197 
200 
202 
206  // To compute points on the fly.
207  // These are set to the input origin and size.
208  double Origin[3];
209  double Size[3];
210 
211  // This is a table for traversing a neighborhood down an octree.
212  // 8 children x 8 cursors
213  // First three bits encode the child, rest encode the cursor id.
214  // 8xCursorId + childId.
215  unsigned char NeighborhoodTraversalTable[64];
217 
218 private:
220  void operator=(const vtkHyperOctreeDualGridContourFilter&) VTK_DELETE_FUNCTION;
221 };
222 #endif
vtkHyperOctreeDualGridContourFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkHyperOctreeDualGridContourFilter::Locator
vtkIncrementalPointLocator * Locator
Definition: vtkHyperOctreeDualGridContourFilter.h:196
vtkHyperOctreeDualGridContourFilter
generate isosurfaces/isolines from scalar values
Definition: vtkHyperOctreeDualGridContourFilter.h:62
vtkHyperOctreeDualGridContourFilter::Input
vtkHyperOctree * Input
Definition: vtkHyperOctreeDualGridContourFilter.h:198
vtkHyperOctreeDualGridContourFilter::New
static vtkHyperOctreeDualGridContourFilter * New()
Construct object with initial range (0,1) and single contour value of 0.0.
vtkX3D::value
@ value
Definition: vtkX3D.h:220
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:59
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkHyperOctreeDualGridContourFilter::GenerateTraversalTable
void GenerateTraversalTable()
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:42
vtkHyperOctreeCursor
Objects that can traverse hyperoctree nodes.
Definition: vtkHyperOctreeCursor.h:52
vtkHyperOctreeDualGridContourFilter::ContourValues
vtkContourValues * ContourValues
Definition: vtkHyperOctreeDualGridContourFilter.h:195
vtkX3D::range
@ range
Definition: vtkX3D.h:238
vtkHyperOctreeDualGridContourFilter::CreateDefaultLocator
void CreateDefaultLocator()
Create default locator.
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkHyperOctreeDualGridContourFilter::EvaluatePoint
void EvaluatePoint(vtkHyperOctreeLightWeightCursor *neighborhood, unsigned short *xyzIds)
vtkHyperOctreeDualGridContourFilter::GetValues
double * GetValues()
Get a pointer to an array of contour values.
Definition: vtkHyperOctreeDualGridContourFilter.h:98
vtkMTimeType
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
vtkPolyDataAlgorithm.h
vtkHyperOctreeDualGridContourFilter::InPD
vtkDataSetAttributes * InPD
Definition: vtkHyperOctreeDualGridContourFilter.h:203
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkHyperOctreeDualGridContourFilter::GetValue
double GetValue(int i)
Get the ith contour value.
Definition: vtkHyperOctreeDualGridContourFilter.h:89
vtkHyperOctreeDualGridContourFilter::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
vtkHyperOctreeDualGridContourFilter::GetValues
void GetValues(double *contourValues)
Fill a supplied list with contour values.
Definition: vtkHyperOctreeDualGridContourFilter.h:108
vtkHyperOctreeDualGridContourFilter::~vtkHyperOctreeDualGridContourFilter
~vtkHyperOctreeDualGridContourFilter()
vtkContourValues
helper object to manage setting and generating contour values
Definition: vtkContourValues.h:36
vtkHyperOctreeDualGridContourFilter::InScalars
vtkDataArray * InScalars
Definition: vtkHyperOctreeDualGridContourFilter.h:205
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:51
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:52
vtkHyperOctreeDualGridContourFilter::ContourNode1D
void ContourNode1D()
vtkHyperOctreeDualGridContourFilter::vtkHyperOctreeDualGridContourFilter
vtkHyperOctreeDualGridContourFilter()
vtkHyperOctreeLightWeightCursor
Definition: vtkHyperOctree.h:617
vtkHyperOctreeDualGridContourFilter::SetValue
void SetValue(int i, double value)
Methods to set / get contour values.
Definition: vtkHyperOctreeDualGridContourFilter.h:81
vtkHyperOctreeDualGridContourFilter::ContourNode
void ContourNode()
Do the recursive contour of the node pointed by Cursor.
vtkHyperOctreeDualGridContourFilter::OutPD
vtkDataSetAttributes * OutPD
Definition: vtkHyperOctreeDualGridContourFilter.h:204
vtkContourValues.h
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkHyperOctreeDualGridContourFilter::GenerateValues
void GenerateValues(int numContours, double rangeStart, double rangeEnd)
Generate numContours equally spaced contour values between specified range.
Definition: vtkHyperOctreeDualGridContourFilter.h:144
vtkHyperOctreeDualGridContourFilter::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:42
vtkHyperOctreeDualGridContourFilter::GenerateValues
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
Definition: vtkHyperOctreeDualGridContourFilter.h:135
vtkHyperOctreeDualGridContourFilter::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkHyperOctreeDualGridContourFilter::GetNumberOfContours
int GetNumberOfContours()
Get the number of contours in the list of contour values.
Definition: vtkHyperOctreeDualGridContourFilter.h:126
vtkHyperOctreeDualGridContourFilter::SetNumberOfContours
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
Definition: vtkHyperOctreeDualGridContourFilter.h:118
vtkBitArray
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:37
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:83
vtkHyperOctreeDualGridContourFilter::TraverseNeighborhoodRecursively
void TraverseNeighborhoodRecursively(vtkHyperOctreeLightWeightCursor *neighborhood, unsigned short *xyzIds)
vtkCutter.h
vtkHyperOctree
A dataset structured as a tree where each node has exactly 2^n children.
Definition: vtkHyperOctree.h:144
vtkTetra
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:48
vtkHyperOctreeDualGridContourFilter::GetMTime
vtkMTimeType GetMTime()
Modified GetMTime Because we delegate to vtkContourValues.
vtkHyperOctreeDualGridContourFilter::SetLocator
void SetLocator(vtkIncrementalPointLocator *locator)
Set / get a spatial locator for merging points.
vtkHyperOctreeDualGridContourFilter::Output
vtkPolyData * Output
Definition: vtkHyperOctreeDualGridContourFilter.h:199
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:45
vtkHyperOctreeDualGridContourFilter::NewPolys
vtkCellArray * NewPolys
Definition: vtkHyperOctreeDualGridContourFilter.h:201