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
96 
97 
103  void SetDataSet(unsigned int level, unsigned int id,
104  vtkAMRBox& box, vtkUniformGrid* dataSet);
106 
108 
111  vtkUniformGrid* GetDataSet(unsigned int level,
112  unsigned int id,
113  vtkAMRBox& box);
115 
117  vtkAMRBox GetAMRBox(vtkCompositeDataIterator* iter);
118 
119 //ETX
120 
122 
125  vtkInformation* GetLevelMetaData(unsigned int level)
126  { return this->GetChildMetaData(level); }
128 
130 
131  int HasLevelMetaData(unsigned int level)
132  { return this->HasChildMetaData(level); }
134 
138  vtkInformation* GetMetaData(unsigned int level, unsigned int index);
139 
141  int HasMetaData(unsigned int level, unsigned int index);
142 
149  void SetRefinementRatio(unsigned int level, int refRatio);
150 
152  int GetRefinementRatio(unsigned int level);
153 
156  int GetRefinementRatio(vtkCompositeDataIterator* iter);
157 
159  void GenerateVisibilityArrays();
160 
161  static vtkInformationIntegerVectorKey* BOX();
162  static vtkInformationIntegerKey* BOX_DIMENSIONALITY();
163  static vtkInformationIntegerKey* REFINEMENT_RATIO();
164  static vtkInformationIdTypeKey* NUMBER_OF_BLANKED_POINTS();
165 
166  //BTX
168 
171  //ETX
173 
175  virtual void GetScalarRange(double range[]);
176 
178  virtual double *GetScalarRange();
179 
181 
183  { return this->Superclass::GetDataSet(iter); }
185 
187 
189  { return this->Superclass::GetMetaData(iter); }
191 
192 
194 
196  { return this->Superclass::HasMetaData(iter); }
198 
201  unsigned int GetFlatIndex(unsigned int level, unsigned int index);
202 
203 protected:
206 
209  virtual void ComputeScalarRange();
210 
211  // Cached scalar range
212  double ScalarRange[2];
213  // Time at which scalar range is computed
215 
216 private:
217  vtkHierarchicalBoxDataSet(const vtkHierarchicalBoxDataSet&); // Not implemented.
218  void operator=(const vtkHierarchicalBoxDataSet&); // Not implemented.
219 };
220 
221 #endif
222