VTK  9.1.0
vtkMaskFields.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkMaskFields.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=========================================================================*/
39#ifndef vtkMaskFields_h
40#define vtkMaskFields_h
41
42#include "vtkDataSetAlgorithm.h"
43#include "vtkFiltersCoreModule.h" // For export macro
44
45#include "vtkDataSetAttributes.h" // Needed for NUM_ATTRIBUTES
46
47class vtkDataSet;
48
49class VTKFILTERSCORE_EXPORT vtkMaskFields : public vtkDataSetAlgorithm
50{
51public:
53 void PrintSelf(ostream& os, vtkIndent indent) override;
54
58 static vtkMaskFields* New();
59
75 void CopyFieldOn(int fieldLocation, const char* name)
76 {
77 this->CopyFieldOnOff(fieldLocation, name, 1);
78 }
79 void CopyFieldOff(int fieldLocation, const char* name)
80 {
81 this->CopyFieldOnOff(fieldLocation, name, 0);
82 }
83
99 void CopyAttributeOn(int attributeLocation, int attributeType)
100 {
101 this->CopyAttributeOnOff(attributeLocation, attributeType, 1);
102 }
103 void CopyAttributeOff(int attributeLocation, int attributeType)
104 {
105 this->CopyAttributeOnOff(attributeLocation, attributeType, 0);
106 }
107
112 void CopyFieldsOff() { this->CopyFields = 0; }
113 void CopyAttributesOff() { this->CopyAttributes = 0; }
114
115 void CopyFieldsOn() { this->CopyFields = 1; }
116 void CopyAttributesOn() { this->CopyAttributes = 1; }
117
119
123 void CopyAttributeOn(const char* attributeLoc, const char* attributeType);
124 void CopyAttributeOff(const char* attributeLoc, const char* attributeType);
125 void CopyFieldOn(const char* fieldLoc, const char* name);
126 void CopyFieldOff(const char* fieldLoc, const char* name);
128
138 virtual void CopyAllOn();
139
149 virtual void CopyAllOff();
150
152 {
153 OBJECT_DATA = 0,
154 POINT_DATA = 1,
155 CELL_DATA = 2
156 };
157
158protected:
160 ~vtkMaskFields() override;
161
163
165 {
166 char* Name;
167 int Type;
170 };
171
172 CopyFieldFlag* CopyFieldFlags; // the names of fields not to be copied
173 int NumberOfFieldFlags; // the number of fields not to be copied
174 void CopyFieldOnOff(int fieldLocation, const char* name, int onOff);
175 void CopyAttributeOnOff(int attributeLocation, int attributeType, int onOff);
177 int FindFlag(const char* field, int location);
178 int FindFlag(int arrayType, int location);
179 int GetFlag(const char* field, int location);
180 int GetFlag(int arrayType, int location);
181 int GetAttributeLocation(const char* loc);
182 int GetAttributeType(const char* type);
183
186
187 static char FieldLocationNames[3][12];
188 static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][10];
189
190private:
191 vtkMaskFields(const vtkMaskFields&) = delete;
192 void operator=(const vtkMaskFields&) = delete;
193};
194
195#endif
Superclass for algorithms that produce output of the same type as input.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:66
a simple class to control print indentation
Definition: vtkIndent.h:43
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Allow control of which fields get passed to the output.
Definition: vtkMaskFields.h:50
virtual void CopyAllOff()
Turn off copying of all data.
~vtkMaskFields() override
void CopyFieldOff(int fieldLocation, const char *name)
Definition: vtkMaskFields.h:79
void CopyFieldsOn()
int GetAttributeType(const char *type)
void CopyFieldOff(const char *fieldLoc, const char *name)
Helper methods used by other language bindings.
void CopyAttributeOff(int attributeLocation, int attributeType)
int GetFlag(int arrayType, int location)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void CopyAttributesOn()
virtual void CopyAllOn()
Turn on copying of all data.
void CopyAttributeOn(int attributeLocation, int attributeType)
Turn on/off the copying of the attribute or specified by vtkDataSetAttributes:AttributeTypes.
Definition: vtkMaskFields.h:99
void CopyAttributeOff(const char *attributeLoc, const char *attributeType)
Helper methods used by other language bindings.
void ClearFieldFlags()
int GetFlag(const char *field, int location)
void CopyFieldOnOff(int fieldLocation, const char *name, int onOff)
void CopyAttributeOn(const char *attributeLoc, const char *attributeType)
Helper methods used by other language bindings.
void CopyAttributeOnOff(int attributeLocation, int attributeType, int onOff)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
CopyFieldFlag * CopyFieldFlags
int GetAttributeLocation(const char *loc)
void CopyFieldOn(const char *fieldLoc, const char *name)
Helper methods used by other language bindings.
void CopyFieldsOff()
Convenience methods which operate on all field data or attribute data.
int FindFlag(int arrayType, int location)
int FindFlag(const char *field, int location)
static vtkMaskFields * New()
Create a new vtkMaskFields.
void CopyFieldOn(int fieldLocation, const char *name)
Turn on/off the copying of the field or specified by name.
Definition: vtkMaskFields.h:75
void CopyAttributesOff()
@ field
Definition: vtkX3D.h:183
@ location
Definition: vtkX3D.h:412
@ type
Definition: vtkX3D.h:522
@ name
Definition: vtkX3D.h:225