VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkHyperOctreeLimiter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHyperOctreeLimiter.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 =========================================================================*/
27 #ifndef __vtkHyperOctreeLimiter_h
28 #define __vtkHyperOctreeLimiter_h
29 
30 #include "vtkFiltersHyperTreeModule.h" // For export macro
31 #include "vtkDataSetAlgorithm.h"
32 
33 class vtkHyperOctree;
34 class vtkHyperOctreeCursor;
35 
36 class VTKFILTERSHYPERTREE_EXPORT vtkHyperOctreeLimiter : public vtkDataSetAlgorithm
37 {
38 public:
39  static vtkHyperOctreeLimiter *New();
40  vtkTypeMacro(vtkHyperOctreeLimiter, vtkDataSetAlgorithm);
41 
43  int GetMaximumLevel();
44 
46  void SetMaximumLevel(int levels);
47 
48 protected:
51 
52  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
53  virtual int FillInputPortInformation(int port, vtkInformation *info);
54  virtual int FillOutputPortInformation(int port, vtkInformation *info);
55 
56  vtkHyperOctree *Input;
57  vtkHyperOctree *Output;
58 
59  void BuildNextCell(vtkHyperOctreeCursor *, vtkHyperOctreeCursor *, int);
60 
61  void AddInteriorAttributes(vtkHyperOctreeCursor *, int);
62  double MeasureCell(int);
63 
65  double TopSize;
66  int Dimension;
69 
70  double *AccumScratch;
71  int AccumSize;
72 
73 private:
74  vtkHyperOctreeLimiter(const vtkHyperOctreeLimiter&); // Not implemented.
75  void operator=(const vtkHyperOctreeLimiter&); // Not implemented.
76 };
77 
78 #endif
Limit the tree's depth, averaging data from lower level branches into the new leaves at the cut point...