VTK
vtkOverlappingAMR.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkOverlappingAMR.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=========================================================================*/
34#ifndef vtkOverlappingAMR_h
35#define vtkOverlappingAMR_h
36
37#include "vtkCommonDataModelModule.h" // For export macro
38#include "vtkUniformGridAMR.h"
39
40class vtkAMRBox;
42class vtkUniformGrid;
45
46class VTKCOMMONDATAMODEL_EXPORT vtkOverlappingAMR: public vtkUniformGridAMR
47{
48public:
50
54 int GetDataObjectType() VTK_OVERRIDE {return VTK_OVERLAPPING_AMR;}
55
57 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
58
63
65
68 void SetOrigin(const double*);
69 double* GetOrigin();
71
73
76 void SetSpacing(unsigned int level, const double spacing[3]);
77 void GetSpacing(unsigned int level, double spacing[3]);
79
81
84 void SetAMRBox(unsigned int level, unsigned int id, const vtkAMRBox& box) ;
85 const vtkAMRBox& GetAMRBox(unsigned int level, unsigned int id) ;
87
91 void GetBounds(unsigned int level, unsigned int id, double* bb);
92
93
97 void GetOrigin(unsigned int level, unsigned int id, double origin[3]);
98
99 static vtkInformationIdTypeKey* NUMBER_OF_BLANKED_POINTS();
100
105 { return vtkOverlappingAMR::SafeDownCast(Superclass::GetData(info)); }
107 { return vtkOverlappingAMR::SafeDownCast(Superclass::GetData(v, i)); }
108
117 void SetRefinementRatio(unsigned int level, int refRatio);
118
122 int GetRefinementRatio(unsigned int level);
123
125
129 void SetAMRBlockSourceIndex(unsigned int level, unsigned int id, int sourceId);
130 int GetAMRBlockSourceIndex(unsigned int level, unsigned int id);
132
137
142
148
154 unsigned int *GetParents(unsigned int level, unsigned int index, unsigned int& numParents);
155
161 unsigned int *GetChildren(unsigned int level, unsigned int index, unsigned int& numChildren);
162
166 void PrintParentChildInfo(unsigned int level, unsigned int index);
167
168 //Unhide superclass method
169 void GetBounds(double b[6]) { Superclass::GetBounds(b);}
170
174 bool FindGrid(double q[3], unsigned int& level, unsigned int& gridId);
175
180 { return Superclass::GetAMRInfo();}
182 { return Superclass::SetAMRInfo(info);}
183
185
190 void Audit();
191 protected:
193 ~vtkOverlappingAMR() VTK_OVERRIDE;
195
196private:
197 vtkOverlappingAMR(const vtkOverlappingAMR&) VTK_DELETE_FUNCTION;
198 void operator=(const vtkOverlappingAMR&) VTK_DELETE_FUNCTION;
199};
200
201#endif
Encloses a rectangular region of voxel like cells.
Definition: vtkAMRBox.h:40
Meta data that describes the structure of an AMR data set.
superclass for composite data iterators
a simple class to control print indentation
Definition: vtkIndent.h:40
Key for vtkIdType values in vtkInformation.
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
hierarchical dataset of vtkUniformGrids
static vtkOverlappingAMR * New()
static vtkOverlappingAMR * GetData(vtkInformationVector *v, int i=0)
int GetRefinementRatio(unsigned int level)
Returns the refinement of a given level.
~vtkOverlappingAMR() override
void SetAMRBlockSourceIndex(unsigned int level, unsigned int id, int sourceId)
Set/Get the source id of a block.
int GetRefinementRatio(vtkCompositeDataIterator *iter)
Returns the refinement ratio for the position pointed by the iterator.
vtkAMRInformation * GetAMRInfo() override
Get/Set the interal representation of amr meta meta data.
void GetBounds(double b[6])
bool HasChildrenInformation()
Return whether parent child information has been generated.
unsigned int * GetChildren(unsigned int level, unsigned int index, unsigned int &numChildren)
Return a pointer to Children of a block.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int GetAMRBlockSourceIndex(unsigned int level, unsigned int id)
bool FindGrid(double q[3], unsigned int &level, unsigned int &gridId)
Given a point q, find the highest level grid that contains it.
void SetAMRInfo(vtkAMRInformation *info) override
VTK_NEWINSTANCE vtkCompositeDataIterator * NewIterator() override
Return a new iterator (the iterator has to be deleted by the user).
int GetDataObjectType() override
Return class name of data type (see vtkType.h for definitions).
void SetRefinementRatio(unsigned int level, int refRatio)
Sets the refinement of a given level.
void Audit()
Check whether the data set is internally consistent, e.g.
static vtkOverlappingAMR * SafeDownCast(vtkObjectBase *o)
void PrintParentChildInfo(unsigned int level, unsigned int index)
Prints the parents and children of a requested block (Debug Routine)
void GenerateParentChildInformation()
Generate the parent/child relationships - needed to be called before GetParents or GetChildren can be...
unsigned int * GetParents(unsigned int level, unsigned int index, unsigned int &numParents)
Return a pointer to Parents of a block.
image data with blanking
@ info
Definition: vtkX3D.h:376
@ level
Definition: vtkX3D.h:395
@ spacing
Definition: vtkX3D.h:481
@ index
Definition: vtkX3D.h:246
#define VTK_OVERLAPPING_AMR
Definition: vtkType.h:118
#define VTK_NEWINSTANCE