ParaView
vtkKdTreeManager.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkKdTreeManager.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
28 #ifndef vtkKdTreeManager_h
29 #define vtkKdTreeManager_h
30 
31 #include "vtkObject.h"
32 #include "vtkPVVTKExtensionsRenderingModule.h" // needed for export macro
33 #include "vtkSmartPointer.h" // needed for vtkSmartPointer.
34 
35 class vtkPKdTree;
36 class vtkAlgorithm;
37 class vtkDataSet;
38 class vtkDataObject;
39 class vtkExtentTranslator;
40 
41 class VTKPVVTKEXTENSIONSRENDERING_EXPORT vtkKdTreeManager : public vtkObject
42 {
43 public:
44  static vtkKdTreeManager* New();
45  vtkTypeMacro(vtkKdTreeManager, vtkObject);
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
49 
52  void AddDataObject(vtkDataObject*);
53  void RemoveAllDataObjects();
55 
60  void SetStructuredDataInformation(vtkExtentTranslator* translator, const int whole_extent[6],
61  const double origin[3], const double spacing[3]);
62 
64 
67  void SetKdTree(vtkPKdTree*);
68  vtkGetObjectMacro(KdTree, vtkPKdTree);
70 
72 
77  vtkSetMacro(NumberOfPieces, int);
78  vtkGetMacro(NumberOfPieces, int);
80 
84  void GenerateKdTree();
85 
86 protected:
89 
90  void AddDataObjectToKdTree(vtkDataObject* data);
91  void AddDataSetToKdTree(vtkDataSet* data);
92 
94  vtkPKdTree* KdTree;
96 
97  vtkSmartPointer<vtkExtentTranslator> ExtentTranslator;
98  double Origin[3];
99  double Spacing[3];
100  int WholeExtent[6];
101 
102  vtkSetVector3Macro(Origin, double);
103  vtkSetVector3Macro(Spacing, double);
104  vtkSetVector6Macro(WholeExtent, int);
105 
106 private:
107  vtkKdTreeManager(const vtkKdTreeManager&) VTK_DELETE_FUNCTION;
108  void operator=(const vtkKdTreeManager&) VTK_DELETE_FUNCTION;
109 
110  class vtkDataObjectSet;
111  vtkDataObjectSet* DataObjects;
112 };
113 
114 #endif
vtkPKdTree * KdTree
class used to generate KdTree from unstructured or structured data.
vtkSmartPointer< vtkExtentTranslator > ExtentTranslator