59#ifndef vtkHyperTreeGrid_h 
   60#define vtkHyperTreeGrid_h 
   62#include "vtkCommonDataModelModule.h"  
   73VTK_ABI_NAMESPACE_BEGIN
 
  129  void SetModeSqueeze(const 
char* vtkNotUsed(vtksqueeze)){};
 
  131  char* GetModeSqueeze() { 
return nullptr; }
 
  134  virtual 
void Squeeze(){};
 
  172  void GetDimensions(
int dim[3]) const;
 
  173  void GetDimensions(
unsigned int dim[3]) const;
 
  183  void SetExtent(const 
int extent[6]);
 
  184  void SetExtent(
int x1, 
int x2, 
int y1, 
int y2, 
int z1, 
int z2);
 
  185  vtkGetVector6Macro(Extent, 
int);
 
  195  void GetCellDims(
int cellDims[3]) const;
 
  196  void GetCellDims(
unsigned int cellDims[3]) const;
 
  205  unsigned int GetDimension()
 const { 
return this->Dimension; }
 
  214    assert(
"pre: valid_dim" && this->GetDimension() == 1);
 
  215    axis = this->Axis[0];
 
  223  void Get2DAxes(
unsigned int& axis1, 
unsigned int& axis2)
 const 
  225    assert(
"pre: valid_dim" && this->GetDimension() == 2);
 
  226    axis1 = this->Axis[0];
 
  227    axis2 = this->Axis[1];
 
  235  const unsigned int* 
GetAxes()
 const { 
return this->Axis; }
 
  251  vtkSetMacro(TransposedRootIndexing, 
bool);
 
  252  vtkGetMacro(TransposedRootIndexing, 
bool);
 
  268  bool GetFreezeState() { 
return false; };
 
  352  vtkSetMacro(HasInterface, 
bool);
 
  353  vtkGetMacro(HasInterface, 
bool);
 
  354  vtkBooleanMacro(HasInterface, 
bool);
 
  361  vtkSetStringMacro(InterfaceNormalsName);
 
  362  vtkGetStringMacro(InterfaceNormalsName);
 
  369  vtkSetStringMacro(InterfaceInterceptsName);
 
  370  vtkGetStringMacro(InterfaceInterceptsName);
 
  377  vtkSetMacro(DepthLimiter, 
unsigned int);
 
  378  vtkGetMacro(DepthLimiter, 
unsigned int);
 
  415    bool create = 
false);
 
  427  unsigned int RecurseDichotomic(
 
  428    double value, 
vtkDoubleArray* coord, 
double tol, 
unsigned int ideb, 
unsigned int ifin) 
const;
 
  430  unsigned int FindDichotomic(
double value, 
vtkDataArray* coord, 
double tol) 
const;
 
  455    bool create = 
false);
 
  474    bool create = 
false);
 
  555  void CleanPureMask();
 
  654    vtkIdType, 
unsigned int&, 
unsigned int&, 
unsigned int&) 
const;
 
  726    std::map<vtkIdType, vtkSmartPointer<vtkHyperTree>>::iterator 
Iterator;
 
  759  void GetBounds(
double bounds[6]);
 
  767  virtual 
void GetGridBounds(
double bounds[6]);
 
  779  void GetCenter(
double center[3]);
 
  816  double Center[3]{ 0.0, 0.0, 0.0 }; 
 
  818  unsigned int BranchFactor = 0; 
 
  819  unsigned int Dimension = 0;    
 
  827  bool TreeGhostArrayCached = 
false;
 
  831  unsigned int Orientation = std::numeric_limits<unsigned int>::max(); 
 
  832  unsigned int Axis[2] = { std::numeric_limits<unsigned int>::max(),
 
  833    std::numeric_limits<unsigned int>::max() };
 
  838  unsigned int NumberOfChildren = 0;
 
  839  bool TransposedRootIndexing = 
false;
 
  845  unsigned int Dimensions[3] = { 0, 0, 0 }; 
 
  846  unsigned int CellDims[3] = { 0, 0, 0 };   
 
  849  int Extent[6] = { 0, -1, 0, -1, 0, -1 };
 
  851  bool WithCoordinates = 
false;
 
  860  bool HasInterface = 
false;
 
  861  char* InterfaceNormalsName = 
nullptr;
 
  862  char* InterfaceInterceptsName = 
nullptr;
 
  864  std::map<vtkIdType, vtkSmartPointer<vtkHyperTree>> 
HyperTrees;
 
  868  unsigned int DepthLimiter = std::numeric_limits<unsigned int>::max();
 
dynamic, self-adjusting array of bits
 
Fast, simple class for representing and operating on 3D bounds.
 
represent and manipulate cell attribute data
 
object represents upward pointers from points to list of cells using each point
 
create and manipulate ordered lists of objects
 
abstract superclass for arrays of numeric data
 
general representation of visualization data
 
represent and manipulate attribute data in a dataset
 
dynamic, self-adjusting array of double
 
Represents and manipulates a collection of data arrays.
 
Objects for traversal a HyperTreeGrid.
 
Objects for traversal a HyperTreeGrid.
 
Objects for traversal a HyperTreeGrid.
 
Objects for traversal a HyperTreeGrid.
 
Objects for traversal a HyperTreeGrid.
 
Specific Moore super cursor that can subdivied neighborhood.
 
Objects for traversal a HyperTreeGrid.
 
Objects for traversal a HyperTreeGrid.
 
Objects for traversal a HyperTreeGrid.
 
Objects for traversal a HyperTreeGrid.
 
An iterator object to iteratively access trees in the grid.
 
void Initialize(vtkHyperTreeGrid *grid)
Initialize the iterator on the tree set of the given grid.
 
vtkHyperTreeGridIterator()=default
 
std::map< vtkIdType, vtkSmartPointer< vtkHyperTree > >::iterator Iterator
 
vtkHyperTree * GetNextTree()
Get the next tree and set its index then increment the iterator.
 
vtkHyperTree * GetNextTree(vtkIdType &index)
Get the next tree and set its index then increment the iterator.
 
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
 
bool HasMask()
Determine whether blanking mask is empty or not.
 
vtkHyperTreeGridNonOrientedMooreSuperCursorLight * NewNonOrientedMooreSuperCursorLight(vtkIdType index, bool create=false)
Used to initialize a cursor of the given type.
 
vtkHyperTreeGridNonOrientedCursor * NewNonOrientedCursor(vtkIdType index, bool create=false)
Used to initialize a cursor of the given type.
 
void InitializeNonOrientedUnlimitedGeometryCursor(vtkHyperTreeGridNonOrientedUnlimitedGeometryCursor *cursor, vtkIdType index, bool create=false)
Used to initialize a cursor of the given type.
 
void SetMask(vtkBitArray *)
Set/Get the blanking mask of primal leaf cells.
 
virtual void CopyCoordinates(const vtkHyperTreeGrid *output)
Utility methods to set coordinates.
 
void InitializeNonOrientedVonNeumannSuperCursorLight(vtkHyperTreeGridNonOrientedVonNeumannSuperCursorLight *cursor, vtkIdType index, bool create=false)
Used to initialize a cursor of the given type.
 
virtual void GetLevelZeroOriginFromIndex(vtkIdType, double *)
Convert the global index of a root to its Spatial coordinates origin and size.
 
vtkHyperTreeGridNonOrientedVonNeumannSuperCursorLight * NewNonOrientedVonNeumannSuperCursorLight(vtkIdType index, bool create=false)
Used to initialize a cursor of the given type.
 
vtkHyperTreeGridOrientedCursor * NewOrientedCursor(vtkIdType index, bool create=false)
Used to initialize a cursor of the given type.
 
const unsigned int * GetDimensions() const
Get dimensions of this rectilinear grid dataset.
 
virtual vtkBitArray * GetMask()
Set/Get the blanking mask of primal leaf cells.
 
std::map< vtkIdType, vtkSmartPointer< vtkHyperTree > > HyperTrees
 
virtual void SetFixedCoordinates(unsigned int axis, double value)
Utility methods to set coordinates.
 
virtual void CopyEmptyStructure(vtkDataObject *)
Copy the internal structure with no data associated.
 
void DeepCopy(vtkDataObject *) override
Create deep copy of hyper tree grid.
 
void Get1DAxis(unsigned int &axis) const
Return the index of the valid dimension.
 
static vtkHyperTreeGrid * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
 
void GetIndexFromLevelZeroCoordinates(vtkIdType &, unsigned int, unsigned int, unsigned int) const
Convert the Cartesian coordinates of a root in the grid to its global index.
 
void InitializeOrientedGeometryCursor(vtkHyperTreeGridOrientedGeometryCursor *cursor, vtkIdType index, bool create=false)
Used to initialize a cursor of the given type.
 
virtual void CopyStructure(vtkDataObject *)
Copy the internal geometric and topological structure of a vtkHyperTreeGrid object.
 
const unsigned int * GetAxes() const
Get the axis information (used for CopyStructure)
 
unsigned int GetNumberOfLevels(vtkIdType)
Return the number of levels in an individual (primal) tree.
 
vtkSmartPointer< vtkDataArray > YCoordinates
 
virtual void SetYCoordinates(vtkDataArray *)
Set/Get the grid coordinates in the y-direction.
 
vtkIdType GetMaxNumberOfTrees() const
Return the maximum number of trees in the level 0 grid.
 
virtual void SetXCoordinates(vtkDataArray *)
Set/Get the grid coordinates in the x-direction.
 
virtual vtkDataArray * GetZCoordinates()
Set/Get the grid coordinates in the z-direction.
 
virtual unsigned int FindDichotomicY(double value, double tol=0.0) const
 
size_t RemoveTree(vtkIdType index)
Remove the tree at the given index.
 
virtual vtkHyperTree * GetTree(vtkIdType index, bool create=false)
Return tree located at given index of hyper tree grid NB: This will construct a new HyperTree if grid...
 
vtkHyperTreeGridNonOrientedGeometryCursor * FindNonOrientedGeometryCursor(double x[3])
Return a geometric cursor pointing to one of the nodes at position x
 
vtkUnsignedCharArray * GetTreeGhostArray()
Gets the array that defines the ghost type of each cell.
 
void Initialize() override
Restore data object to initial state.
 
unsigned int GetOrientation() const
Get the orientation of 1D or 2D grids:
 
void SetIndexingModeToKJI()
Specify whether indexing mode of grid root cells must be transposed to x-axis first,...
 
void SetTree(vtkIdType, vtkHyperTree *)
Assign given tree to given index of hyper tree grid NB: This will create a new slot in the grid if ne...
 
virtual void GetLevelZeroOriginAndSizeFromIndex(vtkIdType, double *, double *)
Convert the global index of a root to its Spatial coordinates origin and size.
 
int GetExtentType() VTK_FUTURE_CONST override
Structured extent.
 
void InitializeNonOrientedMooreSuperCursorLight(vtkHyperTreeGridNonOrientedMooreSuperCursorLight *cursor, vtkIdType index, bool create=false)
Used to initialize a cursor of the given type.
 
virtual unsigned int FindDichotomicX(double value, double tol=0.0) const
 
void SetDimensions(unsigned int i, unsigned int j, unsigned int k)
Set/Get sizes of this rectilinear grid dataset.
 
vtkUnsignedCharArray * AllocateTreeGhostArray()
Allocate ghost array for points.
 
vtkIdType GetNumberOfNonEmptyTrees()
Get the number of non empty trees in this grid.
 
virtual unsigned long GetActualMemorySizeBytes()
Return the actual size of the data in bytes.
 
vtkHyperTreeGridOrientedGeometryCursor * NewOrientedGeometryCursor(vtkIdType index, bool create=false)
Used to initialize a cursor of the given type.
 
void Get2DAxes(unsigned int &axis1, unsigned int &axis2) const
Return the indices of the two valid dimensions.
 
static vtkHyperTreeGrid * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
 
vtkHyperTreeGridNonOrientedGeometryCursor * NewNonOrientedGeometryCursor(vtkIdType index, bool create=false)
Used to initialize a cursor of the given type.
 
vtkIdType GetGlobalNodeIndexMax()
Return the maximum global index value.
 
int GetDataObjectType() VTK_FUTURE_CONST override
Return what type of dataset this is.
 
void InitializeOrientedCursor(vtkHyperTreeGridOrientedCursor *cursor, vtkIdType index, bool create=false)
Used to initialize a cursor of the given type.
 
void InitializeLocalIndexNode()
Initialize local indexes for every individual Hyper Tree after they have been refined.
 
vtkHyperTreeGridNonOrientedUnlimitedGeometryCursor * NewNonOrientedUnlimitedGeometryCursor(vtkIdType index, bool create=false)
Used to initialize a cursor of the given type.
 
virtual void ComputeBounds()
Compute the hyper tree grid bounding box ignoring masked cells.
 
unsigned long GetActualMemorySize() override
Return the actual size of the data in kibibytes (1024 bytes).
 
bool SupportsGhostArray(int type) override
Returns true if type is CELL, false otherwise.
 
vtkSmartPointer< vtkBitArray > Mask
 
void InitializeNonOrientedMooreSuperCursor(vtkHyperTreeGridNonOrientedMooreSuperCursor *cursor, vtkIdType index, bool create=false)
Used to initialize a cursor of the given type.
 
virtual vtkDataArray * GetYCoordinates()
Set/Get the grid coordinates in the y-direction.
 
vtkSmartPointer< vtkDataArray > XCoordinates
 
vtkHyperTreeGridNonOrientedUnlimitedMooreSuperCursor * NewNonOrientedUnlimitedMooreSuperCursor(vtkIdType index, bool create=false)
Used to initialize a cursor of the given type.
 
unsigned int GetNumberOfLevels()
Return the number of levels in the hyper tree grid.
 
void SetDimensions(const unsigned int dims[3])
Set/Get sizes of this rectilinear grid dataset.
 
virtual unsigned int FindDichotomicZ(double value, double tol=0.0) const
 
vtkIdType GetShiftedLevelZeroIndex(vtkIdType, int, int, int) const
Return the root index of a root cell with given index displaced.
 
void SetDimensions(int i, int j, int k)
Set/Get sizes of this rectilinear grid dataset.
 
unsigned int GetChildMask(unsigned int)
Return hard-coded bitcode correspondng to child mask Dimension 1: Factor 2: 0: 100,...
 
vtkUnsignedCharArray * GetGhostCells()
Gets the array that defines the ghost type of each cell.
 
virtual void SetZCoordinates(vtkDataArray *)
Set/Get the grid coordinates in the z-direction.
 
vtkHyperTreeGridNonOrientedVonNeumannSuperCursor * NewNonOrientedVonNeumannSuperCursor(vtkIdType index, bool create=false)
Used to initialize a cursor of the given type.
 
void SetIndexingModeToIJK()
Specify whether indexing mode of grid root cells must be transposed to x-axis first,...
 
vtkSmartPointer< vtkDataArray > ZCoordinates
 
vtkBitArray * GetPureMask()
Get or create pure material mask.
 
void InitializeTreeIterator(vtkHyperTreeGridIterator &it)
Initialize an iterator to browse level 0 trees.
 
bool HasAnyGhostCells() const
Returns true if a ghost cell array is defined.
 
void SetBranchFactor(unsigned int)
Set/Get the subdivision factor in the grid refinement scheme.
 
virtual vtkDataArray * GetXCoordinates()
Set/Get the grid coordinates in the x-direction.
 
void InitializeNonOrientedUnlimitedMooreSuperCursor(vtkHyperTreeGridNonOrientedUnlimitedMooreSuperCursor *cursor, vtkIdType index, bool create=false)
Used to initialize a cursor of the given type.
 
vtkIdType GetNumberOfLeaves()
Get the number of leaves in the primal tree grid.
 
void ShallowCopy(vtkDataObject *) override
Create shallow copy of hyper tree grid.
 
virtual double * GetBounds()
Return a pointer to the geometry bounding box in the form (xmin,xmax, ymin,ymax, zmin,...
 
unsigned int GetBranchFactor() const
Set/Get the subdivision factor in the grid refinement scheme.
 
vtkNew< vtkCellData > CellData
 
vtkHyperTreeGridNonOrientedMooreSuperCursor * NewNonOrientedMooreSuperCursor(vtkIdType index, bool create=false)
Used to initialize a cursor of the given type.
 
void InitializeNonOrientedGeometryCursor(vtkHyperTreeGridNonOrientedGeometryCursor *cursor, vtkIdType index, bool create=false)
Used to initialize a cursor of the given type.
 
void InitializeNonOrientedCursor(vtkHyperTreeGridNonOrientedCursor *cursor, vtkIdType index, bool create=false)
Used to initialize a cursor of the given type.
 
unsigned int GetNumberOfChildren() const
The number of children each node can have.
 
void InitializeNonOrientedVonNeumannSuperCursor(vtkHyperTreeGridNonOrientedVonNeumannSuperCursor *cursor, vtkIdType index, bool create=false)
Used to initialize a cursor of the given type.
 
void GetLevelZeroCoordinatesFromIndex(vtkIdType, unsigned int &, unsigned int &, unsigned int &) const
Convert the global index of a root to its Cartesian coordinates in the grid.
 
void SetDimensions(const int dims[3])
Set/Get sizes of this rectilinear grid dataset.
 
A data object structured as a tree.
 
dynamic, self-adjusting array of vtkIdType
 
a simple class to control print indentation
 
cell represents a 1D line
 
Allocate and hold a VTK object.
 
a cell that represents an orthogonal quadrilateral
 
represent and manipulate 3D points
 
Hold a reference to a vtkObjectBase instance.
 
record modification and/or execution time
 
dynamic, self-adjusting array of unsigned char
 
#define VTK_DEPRECATED_IN_9_6_0(reason)
 
#define VTK_SIZEHINT(...)