VTK
|
Encloses a rectangular region of voxel like cells. More...
#include <vtkAMRBox.h>
Public Member Functions | |
vtkAMRBox () | |
Construct the empty box. More... | |
vtkAMRBox (const vtkAMRBox &other) | |
Copy construct this box from another. More... | |
vtkAMRBox (int ilo, int jlo, int klo, int ihi, int jhi, int khi) | |
Construct a specific 3D box. More... | |
vtkAMRBox (const double *origin, const int *dimensions, const double *spacing, const double *globalOrigin, int gridDescription=VTK_XYZ_GRID) | |
Construct an AMR box from the description a vtkUniformGrid Note that the dimensions specify the node dimensions, rather than the cell dimensions. More... | |
vtkAMRBox (const int lo[3], const int hi[3]) | |
Construct a specific box. More... | |
vtkAMRBox (const int dims[6]) | |
vtkAMRBox & | operator= (const vtkAMRBox &other) |
Copy the other box to this box. More... | |
virtual | ~vtkAMRBox () |
bool | EmptyDimension (int i) const |
Whether dimension i is empty, e.g. More... | |
void | SetDimensions (int ilo, int jlo, int klo, int ihi, int jhi, int khi, int desc=VTK_XYZ_GRID) |
Set the dimensions of the box. More... | |
void | SetDimensions (const int lo[3], const int hi[3], int desc=VTK_XYZ_GRID) |
Set the dimensions of the box. More... | |
void | SetDimensions (const int dims[6], int desc=VTK_XYZ_GRID) |
Set the dimensions of the box. More... | |
void | GetDimensions (int lo[3], int hi[3]) const |
Get the dimensions of this box. More... | |
void | GetDimensions (int dims[6]) const |
Get the dimensions of this box. More... | |
int | ComputeDimension () const |
Determines the dimension of the AMR box given the box indices. More... | |
const int * | GetLoCorner () const |
Get the low corner index. More... | |
const int * | GetHiCorner () const |
void | GetValidHiCorner (int hi[3]) const |
Return a high corner. More... | |
bool | Empty () const |
bool | IsInvalid () const |
Check to see if the AMR box instance is invalid. More... | |
bool | operator== (const vtkAMRBox &other) const |
Test if this box is equal with the box instance on the rhs. More... | |
bool | operator!= (const vtkAMRBox &other) const |
Test if this box is NOT equal with the box instance on the rhs. More... | |
ostream & | Print (ostream &os) const |
Send the box to a stream. More... | |
void | Deserialize (unsigned char *buffer, const vtkIdType &bytesize) |
Deserializes this object instance from the given byte-stream. More... | |
bool | DoesBoxIntersectAlongDimension (const vtkAMRBox &other, const int q) const |
Checks if this instance of vtkAMRBox intersects with the box passed through the argument list along the given dimension q. More... | |
bool | DoesIntersect (const vtkAMRBox &other) const |
void | Coarsen (int r) |
Coarsen the box. More... | |
void | Refine (int r) |
Refine the box. More... | |
bool | Intersect (const vtkAMRBox &other) |
Intersect this box with another box in place. More... | |
bool | Contains (const vtkAMRBox &) const |
Test to see if a given box is inside this box. More... | |
void | GetGhostVector (int r, int nghost[6]) const |
Given an AMR box and the refinement ratio, r, this method computes the number of ghost layers in each of the 6 directions, i.e., [imin,imax,jmin,jmax,kmin,kmax]. More... | |
void | RemoveGhosts (int r) |
Given an AMR box and the refinement ratio, r, this shrinks the AMRBox. More... | |
void | Invalidate () |
Set the box to be invalid;. More... | |
vtkIdType | GetNumberOfCells () const |
Gets the number of cells enclosed by the box. More... | |
void | GetNumberOfCells (int num[3]) const |
Gets the number of cells enclosed by the box. More... | |
void | GetNumberOfNodes (int ext[3]) const |
Gets the number of nodes required to construct a physical representation of the box. More... | |
vtkIdType | GetNumberOfNodes () const |
Gets the number of nodes required to construct a physical representation of the box. More... | |
void | Serialize (unsigned char *&buffer, vtkIdType &bytesize) |
Serializes this object instance into a byte-stream. More... | |
void | Serialize (int *buffer) const |
Serializes this object instance into a byte-stream. More... | |
void | Grow (int byN) |
Grows the box in all directions. More... | |
void | Shrink (int byN) |
Grows the box in all directions. More... | |
void | Shift (int i, int j, int k) |
Shifts the box in index space. More... | |
void | Shift (const int I[3]) |
Shifts the box in index space. More... | |
bool | Contains (int i, int j, int k) const |
Test to see if a given cell index is inside this box. More... | |
bool | Contains (const int I[3]) const |
Test to see if a given cell index is inside this box. More... | |
Static Public Member Functions | |
static vtkIdType | GetBytesize () |
Returns the number of bytes allocated by this instance. More... | |
static int | GetCellLinearIndex (const vtkAMRBox &box, const int i, const int j, const int k, int imageDimension[3]) |
Returns the linear index of the given cell structured coordinates. More... | |
static void | GetBounds (const vtkAMRBox &box, const double origin[3], const double spacing[3], double bounds[6]) |
Get the bounds of this box. More... | |
static void | GetBoxOrigin (const vtkAMRBox &box, const double X0[3], const double spacing[3], double x0[3]) |
Get the world space origin of this box. More... | |
static bool | HasPoint (const vtkAMRBox &box, const double origin[3], const double spacing[3], double x, double y, double z) |
Checks if the point is inside this AMRBox instance. More... | |
static int | ComputeStructuredCoordinates (const vtkAMRBox &box, const double dataOrigin[3], const double h[3], const double x[3], int ijk[3], double pcoords[3]) |
Compute structured coordinates. More... | |
Protected Member Functions | |
void | Initialize () |
Initializes this box instance. More... | |
bool | IntersectBoxAlongDimension (const vtkAMRBox &other, const int q) |
Intersects this instance of vtkAMRbox with box passed through the argument list along the given dimension q. More... | |
Encloses a rectangular region of voxel like cells.
vtkAMRBox stores information for an AMR block
Definition at line 39 of file vtkAMRBox.h.
vtkAMRBox::vtkAMRBox | ( | ) |
Construct the empty box.
vtkAMRBox::vtkAMRBox | ( | const vtkAMRBox & | other | ) |
Copy construct this box from another.
Construct a specific 3D box.
vtkAMRBox::vtkAMRBox | ( | const double * | origin, |
const int * | dimensions, | ||
const double * | spacing, | ||
const double * | globalOrigin, | ||
int | gridDescription = VTK_XYZ_GRID |
||
) |
Construct an AMR box from the description a vtkUniformGrid Note that the dimensions specify the node dimensions, rather than the cell dimensions.
Construct a specific box.
(ilo,jlo,klo,)(ihi,jhi,khi)
vtkAMRBox::vtkAMRBox | ( | const int | dims[6] | ) |
|
inlinevirtual |
Definition at line 79 of file vtkAMRBox.h.
|
inline |
Set the box to be invalid;.
Definition at line 85 of file vtkAMRBox.h.
|
inline |
Whether dimension i is empty, e.g.
if the data set is type VTK_XY_PLANE
Definition at line 95 of file vtkAMRBox.h.
void vtkAMRBox::SetDimensions | ( | int | ilo, |
int | jlo, | ||
int | klo, | ||
int | ihi, | ||
int | jhi, | ||
int | khi, | ||
int | desc = VTK_XYZ_GRID |
||
) |
Set the dimensions of the box.
ilo,jlo,klo,ihi,jhi,khi
void vtkAMRBox::SetDimensions | ( | const int | lo[3], |
const int | hi[3], | ||
int | desc = VTK_XYZ_GRID |
||
) |
Set the dimensions of the box.
(ilo,jlo,klo),(ihi,jhi,khi)
void vtkAMRBox::SetDimensions | ( | const int | dims[6], |
int | desc = VTK_XYZ_GRID |
||
) |
Set the dimensions of the box.
(ilo,ihi,jlo,jhi,klo,khi)
Get the dimensions of this box.
(ilo,jlo,jhi),(ihi,jhi,khi)
void vtkAMRBox::GetDimensions | ( | int | dims[6] | ) | const |
Get the dimensions of this box.
(ilo,ihi, jlo,jhi, klo,khi)
vtkIdType vtkAMRBox::GetNumberOfCells | ( | ) | const |
Gets the number of cells enclosed by the box.
void vtkAMRBox::GetNumberOfCells | ( | int | num[3] | ) | const |
Gets the number of cells enclosed by the box.
void vtkAMRBox::GetNumberOfNodes | ( | int | ext[3] | ) | const |
Gets the number of nodes required to construct a physical representation of the box.
vtkIdType vtkAMRBox::GetNumberOfNodes | ( | ) | const |
Gets the number of nodes required to construct a physical representation of the box.
int vtkAMRBox::ComputeDimension | ( | ) | const |
Determines the dimension of the AMR box given the box indices.
Note, the AMR box can be on an arbitrary axis-aligned plane, i.e., XZ or YZ.
|
inline |
Get the low corner index.
Definition at line 151 of file vtkAMRBox.h.
|
inline |
Definition at line 152 of file vtkAMRBox.h.
void vtkAMRBox::GetValidHiCorner | ( | int | hi[3] | ) | const |
Return a high corner.
If dimension j is empty, then hi[j] is set from lo[j]. This is convenient For algorithm that must iterate over all cells
|
inline |
Definition at line 161 of file vtkAMRBox.h.
|
inline |
Check to see if the AMR box instance is invalid.
Definition at line 167 of file vtkAMRBox.h.
bool vtkAMRBox::operator== | ( | const vtkAMRBox & | other | ) | const |
Test if this box is equal with the box instance on the rhs.
Note: Two AMR boxes are equal if: (a) they have the same dimensionality (b) they are at the same level and (c) they occupy the same index space.
|
inline |
Test if this box is NOT equal with the box instance on the rhs.
Note: Two AMR boxes are equal if: (a) they have the same dimensionality (b) they are at the same level and (c) they occupy the same index space.
Definition at line 186 of file vtkAMRBox.h.
ostream& vtkAMRBox::Print | ( | ostream & | os | ) | const |
Send the box to a stream.
"(ilo,jlo,jhi),(ihi,jhi,khi)"
void vtkAMRBox::Serialize | ( | unsigned char *& | buffer, |
vtkIdType & | bytesize | ||
) |
Serializes this object instance into a byte-stream.
buffer – user-supplied pointer where the serialized object is stored. bytesize – number of bytes, i.e., the size of the buffer. NOTE: buffer is allocated internally by this method. Pre-conditions: buffer == NULL Post-conditions: buffer != NULL bytesize != 0
void vtkAMRBox::Serialize | ( | int * | buffer | ) | const |
Serializes this object instance into a byte-stream.
buffer – user-supplied pointer where the serialized object is stored. bytesize – number of bytes, i.e., the size of the buffer. NOTE: buffer is allocated internally by this method. Pre-conditions: buffer == NULL Post-conditions: buffer != NULL bytesize != 0
void vtkAMRBox::Deserialize | ( | unsigned char * | buffer, |
const vtkIdType & | bytesize | ||
) |
Deserializes this object instance from the given byte-stream.
Pre-conditions: buffer != NULL bytesize != 0
Checks if this instance of vtkAMRBox intersects with the box passed through the argument list along the given dimension q.
True is returned iff the box intersects successfully. Otherwise, there is no intersection along the given dimension and false is returned.
bool vtkAMRBox::DoesIntersect | ( | const vtkAMRBox & | other | ) | const |
void vtkAMRBox::Coarsen | ( | int | r | ) |
Coarsen the box.
void vtkAMRBox::Refine | ( | int | r | ) |
Refine the box.
void vtkAMRBox::Grow | ( | int | byN | ) |
Grows the box in all directions.
void vtkAMRBox::Shrink | ( | int | byN | ) |
Grows the box in all directions.
void vtkAMRBox::Shift | ( | const int | I[3] | ) |
Shifts the box in index space.
bool vtkAMRBox::Intersect | ( | const vtkAMRBox & | other | ) |
Intersect this box with another box in place.
Returns true if the boxes do intersect. Note that the box is modified to be the intersection or is made invalid.
Test to see if a given cell index is inside this box.
bool vtkAMRBox::Contains | ( | const int | I[3] | ) | const |
Test to see if a given cell index is inside this box.
Given an AMR box and the refinement ratio, r, this method computes the number of ghost layers in each of the 6 directions, i.e., [imin,imax,jmin,jmax,kmin,kmax].
void vtkAMRBox::RemoveGhosts | ( | int | r | ) |
Given an AMR box and the refinement ratio, r, this shrinks the AMRBox.
|
inlinestatic |
Returns the number of bytes allocated by this instance.
In addition, this number of bytes corresponds to the buffer size required to serialize any vtkAMRBox instance.
Definition at line 293 of file vtkAMRBox.h.
|
static |
Returns the linear index of the given cell structured coordinates.
|
static |
Get the bounds of this box.
|
static |
Get the world space origin of this box.
The origin is the location of the lower corner cell's lower corner node,
|
static |
Checks if the point is inside this AMRBox instance.
x,y,z the world point
|
static |
Compute structured coordinates.
|
protected |
Initializes this box instance.
Intersects this instance of vtkAMRbox with box passed through the argument list along the given dimension q.
True is returned iff the box intersects successfully. Otherwise, false is returned if there is no intersection at the given dimension.