VTK  9.1.0
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=========================================================================*/
30#ifndef vtkMaskFields_h
31#define vtkMaskFields_h
32
33#include "vtkDataSetAlgorithm.h"
34#include "vtkFiltersCoreModule.h" // For export macro
35
36#include "vtkDataSetAttributes.h" // Needed for NUM_ATTRIBUTES
37
38class vtkDataSet;
39
40class VTKFILTERSCORE_EXPORT vtkMaskFields : public vtkDataSetAlgorithm
41{
42public:
44 void PrintSelf(ostream& os, vtkIndent indent) override;
45
49 static vtkMaskFields* New();
50
66 void CopyFieldOn(int fieldLocation, const char* name)
67 {
68 this->CopyFieldOnOff(fieldLocation, name, 1);
69 }
70 void CopyFieldOff(int fieldLocation, const char* name)
71 {
72 this->CopyFieldOnOff(fieldLocation, name, 0);
73 }
74
90 void CopyAttributeOn(int attributeLocation, int attributeType)
91 {
92 this->CopyAttributeOnOff(attributeLocation, attributeType, 1);
93 }
94 void CopyAttributeOff(int attributeLocation, int attributeType)
95 {
96 this->CopyAttributeOnOff(attributeLocation, attributeType, 0);
97 }
98
103 void CopyFieldsOff() { this->CopyFields = 0; }
104 void CopyAttributesOff() { this->CopyAttributes = 0; }
105
106 void CopyFieldsOn() { this->CopyFields = 1; }
107 void CopyAttributesOn() { this->CopyAttributes = 1; }
108
110
114 void CopyAttributeOn(const char* attributeLoc, const char* attributeType);
115 void CopyAttributeOff(const char* attributeLoc, const char* attributeType);
116 void CopyFieldOn(const char* fieldLoc, const char* name);
117 void CopyFieldOff(const char* fieldLoc, const char* name);
119
129 virtual void CopyAllOn();
130
140 virtual void CopyAllOff();
141
143 {
144 OBJECT_DATA = 0,
145 POINT_DATA = 1,
146 CELL_DATA = 2
147 };
148
149protected:
151 ~vtkMaskFields() override;
152
154
156 {
157 char* Name;
158 int Type;
161 };
162
163 CopyFieldFlag* CopyFieldFlags; // the names of fields not to be copied
164 int NumberOfFieldFlags; // the number of fields not to be copied
165 void CopyFieldOnOff(int fieldLocation, const char* name, int onOff);
166 void CopyAttributeOnOff(int attributeLocation, int attributeType, int onOff);
168 int FindFlag(const char* field, int location);
169 int FindFlag(int arrayType, int location);
170 int GetFlag(const char* field, int location);
171 int GetFlag(int arrayType, int location);
172 int GetAttributeLocation(const char* loc);
173 int GetAttributeType(const char* type);
174
177
178 static char FieldLocationNames[3][12];
179 static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][10];
180
181private:
182 vtkMaskFields(const vtkMaskFields&) = delete;
183 void operator=(const vtkMaskFields&) = delete;
184};
185
186#endif
Superclass for algorithms that produce output of the same type as input.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:57
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Allow control of which fields get passed to the output.
Definition: vtkMaskFields.h:41
virtual void CopyAllOff()
Turn off copying of all data.
~vtkMaskFields() override
void CopyFieldOff(int fieldLocation, const char *name)
Definition: vtkMaskFields.h:70
void CopyFieldsOn()
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)
Definition: vtkMaskFields.h:94
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.
Definition: vtkMaskFields.h:90
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.
Definition: vtkMaskFields.h:66
void CopyAttributesOff()