VTK  9.6.1
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
23
24#ifndef vtkMaskFields_h
25#define vtkMaskFields_h
26
27#include "vtkDataSetAlgorithm.h"
28#include "vtkFiltersCoreModule.h" // For export macro
29#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
30
31#include "vtkDataSetAttributes.h" // Needed for NUM_ATTRIBUTES
32
33VTK_ABI_NAMESPACE_BEGIN
34class vtkDataSet;
35
36class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkMaskFields : public vtkDataSetAlgorithm
37{
38public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
45 static vtkMaskFields* New();
46
62 void CopyFieldOn(int fieldLocation, const char* name)
63 {
64 this->CopyFieldOnOff(fieldLocation, name, 1);
65 }
66 void CopyFieldOff(int fieldLocation, const char* name)
67 {
68 this->CopyFieldOnOff(fieldLocation, name, 0);
69 }
70
86 void CopyAttributeOn(int attributeLocation, int attributeType)
87 {
88 this->CopyAttributeOnOff(attributeLocation, attributeType, 1);
89 }
90 void CopyAttributeOff(int attributeLocation, int attributeType)
91 {
92 this->CopyAttributeOnOff(attributeLocation, attributeType, 0);
93 }
94
99 void CopyFieldsOff() { this->CopyFields = 0; }
100 void CopyAttributesOff() { this->CopyAttributes = 0; }
101
102 void CopyFieldsOn() { this->CopyFields = 1; }
103 void CopyAttributesOn() { this->CopyAttributes = 1; }
104
106
110 void CopyAttributeOn(const char* attributeLoc, const char* attributeType);
111 void CopyAttributeOff(const char* attributeLoc, const char* attributeType);
112 void CopyFieldOn(const char* fieldLoc, const char* name);
113 void CopyFieldOff(const char* fieldLoc, const char* name);
115
125 virtual void CopyAllOn();
126
136 virtual void CopyAllOff();
137
144
145protected:
147 ~vtkMaskFields() override;
148
150
152 {
153 char* Name;
154 int Type;
157 };
158
159 CopyFieldFlag* CopyFieldFlags; // the names of fields not to be copied
160 int NumberOfFieldFlags; // the number of fields not to be copied
161 void CopyFieldOnOff(int fieldLocation, const char* name, int onOff);
162 void CopyAttributeOnOff(int attributeLocation, int attributeType, int onOff);
164 int FindFlag(const char* field, int location);
165 int FindFlag(int arrayType, int location);
166 int GetFlag(const char* field, int location);
167 int GetFlag(int arrayType, int location);
168 int GetAttributeLocation(const char* loc);
169 int GetAttributeType(const char* type);
170
173
174 static char FieldLocationNames[3][12];
176
177private:
178 vtkMaskFields(const vtkMaskFields&) = delete;
179 void operator=(const vtkMaskFields&) = delete;
180};
181
182VTK_ABI_NAMESPACE_END
183#endif
abstract class to specify dataset behavior
Definition vtkDataSet.h:57
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
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()
static char FieldLocationNames[3][12]
static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][10]
#define VTK_MARSHALAUTO