VTK
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 #ifndef vtkMaskFields_h
36 #define vtkMaskFields_h
37 
38 #include "vtkFiltersCoreModule.h" // For export macro
39 #include "vtkDataSetAlgorithm.h"
40 
41 #include "vtkDataSetAttributes.h" // Needed for NUM_ATTRIBUTES
42 
43 class vtkDataSet;
44 
46 {
47 public:
49  void PrintSelf(ostream& os, vtkIndent indent);
50 
52  static vtkMaskFields *New();
53 
55 
64  void CopyFieldOn(int fieldLocation, const char* name) { this->CopyFieldOnOff(fieldLocation, name, 1); }
65  void CopyFieldOff(int fieldLocation, const char* name) { this->CopyFieldOnOff(fieldLocation, name, 0); }
67 
68 
70 
80  void CopyAttributeOn(int attributeLocation, int attributeType) { this->CopyAttributeOnOff(attributeLocation, attributeType, 1); }
81  void CopyAttributeOff(int attributeLocation, int attributeType) { this->CopyAttributeOnOff(attributeLocation, attributeType, 0); }
83 
85 
87  void CopyFieldsOff() { this->CopyFields = 0; }
88  void CopyAttributesOff() { this->CopyAttributes = 0; }
90 
91  void CopyFieldsOn() { this->CopyFields = 1; }
92  void CopyAttributesOn() { this->CopyAttributes = 1; }
93 
95 
97  void CopyAttributeOn(const char* attributeLoc,
98  const char* attributeType);
99  void CopyAttributeOff(const char* attributeLoc,
100  const char* attributeType);
101  void CopyFieldOn(const char* fieldLoc,
102  const char* name);
103  void CopyFieldOff(const char* fieldLoc,
104  const char* name);
106 
112  virtual void CopyAllOn();
113 
119  virtual void CopyAllOff();
120 
121 //BTX
123  {
124  OBJECT_DATA=0,
125  POINT_DATA=1,
126  CELL_DATA=2
127  };
128 //ETX
129 
130 protected:
131  vtkMaskFields();
132  virtual ~vtkMaskFields();
133 
135 
136 //BTX
138  {
139  char* Name;
140  int Type;
141  int Location;
142  int IsCopied;
143  };
144 //ETX
145 
146  CopyFieldFlag* CopyFieldFlags; // the names of fields not to be copied
147  int NumberOfFieldFlags; // the number of fields not to be copied
148  void CopyFieldOnOff(int fieldLocation, const char* name, int onOff);
149  void CopyAttributeOnOff(int attributeLocation, int attributeType, int onOff);
150  void ClearFieldFlags();
151  int FindFlag(const char* field, int location);
152  int FindFlag(int arrayType, int location);
153  int GetFlag(const char* field, int location);
154  int GetFlag(int arrayType, int location);
155  int GetAttributeLocation(const char* loc);
156  int GetAttributeType(const char* type);
157 
160 
161  static char FieldLocationNames[3][12];
162  static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][10];
163 
164 private:
165  vtkMaskFields(const vtkMaskFields&); // Not implemented.
166  void operator=(const vtkMaskFields&); // Not implemented.
167 };
168 
169 #endif
170 
171 
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
#define VTKFILTERSCORE_EXPORT
void CopyAttributeOn(int attributeLocation, int attributeType)
Definition: vtkMaskFields.h:80
CopyFieldFlag * CopyFieldFlags
void CopyFieldsOn()
Definition: vtkMaskFields.h:91
void CopyAttributesOn()
Definition: vtkMaskFields.h:92
a simple class to control print indentation
Definition: vtkIndent.h:38
void CopyAttributesOff()
Definition: vtkMaskFields.h:88
Allow control of which fields get passed to the output.
Definition: vtkMaskFields.h:45
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
void CopyFieldOff(int fieldLocation, const char *name)
Definition: vtkMaskFields.h:65
void CopyAttributeOff(int attributeLocation, int attributeType)
Definition: vtkMaskFields.h:81
void CopyFieldsOff()
Definition: vtkMaskFields.h:87
Store zero or more vtkInformation instances.
void CopyFieldOn(int fieldLocation, const char *name)
Definition: vtkMaskFields.h:64
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce output of the same type as input.
static vtkDataSetAlgorithm * New()