VTK  9.5.20250907
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
49
50#include "vtkDataSetAttributes.h" // Needed for NUM_ATTRIBUTES
51
52VTK_ABI_NAMESPACE_BEGIN
53class vtkDataSet;
54
55class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkMaskFields : public vtkDataSetAlgorithm
56{
57public:
59 void PrintSelf(ostream& os, vtkIndent indent) override;
60
64 static vtkMaskFields* New();
65
81 void CopyFieldOn(int fieldLocation, const char* name)
82 {
83 this->CopyFieldOnOff(fieldLocation, name, 1);
84 }
85 void CopyFieldOff(int fieldLocation, const char* name)
86 {
87 this->CopyFieldOnOff(fieldLocation, name, 0);
88 }
89
105 void CopyAttributeOn(int attributeLocation, int attributeType)
106 {
107 this->CopyAttributeOnOff(attributeLocation, attributeType, 1);
108 }
109 void CopyAttributeOff(int attributeLocation, int attributeType)
110 {
111 this->CopyAttributeOnOff(attributeLocation, attributeType, 0);
112 }
113
118 void CopyFieldsOff() { this->CopyFields = 0; }
119 void CopyAttributesOff() { this->CopyAttributes = 0; }
120
121 void CopyFieldsOn() { this->CopyFields = 1; }
122 void CopyAttributesOn() { this->CopyAttributes = 1; }
123
125
129 void CopyAttributeOn(const char* attributeLoc, const char* attributeType);
130 void CopyAttributeOff(const char* attributeLoc, const char* attributeType);
131 void CopyFieldOn(const char* fieldLoc, const char* name);
132 void CopyFieldOff(const char* fieldLoc, const char* name);
134
144 virtual void CopyAllOn();
145
155 virtual void CopyAllOff();
156
158 {
159 OBJECT_DATA = 0,
160 POINT_DATA = 1,
161 CELL_DATA = 2
162 };
163
164protected:
166 ~vtkMaskFields() override;
167
169
171 {
172 char* Name;
173 int Type;
176 };
177
178 CopyFieldFlag* CopyFieldFlags; // the names of fields not to be copied
179 int NumberOfFieldFlags; // the number of fields not to be copied
180 void CopyFieldOnOff(int fieldLocation, const char* name, int onOff);
181 void CopyAttributeOnOff(int attributeLocation, int attributeType, int onOff);
183 int FindFlag(const char* field, int location);
184 int FindFlag(int arrayType, int location);
185 int GetFlag(const char* field, int location);
186 int GetFlag(int arrayType, int location);
187 int GetAttributeLocation(const char* loc);
188 int GetAttributeType(const char* type);
189
192
193 static char FieldLocationNames[3][12];
194 static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][10];
195
196private:
197 vtkMaskFields(const vtkMaskFields&) = delete;
198 void operator=(const vtkMaskFields&) = delete;
199};
200
201VTK_ABI_NAMESPACE_END
202#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()
#define VTK_MARSHALAUTO