VTK
vtkUniformGrid.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkUniformGrid.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 =========================================================================*/
28 #ifndef vtkUniformGrid_h
29 #define vtkUniformGrid_h
30 
31 #include "vtkCommonDataModelModule.h" // For export macro
32 #include "vtkImageData.h"
33 
34 class vtkEmptyCell;
35 class vtkStructuredVisibilityConstraint;
37 class vtkAMRBox;
38 
40 {
41 public:
43 
44  static vtkUniformGrid *New();
46  void PrintSelf(ostream& os, vtkIndent indent);
48 
51  virtual void CopyStructure(vtkDataSet *ds);
52 
54  virtual int GetDataObjectType() {return VTK_UNIFORM_GRID;};
55 
57 
58  virtual vtkCell *GetCell(vtkIdType cellId);
59  virtual void GetCell(vtkIdType cellId, vtkGenericCell *cell);
61  double x[3], vtkCell *cell, vtkIdType cellId, double tol2,
62  int& subId, double pcoords[3], double *weights);
64  double x[3], vtkCell *cell, vtkGenericCell *gencell,
65  vtkIdType cellId, double tol2, int& subId,
66  double pcoords[3], double *weights);
68  double x[3], vtkCell *cell, vtkIdType cellId,
69  double tol2, int& subId, double pcoords[3],
70  double *weights);
71  virtual int GetCellType(vtkIdType cellId);
72  virtual void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds)
74  this->GetDimensions());}
75  virtual void GetPointCells(vtkIdType ptId, vtkIdList *cellIds)
76  {vtkStructuredData::GetPointCells(ptId,cellIds,this->GetDimensions());}
77  virtual void Initialize();
78  virtual int GetMaxCellSize() {return 8;}; //voxel is the largest
80 
83 
84  // BTX
89  int Initialize(const vtkAMRBox *def, double* origin, double* spacing);
94  int Initialize(const vtkAMRBox *def, double* origin, double* spacing, int nGhosts);
95 
101  int Initialize(const vtkAMRBox *def, double* origin, double* spacing, const int nGhosts[3]);
103 
108  int Initialize(const vtkAMRBox *def, double* origin, double* spacing, int nGhostsI,int nGhostsJ,int nGhostsK);
109  //ETX
111 
113 
117  virtual void BlankPoint(vtkIdType ptId);
118  virtual void UnBlankPoint(vtkIdType ptId);
119  virtual void BlankPoint( const int i, const int j, const int k );
120  virtual void UnBlankPoint( const int i, const int j, const int k );
122 
124 
127  virtual void BlankCell(vtkIdType ptId);
128  virtual void UnBlankCell(vtkIdType ptId);
129  virtual void BlankCell( const int i, const int j, const int k );
130  virtual void UnBlankCell( const int i, const int j, const int k );
132 
135  virtual bool HasAnyBlankCells();
138  virtual bool HasAnyBlankPoints();
139 
142  virtual unsigned char IsPointVisible(vtkIdType ptId);
143 
146  virtual unsigned char IsCellVisible(vtkIdType cellId);
147 
149 
150  //BTX
152 
155  //ETX
157 
158 protected:
161 
163  void GetCellDims( int cellDims[3] );
164 
166  virtual void ComputeScalarRange();
167 
169 
170 private:
171  vtkUniformGrid(const vtkUniformGrid&); // Not implemented.
172  void operator=(const vtkUniformGrid&); // Not implemented.
173 
174  vtkEmptyCell *EmptyCell;
175 
176  static unsigned char MASKED_CELL_VALUE;
177 };
178 
179 
180 #endif
181 
182 
183 
vtkAMRBox
Encloses a rectangular region of voxel like cells.
Definition: vtkAMRBox.h:39
vtkImageData.h
vtkUniformGrid::GetCellType
virtual int GetCellType(vtkIdType cellId)
vtkUniformGrid::FindCell
virtual vtkIdType FindCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights)
vtkgl::weights
const GLbyte * weights
Definition: vtkgl.h:12766
vtkUniformGrid::Initialize
int Initialize(const vtkAMRBox *def, double *origin, double *spacing, int nGhostsI, int nGhostsJ, int nGhostsK)
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkCommonDataModelModule.h
vtkUniformGrid::UnBlankPoint
virtual void UnBlankPoint(vtkIdType ptId)
vtkUniformGrid::GetEmptyCell
vtkEmptyCell * GetEmptyCell()
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkEmptyCell
an empty cell used as a place-holder during processing
Definition: vtkEmptyCell.h:32
vtkUniformGrid::FindAndGetCell
virtual vtkCell * FindAndGetCell(double x[3], vtkCell *cell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights)
vtkUniformGrid::IsCellVisible
virtual unsigned char IsCellVisible(vtkIdType cellId)
vtkUniformGrid::ComputeScalarRange
virtual void ComputeScalarRange()
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:49
vtkUniformGrid::UnBlankPoint
virtual void UnBlankPoint(const int i, const int j, const int k)
vtkUniformGrid
image data with blanking
Definition: vtkUniformGrid.h:40
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkUniformGrid::GetMaxCellSize
virtual int GetMaxCellSize()
Definition: vtkUniformGrid.h:78
vtkUniformGrid::GetData
static vtkUniformGrid * GetData(vtkInformationVector *v, int i=0)
vtkgl::v
const GLdouble * v
Definition: vtkgl.h:11595
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
VTK_UNIFORM_GRID
#define VTK_UNIFORM_GRID
Definition: vtkType.h:76
vtkUniformGrid::NewImageDataCopy
virtual vtkImageData * NewImageDataCopy()
vtkUniformGrid::GetCell
virtual vtkCell * GetCell(vtkIdType cellId)
vtkImageData::GetDimensions
virtual int * GetDimensions()
vtkUniformGrid::GetData
static vtkUniformGrid * GetData(vtkInformation *info)
vtkUniformGrid::vtkUniformGrid
vtkUniformGrid()
vtkUniformGrid::HasAnyBlankCells
virtual bool HasAnyBlankCells()
vtkStructuredData::GetCellPoints
static void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds, int dataDescription, int dim[3])
vtkUniformGrid::FindCell
virtual vtkIdType FindCell(double x[3], vtkCell *cell, vtkGenericCell *gencell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights)
vtkUniformGrid::GetPointCells
virtual void GetPointCells(vtkIdType ptId, vtkIdList *cellIds)
Definition: vtkUniformGrid.h:75
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:62
vtkUniformGrid::Initialize
int Initialize(const vtkAMRBox *def, double *origin, double *spacing, const int nGhosts[3])
vtkUniformGrid::CopyStructure
virtual void CopyStructure(vtkDataSet *ds)
vtkStructuredData::GetPointCells
static void GetPointCells(vtkIdType ptId, vtkIdList *cellIds, int dim[3])
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkUniformGrid::~vtkUniformGrid
~vtkUniformGrid()
vtkUniformGrid::BlankPoint
virtual void BlankPoint(vtkIdType ptId)
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
vtkUniformGrid::New
static vtkUniformGrid * New()
vtkUniformGrid::Initialize
virtual void Initialize()
vtkUniformGrid::BlankCell
virtual void BlankCell(vtkIdType ptId)
vtkImageData::vtkUniformGrid
friend class vtkUniformGrid
Definition: vtkImageData.h:419
vtkUniformGrid::IsPointVisible
virtual unsigned char IsPointVisible(vtkIdType ptId)
vtkX3D::spacing
@ spacing
Definition: vtkX3D.h:481
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkUniformGrid::Initialize
int Initialize(const vtkAMRBox *def, double *origin, double *spacing, int nGhosts)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkUniformGrid::GetCellDims
void GetCellDims(int cellDims[3])
vtkUniformGrid::BlankPoint
virtual void BlankPoint(const int i, const int j, const int k)
vtkImageData::GetDataDescription
int GetDataDescription()
Definition: vtkImageData.h:412
vtkUniformGrid::GetDataObjectType
virtual int GetDataObjectType()
Definition: vtkUniformGrid.h:54
vtkGenericCell
provides thread-safe access to cells
Definition: vtkGenericCell.h:42
vtkUniformGrid::UnBlankCell
virtual void UnBlankCell(vtkIdType ptId)
vtkUniformGrid::UnBlankCell
virtual void UnBlankCell(const int i, const int j, const int k)
vtkUniformGrid::GetGridDescription
int GetGridDescription()
VTKCOMMONDATAMODEL_EXPORT
#define VTKCOMMONDATAMODEL_EXPORT
Definition: vtkCommonDataModelModule.h:15
vtkUniformGrid::BlankCell
virtual void BlankCell(const int i, const int j, const int k)
vtkUniformGrid::HasAnyBlankPoints
virtual bool HasAnyBlankPoints()
vtkUniformGrid::GetCellPoints
virtual void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds)
Definition: vtkUniformGrid.h:72
vtkUniformGrid::GetCell
virtual void GetCell(vtkIdType cellId, vtkGenericCell *cell)
vtkUniformGrid::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkUniformGrid::Initialize
int Initialize(const vtkAMRBox *def, double *origin, double *spacing)