VTK  9.4.20241217
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
43#ifndef vtkMaskFields_h
44#define vtkMaskFields_h
45
46#include "vtkDataSetAlgorithm.h"
47#include "vtkFiltersCoreModule.h" // For export macro
48
49#include "vtkDataSetAttributes.h" // Needed for NUM_ATTRIBUTES
50
51VTK_ABI_NAMESPACE_BEGIN
52class vtkDataSet;
53
54class VTKFILTERSCORE_EXPORT vtkMaskFields : public vtkDataSetAlgorithm
55{
56public:
58 void PrintSelf(ostream& os, vtkIndent indent) override;
59
63 static vtkMaskFields* New();
64
80 void CopyFieldOn(int fieldLocation, const char* name)
81 {
82 this->CopyFieldOnOff(fieldLocation, name, 1);
83 }
84 void CopyFieldOff(int fieldLocation, const char* name)
85 {
86 this->CopyFieldOnOff(fieldLocation, name, 0);
87 }
88
104 void CopyAttributeOn(int attributeLocation, int attributeType)
105 {
106 this->CopyAttributeOnOff(attributeLocation, attributeType, 1);
107 }
108 void CopyAttributeOff(int attributeLocation, int attributeType)
109 {
110 this->CopyAttributeOnOff(attributeLocation, attributeType, 0);
111 }
112
117 void CopyFieldsOff() { this->CopyFields = 0; }
118 void CopyAttributesOff() { this->CopyAttributes = 0; }
119
120 void CopyFieldsOn() { this->CopyFields = 1; }
121 void CopyAttributesOn() { this->CopyAttributes = 1; }
122
124
128 void CopyAttributeOn(const char* attributeLoc, const char* attributeType);
129 void CopyAttributeOff(const char* attributeLoc, const char* attributeType);
130 void CopyFieldOn(const char* fieldLoc, const char* name);
131 void CopyFieldOff(const char* fieldLoc, const char* name);
133
143 virtual void CopyAllOn();
144
154 virtual void CopyAllOff();
155
157 {
158 OBJECT_DATA = 0,
159 POINT_DATA = 1,
160 CELL_DATA = 2
161 };
162
163protected:
165 ~vtkMaskFields() override;
166
168
170 {
171 char* Name;
172 int Type;
175 };
176
177 CopyFieldFlag* CopyFieldFlags; // the names of fields not to be copied
178 int NumberOfFieldFlags; // the number of fields not to be copied
179 void CopyFieldOnOff(int fieldLocation, const char* name, int onOff);
180 void CopyAttributeOnOff(int attributeLocation, int attributeType, int onOff);
182 int FindFlag(const char* field, int location);
183 int FindFlag(int arrayType, int location);
184 int GetFlag(const char* field, int location);
185 int GetFlag(int arrayType, int location);
186 int GetAttributeLocation(const char* loc);
187 int GetAttributeType(const char* type);
188
191
192 static char FieldLocationNames[3][12];
193 static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][10];
194
195private:
196 vtkMaskFields(const vtkMaskFields&) = delete;
197 void operator=(const vtkMaskFields&) = delete;
198};
199
200VTK_ABI_NAMESPACE_END
201#endif
Superclass for algorithms that produce output of the same type as input.
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
a simple class to control print indentation
Definition vtkIndent.h:108
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()