VTK  9.2.6
vtkMaskFields.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkMaskFields.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
35
36#ifndef vtkMaskFields_h
37#define vtkMaskFields_h
38
39#include "vtkDataSetAlgorithm.h"
40#include "vtkFiltersCoreModule.h" // For export macro
41
42#include "vtkDataSetAttributes.h" // Needed for NUM_ATTRIBUTES
43
44class vtkDataSet;
45
46class VTKFILTERSCORE_EXPORT vtkMaskFields : public vtkDataSetAlgorithm
47{
48public:
50 void PrintSelf(ostream& os, vtkIndent indent) override;
51
55 static vtkMaskFields* New();
56
72 void CopyFieldOn(int fieldLocation, const char* name)
73 {
74 this->CopyFieldOnOff(fieldLocation, name, 1);
75 }
76 void CopyFieldOff(int fieldLocation, const char* name)
77 {
78 this->CopyFieldOnOff(fieldLocation, name, 0);
79 }
80
96 void CopyAttributeOn(int attributeLocation, int attributeType)
97 {
98 this->CopyAttributeOnOff(attributeLocation, attributeType, 1);
99 }
100 void CopyAttributeOff(int attributeLocation, int attributeType)
101 {
102 this->CopyAttributeOnOff(attributeLocation, attributeType, 0);
103 }
104
109 void CopyFieldsOff() { this->CopyFields = 0; }
110 void CopyAttributesOff() { this->CopyAttributes = 0; }
111
112 void CopyFieldsOn() { this->CopyFields = 1; }
113 void CopyAttributesOn() { this->CopyAttributes = 1; }
114
116
120 void CopyAttributeOn(const char* attributeLoc, const char* attributeType);
121 void CopyAttributeOff(const char* attributeLoc, const char* attributeType);
122 void CopyFieldOn(const char* fieldLoc, const char* name);
123 void CopyFieldOff(const char* fieldLoc, const char* name);
125
135 virtual void CopyAllOn();
136
146 virtual void CopyAllOff();
147
154
155protected:
157 ~vtkMaskFields() override;
158
160
162 {
163 char* Name;
164 int Type;
167 };
168
169 CopyFieldFlag* CopyFieldFlags; // the names of fields not to be copied
170 int NumberOfFieldFlags; // the number of fields not to be copied
171 void CopyFieldOnOff(int fieldLocation, const char* name, int onOff);
172 void CopyAttributeOnOff(int attributeLocation, int attributeType, int onOff);
174 int FindFlag(const char* field, int location);
175 int FindFlag(int arrayType, int location);
176 int GetFlag(const char* field, int location);
177 int GetFlag(int arrayType, int location);
178 int GetAttributeLocation(const char* loc);
179 int GetAttributeType(const char* type);
180
183
184 static char FieldLocationNames[3][12];
186
187private:
188 vtkMaskFields(const vtkMaskFields&) = delete;
189 void operator=(const vtkMaskFields&) = delete;
190};
191
192#endif
abstract class to specify dataset behavior
Definition vtkDataSet.h:63
a simple class to control print indentation
Definition vtkIndent.h:40
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]