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:
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);
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 
vtkMaskFields::GetFlag
int GetFlag(const char *field, int location)
vtkMaskFields::CopyFieldsOn
void CopyFieldsOn()
Definition: vtkMaskFields.h:91
vtkMaskFields::~vtkMaskFields
virtual ~vtkMaskFields()
vtkMaskFields::NumberOfFieldFlags
int NumberOfFieldFlags
Definition: vtkMaskFields.h:147
vtkMaskFields::CopyAttributeOnOff
void CopyAttributeOnOff(int attributeLocation, int attributeType, int onOff)
vtkMaskFields::CopyAttributeOn
void CopyAttributeOn(int attributeLocation, int attributeType)
Definition: vtkMaskFields.h:80
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkMaskFields::CopyFieldFlag::IsCopied
int IsCopied
Definition: vtkMaskFields.h:142
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkMaskFields::GetFlag
int GetFlag(int arrayType, int location)
vtkMaskFields::FindFlag
int FindFlag(const char *field, int location)
vtkMaskFields::vtkMaskFields
vtkMaskFields()
vtkMaskFields::GetAttributeLocation
int GetAttributeLocation(const char *loc)
vtkMaskFields::CopyAttributeOff
void CopyAttributeOff(const char *attributeLoc, const char *attributeType)
vtkMaskFields::CopyAttributes
int CopyAttributes
Definition: vtkMaskFields.h:159
vtkMaskFields::CopyFieldsOff
void CopyFieldsOff()
Definition: vtkMaskFields.h:87
vtkFiltersCoreModule.h
vtkMaskFields::CopyAttributesOff
void CopyAttributesOff()
Definition: vtkMaskFields.h:88
vtkDataSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkDataSetAlgorithm.h:51
vtkMaskFields::CopyFieldFlags
CopyFieldFlag * CopyFieldFlags
Definition: vtkMaskFields.h:146
vtkgl::name
GLuint const GLchar * name
Definition: vtkgl.h:11983
vtkMaskFields::FindFlag
int FindFlag(int arrayType, int location)
vtkMaskFields::CopyAllOn
virtual void CopyAllOn()
vtkMaskFields::CopyFieldOnOff
void CopyFieldOnOff(int fieldLocation, const char *name, int onOff)
vtkMaskFields::CopyAttributeOn
void CopyAttributeOn(const char *attributeLoc, const char *attributeType)
vtkMaskFields::New
static vtkMaskFields * New()
vtkMaskFields::CopyFieldOn
void CopyFieldOn(const char *fieldLoc, const char *name)
VTKFILTERSCORE_EXPORT
#define VTKFILTERSCORE_EXPORT
Definition: vtkFiltersCoreModule.h:15
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkX3D::field
@ field
Definition: vtkX3D.h:177
vtkMaskFields::GetAttributeType
int GetAttributeType(const char *type)
vtkMaskFields::CopyFieldOff
void CopyFieldOff(const char *fieldLoc, const char *name)
vtkMaskFields
Allow control of which fields get passed to the output.
Definition: vtkMaskFields.h:46
vtkMaskFields::CopyFieldFlag::Name
char * Name
Definition: vtkMaskFields.h:139
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkMaskFields::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkDataSetAlgorithm.h
vtkMaskFields::CopyFieldOff
void CopyFieldOff(int fieldLocation, const char *name)
Definition: vtkMaskFields.h:65
vtkgl::location
GLint location
Definition: vtkgl.h:12002
vtkMaskFields::CopyAllOff
virtual void CopyAllOff()
vtkMaskFields::CopyFields
int CopyFields
Definition: vtkMaskFields.h:158
vtkMaskFields::CopyFieldFlag::Location
int Location
Definition: vtkMaskFields.h:141
vtkMaskFields::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkMaskFields::FieldLocation
FieldLocation
Definition: vtkMaskFields.h:123
vtkMaskFields::CopyFieldOn
void CopyFieldOn(int fieldLocation, const char *name)
Definition: vtkMaskFields.h:64
vtkMaskFields::CopyFieldFlag
Definition: vtkMaskFields.h:138
vtkMaskFields::CopyAttributeOff
void CopyAttributeOff(int attributeLocation, int attributeType)
Definition: vtkMaskFields.h:81
vtkMaskFields::CopyAttributesOn
void CopyAttributesOn()
Definition: vtkMaskFields.h:92
vtkMaskFields::CopyFieldFlag::Type
int Type
Definition: vtkMaskFields.h:140
vtkgl::type
GLuint GLuint GLsizei GLenum type
Definition: vtkgl.h:11315
vtkMaskFields::ClearFieldFlags
void ClearFieldFlags()
vtkDataSetAttributes.h
vtkDataSetAttributes::NUM_ATTRIBUTES
@ NUM_ATTRIBUTES
Definition: vtkDataSetAttributes.h:97