VTK
vtkHierarchicalBoxDataSet.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHierarchicalBoxDataSet.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 =========================================================================*/
42 #ifndef __vtkHierarchicalBoxDataSet_h
43 #define __vtkHierarchicalBoxDataSet_h
44 
45 #include "vtkCompositeDataSet.h"
46 
47 class vtkAMRBox;
51 class vtkUniformGrid;
52 
54 {
55 public:
58  void PrintSelf(ostream& os, vtkIndent indent);
59 
62 
65 
68  void SetNumberOfLevels(unsigned int numLevels);
69 
71  unsigned int GetNumberOfLevels();
72 
74  void SetNumberOfDataSets(unsigned int level, unsigned int numdatasets);
75 
77  unsigned int GetNumberOfDataSets(unsigned int level);
78 
80 
84  virtual void SetDataSet(vtkCompositeDataIterator* iter, vtkDataObject* dataObj)
85  { this->Superclass::SetDataSet(iter, dataObj); }
87 
89 
92  void SetDataSet(unsigned int level, unsigned int id,
93  int LoCorner[3], int HiCorner[3], vtkUniformGrid* dataSet);
94 //BTX
95  // Description:
96  // Set the dataset pointer for a given node. This will resize the number of
97  // levels and the number of datasets in the level to fit level, id requested.
98  // The information carried by the vtkAMRBox is redundant with the extent
99  // of the vtkUniformGrid. However, in case of parallel computation, the
100  // vtkAMRBox is defined on each processor whereas the vtkUniformGrid is
101  // defined only on the processor that owns it.
102  void SetDataSet(unsigned int level, unsigned int id,
103  vtkAMRBox& box, vtkUniformGrid* dataSet);
105 
107 
110  vtkUniformGrid* GetDataSet(unsigned int level,
111  unsigned int id,
112  vtkAMRBox& box);
114 
116  vtkAMRBox GetAMRBox(vtkCompositeDataIterator* iter);
117 
118 //ETX
119 
121 
125  { return this->GetChildMetaData(level); }
127 
129 
130  int HasLevelMetaData(unsigned int level)
131  { return this->HasChildMetaData(level); }
133 
137  vtkInformation* GetMetaData(unsigned int level, unsigned int index);
138 
140  int HasMetaData(unsigned int level, unsigned int index);
141 
148  void SetRefinementRatio(unsigned int level, int refRatio);
149 
151  int GetRefinementRatio(unsigned int level);
152 
155  int GetRefinementRatio(vtkCompositeDataIterator* iter);
156 
158  void GenerateVisibilityArrays();
159 
160  static vtkInformationIntegerVectorKey* BOX();
161  static vtkInformationIntegerKey* BOX_DIMENSIONALITY();
162  static vtkInformationIntegerKey* REFINEMENT_RATIO();
163  static vtkInformationIdTypeKey* NUMBER_OF_BLANKED_POINTS();
164 
165  //BTX
167 
170  //ETX
172 
174  virtual void GetScalarRange(double range[]);
175 
177  virtual double *GetScalarRange();
178 
180 
182  { return this->Superclass::GetDataSet(iter); }
184 
186 
188  { return this->Superclass::GetMetaData(iter); }
190 
191 
193 
195  { return this->Superclass::HasMetaData(iter); }
197 
200  unsigned int GetFlatIndex(unsigned int level, unsigned int index);
201 
202 protected:
205 
208  virtual void ComputeScalarRange();
209 
210  // Cached scalar range
211  double ScalarRange[2];
212  // Time at which scalar range is computed
214 
215 private:
216  vtkHierarchicalBoxDataSet(const vtkHierarchicalBoxDataSet&); // Not implemented.
217  void operator=(const vtkHierarchicalBoxDataSet&); // Not implemented.
218 };
219 
220 #endif
221