/usr/include/vtk-6.3/vtkAMRCutPlane.h is in libvtk6-dev 6.3.0+dfsg1-5.
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 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkAMRCutPlane.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.
=========================================================================*/
// .NAME vtkAMRCutPlane.h -- Cuts an AMR dataset
//
// .SECTION Description
// A concrete instance of vtkMultiBlockDataSet that provides functionality for
// cutting an AMR dataset (an instance of vtkOverlappingAMR) with user supplied
// implicit plane function defined by a normal and center.
#ifndef VTKAMRCUTPLANE_H_
#define VTKAMRCUTPLANE_H_
#include "vtkFiltersAMRModule.h" // For export macro
#include "vtkMultiBlockDataSetAlgorithm.h"
#include <vector> // For STL vector
#include <map> // For STL map
class vtkMultiBlockDataSet;
class vtkOverlappingAMR;
class vtkMultiProcessController;
class vtkInformation;
class vtkInformationVector;
class vtkIndent;
class vtkPlane;
class vtkUniformGrid;
class vtkCell;
class vtkPoints;
class vtkCellArray;
class vtkPointData;
class vtkCellData;
class VTKFILTERSAMR_EXPORT vtkAMRCutPlane : public vtkMultiBlockDataSetAlgorithm
{
public:
static vtkAMRCutPlane *New();
vtkTypeMacro(vtkAMRCutPlane, vtkMultiBlockDataSetAlgorithm);
void PrintSelf(ostream &oss, vtkIndent indent );
// Description:
// Sets the center
vtkSetVector3Macro(Center, double);
// Description:
// Sets the normal
vtkSetVector3Macro(Normal, double);
// Description:
// Sets the level of resolution
vtkSetMacro(LevelOfResolution, int);
vtkGetMacro(LevelOfResolution, int);
// Description:
//
vtkSetMacro(UseNativeCutter, bool);
vtkGetMacro(UseNativeCutter, bool);
vtkBooleanMacro(UseNativeCutter, bool);
// Description:
// Set/Get a multiprocess controller for parallel processing.
// By default this parameter is set to NULL by the constructor.
vtkSetMacro(Controller, vtkMultiProcessController*);
vtkGetMacro(Controller, vtkMultiProcessController*);
// Standard pipeline routines
virtual int RequestData(
vtkInformation*,vtkInformationVector**,vtkInformationVector*);
virtual int FillInputPortInformation(int port, vtkInformation *info);
virtual int FillOutputPortInformation(int port, vtkInformation *info);
// Description:
// Gets the metadata from upstream module and determines which blocks
// should be loaded by this instance.
virtual int RequestInformation(
vtkInformation *rqst,
vtkInformationVector **inputVector,
vtkInformationVector *outputVector );
// Description:
// Performs upstream requests to the reader
virtual int RequestUpdateExtent(
vtkInformation*, vtkInformationVector**, vtkInformationVector* );
protected:
vtkAMRCutPlane();
virtual ~vtkAMRCutPlane();
// Description:
// Returns the cut-plane defined by a vtkCutPlane instance based on the
// user-supplied center and normal.
vtkPlane* GetCutPlane( vtkOverlappingAMR *metadata );
// Description:
// Extracts cell
void ExtractCellFromGrid(
vtkUniformGrid *grid, vtkCell* cell,
std::map<vtkIdType,vtkIdType>& gridPntMapping,
vtkPoints *nodes,
vtkCellArray *cells );
// Description:
// Given the grid and a subset ID pair, grid IDs mapping to the extracted
// grid IDs, extract the point data.
void ExtractPointDataFromGrid(
vtkUniformGrid *grid,
std::map<vtkIdType,vtkIdType>& gridPntMapping,
vtkIdType NumNodes,
vtkPointData *PD );
// Description:
// Given the grid and the list of cells that are extracted, extract the
// corresponding cell data.
void ExtractCellDataFromGrid(
vtkUniformGrid *grid,
std::vector<vtkIdType>& cellIdxList,
vtkCellData *CD);
// Description:
// Given a cut-plane, p, and the metadata, m, this method computes which
// blocks need to be loaded. The corresponding block IDs are stored in
// the internal STL vector, blocksToLoad, which is then propagated upstream
// in the RequestUpdateExtent.
void ComputeAMRBlocksToLoad( vtkPlane* p, vtkOverlappingAMR* m);
// Descriription:
// Initializes the cut-plane center given the min/max bounds.
void InitializeCenter( double min[3], double max[3] );
// Description:
// Determines if a plane intersects with an AMR box
bool PlaneIntersectsAMRBox( vtkPlane* pl, double bounds[6] );
bool PlaneIntersectsAMRBox( double plane[4], double bounds[6] );
// Description:
// Determines if a plane intersects with a grid cell
bool PlaneIntersectsCell( vtkPlane *pl, vtkCell *cell );
// Description:
// A utility function that checks if the input AMR data is 2-D.
bool IsAMRData2D( vtkOverlappingAMR *input );
// Description:
// Applies cutting to an AMR block
void CutAMRBlock(
vtkPlane *cutPlane,
unsigned int blockIdx,
vtkUniformGrid *grid, vtkMultiBlockDataSet *dataSet );
int LevelOfResolution;
double Center[3];
double Normal[3];
bool initialRequest;
bool UseNativeCutter;
vtkMultiProcessController *Controller;
// BTX
std::vector<int> BlocksToLoad;
// ETX
private:
vtkAMRCutPlane(const vtkAMRCutPlane& ); // Not implemented
void operator=(const vtkAMRCutPlane& ); // Not implemented
};
#endif /* VTKAMRCUTPLANE_H_ */
|