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
24#ifndef vtkMaskFields_h
25#define vtkMaskFields_h
26
27#include "vtkDataSetAlgorithm.h"
28#include "vtkFiltersCoreModule.h" // For export macro
29
30#include "vtkDataSetAttributes.h" // Needed for NUM_ATTRIBUTES
31
32VTK_ABI_NAMESPACE_BEGIN
33class vtkDataSet;
34
35class VTKFILTERSCORE_EXPORT vtkMaskFields : public vtkDataSetAlgorithm
36{
37public:
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
44 static vtkMaskFields* New();
45
61 void CopyFieldOn(int fieldLocation, const char* name)
62 {
63 this->CopyFieldOnOff(fieldLocation, name, 1);
64 }
65 void CopyFieldOff(int fieldLocation, const char* name)
66 {
67 this->CopyFieldOnOff(fieldLocation, name, 0);
68 }
69
85 void CopyAttributeOn(int attributeLocation, int attributeType)
86 {
87 this->CopyAttributeOnOff(attributeLocation, attributeType, 1);
88 }
89 void CopyAttributeOff(int attributeLocation, int attributeType)
90 {
91 this->CopyAttributeOnOff(attributeLocation, attributeType, 0);
92 }
93
98 void CopyFieldsOff() { this->CopyFields = 0; }
99 void CopyAttributesOff() { this->CopyAttributes = 0; }
100
101 void CopyFieldsOn() { this->CopyFields = 1; }
102 void CopyAttributesOn() { this->CopyAttributes = 1; }
103
105
109 void CopyAttributeOn(const char* attributeLoc, const char* attributeType);
110 void CopyAttributeOff(const char* attributeLoc, const char* attributeType);
111 void CopyFieldOn(const char* fieldLoc, const char* name);
112 void CopyFieldOff(const char* fieldLoc, const char* name);
114
124 virtual void CopyAllOn();
125
135 virtual void CopyAllOff();
136
138 {
139 OBJECT_DATA = 0,
140 POINT_DATA = 1,
141 CELL_DATA = 2
142 };
143
144protected:
146 ~vtkMaskFields() override;
147
149
151 {
152 char* Name;
153 int Type;
156 };
157
158 CopyFieldFlag* CopyFieldFlags; // the names of fields not to be copied
159 int NumberOfFieldFlags; // the number of fields not to be copied
160 void CopyFieldOnOff(int fieldLocation, const char* name, int onOff);
161 void CopyAttributeOnOff(int attributeLocation, int attributeType, int onOff);
163 int FindFlag(const char* field, int location);
164 int FindFlag(int arrayType, int location);
165 int GetFlag(const char* field, int location);
166 int GetFlag(int arrayType, int location);
167 int GetAttributeLocation(const char* loc);
168 int GetAttributeType(const char* type);
169
172
173 static char FieldLocationNames[3][12];
174 static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][10];
175
176private:
177 vtkMaskFields(const vtkMaskFields&) = delete;
178 void operator=(const vtkMaskFields&) = delete;
179};
180
181VTK_ABI_NAMESPACE_END
182#endif
Superclass for algorithms that produce output of the same type as input.
abstract class to specify dataset behavior
Definition vtkDataSet.h:53
a simple class to control print indentation
Definition vtkIndent.h:29
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()