VTK  9.3.0
vtkMaskFields.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
33#ifndef vtkMaskFields_h
34#define vtkMaskFields_h
35
36#include "vtkDataSetAlgorithm.h"
37#include "vtkFiltersCoreModule.h" // For export macro
38
39#include "vtkDataSetAttributes.h" // Needed for NUM_ATTRIBUTES
40
41VTK_ABI_NAMESPACE_BEGIN
42class vtkDataSet;
43
44class VTKFILTERSCORE_EXPORT vtkMaskFields : public vtkDataSetAlgorithm
45{
46public:
48 void PrintSelf(ostream& os, vtkIndent indent) override;
49
53 static vtkMaskFields* New();
54
70 void CopyFieldOn(int fieldLocation, const char* name)
71 {
72 this->CopyFieldOnOff(fieldLocation, name, 1);
73 }
74 void CopyFieldOff(int fieldLocation, const char* name)
75 {
76 this->CopyFieldOnOff(fieldLocation, name, 0);
77 }
78
94 void CopyAttributeOn(int attributeLocation, int attributeType)
95 {
96 this->CopyAttributeOnOff(attributeLocation, attributeType, 1);
97 }
98 void CopyAttributeOff(int attributeLocation, int attributeType)
99 {
100 this->CopyAttributeOnOff(attributeLocation, attributeType, 0);
101 }
102
107 void CopyFieldsOff() { this->CopyFields = 0; }
108 void CopyAttributesOff() { this->CopyAttributes = 0; }
109
110 void CopyFieldsOn() { this->CopyFields = 1; }
111 void CopyAttributesOn() { this->CopyAttributes = 1; }
112
114
118 void CopyAttributeOn(const char* attributeLoc, const char* attributeType);
119 void CopyAttributeOff(const char* attributeLoc, const char* attributeType);
120 void CopyFieldOn(const char* fieldLoc, const char* name);
121 void CopyFieldOff(const char* fieldLoc, const char* name);
123
133 virtual void CopyAllOn();
134
144 virtual void CopyAllOff();
145
147 {
148 OBJECT_DATA = 0,
149 POINT_DATA = 1,
150 CELL_DATA = 2
151 };
152
153protected:
155 ~vtkMaskFields() override;
156
158
160 {
161 char* Name;
162 int Type;
165 };
166
167 CopyFieldFlag* CopyFieldFlags; // the names of fields not to be copied
168 int NumberOfFieldFlags; // the number of fields not to be copied
169 void CopyFieldOnOff(int fieldLocation, const char* name, int onOff);
170 void CopyAttributeOnOff(int attributeLocation, int attributeType, int onOff);
172 int FindFlag(const char* field, int location);
173 int FindFlag(int arrayType, int location);
174 int GetFlag(const char* field, int location);
175 int GetFlag(int arrayType, int location);
176 int GetAttributeLocation(const char* loc);
177 int GetAttributeType(const char* type);
178
181
182 static char FieldLocationNames[3][12];
183 static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][10];
184
185private:
186 vtkMaskFields(const vtkMaskFields&) = delete;
187 void operator=(const vtkMaskFields&) = delete;
188};
189
190VTK_ABI_NAMESPACE_END
191#endif
Superclass for algorithms that produce output of the same type as input.
abstract class to specify dataset behavior
Definition vtkDataSet.h:62
a simple class to control print indentation
Definition vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Allow control of which fields get passed to the output.
virtual void CopyAllOff()
Turn off copying of all data.
~vtkMaskFields() override
void CopyFieldOff(int fieldLocation, const char *name)
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.
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.
void CopyAttributesOff()