/usr/include/vtk-6.2/vtkMaskFields.h is in libvtk6-dev 6.2.0+dfsg1-10build1.
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 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkMaskFields.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 vtkMaskFields - Allow control of which fields get passed
// to the output
// .SECTION Description
// vtkMaskFields is used to mark which fields in the input dataset
// get copied to the output. The output will contain only those fields
// marked as on by the filter.
// .SECTION See Also
// vtkFieldData vtkDataSet vtkDataObjectToDataSetFilter
// vtkDataSetAttributes vtkDataArray vtkRearrangeFields
// vtkSplitField vtkMergeFields vtkAssignAttribute
#ifndef vtkMaskFields_h
#define vtkMaskFields_h
#include "vtkFiltersCoreModule.h" // For export macro
#include "vtkDataSetAlgorithm.h"
#include "vtkDataSetAttributes.h" // Needed for NUM_ATTRIBUTES
class vtkDataSet;
class VTKFILTERSCORE_EXPORT vtkMaskFields : public vtkDataSetAlgorithm
{
public:
vtkTypeMacro(vtkMaskFields,vtkDataSetAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Create a new vtkMaskFields.
static vtkMaskFields *New();
// Description:
// Turn on/off the copying of the field or specified by name.
// During the copying/passing, the following rules are followed for each
// array:
// 1. If the copy flag for an array is set (on or off), it is applied
// This overrides rule 2.
// 2. If CopyAllOn is set, copy the array.
// If CopyAllOff is set, do not copy the array
// A field name and a location must be specified. For example:
// @verbatim
// maskFields->CopyFieldOff(vtkMaskFields::CELL_DATA, "foo");
// @endverbatim
// causes the field "foo" on the input cell data to not get copied
// to the output.
void CopyFieldOn(int fieldLocation, const char* name) { this->CopyFieldOnOff(fieldLocation, name, 1); }
void CopyFieldOff(int fieldLocation, const char* name) { this->CopyFieldOnOff(fieldLocation, name, 0); }
// Description:
// Turn on/off the copying of the attribute or specified by vtkDataSetAttributes:AttributeTypes.
// During the copying/passing, the following rules are followed for each
// array:
// 1. If the copy flag for an array is set (on or off), it is applied
// This overrides rule 2.
// 2. If CopyAllOn is set, copy the array.
// If CopyAllOff is set, do not copy the array
// An attribute type and a location must be specified. For example:
// @verbatim
// maskFields->CopyAttributeOff(vtkMaskFields::POINT_DATA, vtkDataSetAttributes::SCALARS);
// @endverbatim
// causes the scalars on the input point data to not get copied
// to the output.
void CopyAttributeOn(int attributeLocation, int attributeType) { this->CopyAttributeOnOff(attributeLocation, attributeType, 1); }
void CopyAttributeOff(int attributeLocation, int attributeType) { this->CopyAttributeOnOff(attributeLocation, attributeType, 0); }
// Description:
// Convenience methods which operate on all field data or
// attribute data. More specific than CopyAllOn or CopyAllOff
void CopyFieldsOff() { this->CopyFields = 0; }
void CopyAttributesOff() { this->CopyAttributes = 0; }
void CopyFieldsOn() { this->CopyFields = 1; }
void CopyAttributesOn() { this->CopyAttributes = 1; }
// Description:
// Helper methods used by other language bindings. Allows the caller to
// specify arguments as strings instead of enums.
void CopyAttributeOn(const char* attributeLoc,
const char* attributeType);
void CopyAttributeOff(const char* attributeLoc,
const char* attributeType);
void CopyFieldOn(const char* fieldLoc,
const char* name);
void CopyFieldOff(const char* fieldLoc,
const char* name);
// Description:
// Turn on copying of all data.
// During the copying/passing, the following rules are followed for each
// array:
// 1. If the copy flag for an array is set (on or off), it is applied
// This overrides rule 2.
// 2. If CopyAllOn is set, copy the array.
// If CopyAllOff is set, do not copy the array
virtual void CopyAllOn();
// Description:
// Turn off copying of all data.
// During the copying/passing, the following rules are followed for each
// array:
// 1. If the copy flag for an array is set (on or off), it is applied
// This overrides rule 2.
// 2. If CopyAllOn is set, copy the array.
// If CopyAllOff is set, do not copy the array
virtual void CopyAllOff();
//BTX
enum FieldLocation
{
OBJECT_DATA=0,
POINT_DATA=1,
CELL_DATA=2
};
//ETX
protected:
vtkMaskFields();
virtual ~vtkMaskFields();
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
//BTX
struct CopyFieldFlag
{
char* Name;
int Type;
int Location;
int IsCopied;
};
//ETX
CopyFieldFlag* CopyFieldFlags; // the names of fields not to be copied
int NumberOfFieldFlags; // the number of fields not to be copied
void CopyFieldOnOff(int fieldLocation, const char* name, int onOff);
void CopyAttributeOnOff(int attributeLocation, int attributeType, int onOff);
void ClearFieldFlags();
int FindFlag(const char* field, int location);
int FindFlag(int arrayType, int location);
int GetFlag(const char* field, int location);
int GetFlag(int arrayType, int location);
int GetAttributeLocation(const char* loc);
int GetAttributeType(const char* type);
int CopyFields;
int CopyAttributes;
static char FieldLocationNames[3][12];
static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][10];
private:
vtkMaskFields(const vtkMaskFields&); // Not implemented.
void operator=(const vtkMaskFields&); // Not implemented.
};
#endif
|