/usr/include/vtk-7.1/vtkUniformGrid.h is in libvtk7-dev 7.1.1+dfsg1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkUniformGrid.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkUniformGrid
* @brief image data with blanking
*
* vtkUniformGrid is a subclass of vtkImageData. In addition to all
* the image data functionality, it supports blanking.
*/
#ifndef vtkUniformGrid_h
#define vtkUniformGrid_h
#include "vtkCommonDataModelModule.h" // For export macro
#include "vtkImageData.h"
class vtkEmptyCell;
class vtkStructuredVisibilityConstraint;
class vtkUnsignedCharArray;
class vtkAMRBox;
class VTKCOMMONDATAMODEL_EXPORT vtkUniformGrid : public vtkImageData
{
public:
//@{
/**
* Construct an empty uniform grid.
*/
static vtkUniformGrid *New();
vtkTypeMacro(vtkUniformGrid,vtkImageData);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
//@}
/**
* Copy the geometric and topological structure of an input image data
* object.
*/
void CopyStructure(vtkDataSet *ds) VTK_OVERRIDE;
/**
* Return what type of dataset this is.
*/
int GetDataObjectType() VTK_OVERRIDE {return VTK_UNIFORM_GRID;};
//@{
/**
* Standard vtkDataSet API methods. See vtkDataSet for more information.
*/
vtkCell *GetCell(vtkIdType cellId) VTK_OVERRIDE;
void GetCell(vtkIdType cellId, vtkGenericCell *cell) VTK_OVERRIDE;
vtkIdType FindCell(
double x[3], vtkCell *cell, vtkIdType cellId, double tol2,
int& subId, double pcoords[3], double *weights) VTK_OVERRIDE;
vtkIdType FindCell(
double x[3], vtkCell *cell, vtkGenericCell *gencell,
vtkIdType cellId, double tol2, int& subId,
double pcoords[3], double *weights) VTK_OVERRIDE;
vtkCell *FindAndGetCell(
double x[3], vtkCell *cell, vtkIdType cellId,
double tol2, int& subId, double pcoords[3],
double *weights) VTK_OVERRIDE;
int GetCellType(vtkIdType cellId) VTK_OVERRIDE;
void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds) VTK_OVERRIDE
{vtkStructuredData::GetCellPoints(cellId,ptIds,this->GetDataDescription(),
this->GetDimensions());}
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) VTK_OVERRIDE
{vtkStructuredData::GetPointCells(ptId,cellIds,this->GetDimensions());}
void Initialize() VTK_OVERRIDE;
int GetMaxCellSize() VTK_OVERRIDE {return 8;}; //voxel is the largest
//@}
/**
* Returns the data description of this uniform grid instance.
*/
int GetGridDescription();
/**
* Initialize with no ghost cell arrays, from the definition in
* the given box. The box is expetced to be 3D, if you have 2D
* data the set the third dimensions 0. eg. (X,X,0)(X,X,0)
* Returns 0 if the initialization failed.
*/
int Initialize(const vtkAMRBox *def, double* origin, double* spacing);
/**
* Initialize from the definition in the given box, with ghost cell
* arrays nGhosts cells thick in all directions. The box is expetced
* to be 3D, if you have 2D data the set the third dimensions 0.
* eg. (X,X,0)(X,X,0)
* Returns 0 if the initialization failed.
*/
int Initialize(const vtkAMRBox *def, double* origin, double* spacing, int nGhosts);
/**
* Initialize from the definition in the given box, with ghost cell
* arrays of the thickness given in each direction by "nGhosts" array.
* The box and ghost array are expected to be 3D, if you have 2D data
* the set the third dimensions 0. eg. (X,X,0)(X,X,0)
* Returns 0 if the initialization failed.
*/
int Initialize(const vtkAMRBox *def, double* origin, double* spacing, const int nGhosts[3]);
/**
* Construct a uniform grid, from the definition in the given box
* "def", with ghost cell arrays of the thickness given in each
* direction by "nGhosts*". The box and ghost array are expected
* to be 3D, if you have 2D data the set the third dimensions 0. eg.
* (X,X,0)(X,X,0)
* Returns 0 if the initialization failed.
*/
int Initialize(const vtkAMRBox *def, double* origin, double* spacing, int nGhostsI,int nGhostsJ,int nGhostsK);
//@{
/**
* Methods for supporting blanking of cells. Blanking turns on or off
* points in the structured grid, and hence the cells connected to them.
* These methods should be called only after the dimensions of the
* grid are set.
*/
virtual void BlankPoint(vtkIdType ptId);
virtual void UnBlankPoint(vtkIdType ptId);
virtual void BlankPoint( const int i, const int j, const int k );
virtual void UnBlankPoint( const int i, const int j, const int k );
//@}
//@{
/**
* Methods for supporting blanking of cells. Blanking turns on or off
* cells in the structured grid.
* These methods should be called only after the dimensions of the
* grid are set.
*/
virtual void BlankCell(vtkIdType ptId);
virtual void UnBlankCell(vtkIdType ptId);
virtual void BlankCell( const int i, const int j, const int k );
virtual void UnBlankCell( const int i, const int j, const int k );
//@}
/**
* Returns 1 if there is any visibility constraint on the cells,
* 0 otherwise.
*/
bool HasAnyBlankCells() VTK_OVERRIDE;
/**
* Returns 1 if there is any visibility constraint on the points,
* 0 otherwise.
*/
bool HasAnyBlankPoints() VTK_OVERRIDE;
/**
* Return non-zero value if specified point is visible.
* These methods should be called only after the dimensions of the
* grid are set.
*/
virtual unsigned char IsPointVisible(vtkIdType ptId);
/**
* Return non-zero value if specified cell is visible.
* These methods should be called only after the dimensions of the
* grid are set.
*/
virtual unsigned char IsCellVisible(vtkIdType cellId);
virtual vtkImageData* NewImageDataCopy();
//@{
/**
* Retrieve an instance of this class from an information object.
*/
static vtkUniformGrid* GetData(vtkInformation* info);
static vtkUniformGrid* GetData(vtkInformationVector* v, int i=0);
//@}
protected:
vtkUniformGrid();
~vtkUniformGrid() VTK_OVERRIDE;
/**
* Returns the cell dimensions for this vtkUniformGrid instance.
*/
void GetCellDims( int cellDims[3] );
/**
* Override this method because of blanking.
*/
void ComputeScalarRange() VTK_OVERRIDE;
vtkEmptyCell* GetEmptyCell();
private:
vtkUniformGrid(const vtkUniformGrid&) VTK_DELETE_FUNCTION;
void operator=(const vtkUniformGrid&) VTK_DELETE_FUNCTION;
vtkEmptyCell *EmptyCell;
static unsigned char MASKED_CELL_VALUE;
};
#endif
|