Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
Graphics/vtkMaskFields.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00043 #ifndef __vtkMaskFields_h
00044 #define __vtkMaskFields_h
00045
00046 #include "vtkDataSetToDataSetFilter.h"
00047
00048 #include "vtkDataSetAttributes.h"
00049
00050 class vtkDataSet;
00051
00052 class VTK_GRAPHICS_EXPORT vtkMaskFields : public vtkDataSetToDataSetFilter
00053 {
00054 public:
00055 vtkTypeRevisionMacro(vtkMaskFields,vtkDataSetToDataSetFilter);
00056 void PrintSelf(ostream& os, vtkIndent indent);
00057
00059 static vtkMaskFields *New();
00060
00062
00071 void CopyFieldOn(int fieldLocation, const char* name) { this->CopyFieldOnOff(fieldLocation, name, 1); }
00072 void CopyFieldOff(int fieldLocation, const char* name) { this->CopyFieldOnOff(fieldLocation, name, 0); }
00074
00075
00077
00087 void CopyAttributeOn(int attributeLocation, int attributeType) { this->CopyAttributeOnOff(attributeLocation, attributeType, 1); }
00088 void CopyAttributeOff(int attributeLocation, int attributeType) { this->CopyAttributeOnOff(attributeLocation, attributeType, 0); }
00090
00092
00094 void CopyFieldsOff() { this->CopyFields = 0; }
00095 void CopyAttributesOff() { this->CopyAttributes = 0; }
00097
00098 void CopyFieldsOn() { this->CopyFields = 1; }
00099 void CopyAttributesOn() { this->CopyAttributes = 1; }
00100
00102
00104 void CopyAttributeOn(const char* attributeLoc,
00105 const char* attributeType);
00106 void CopyAttributeOff(const char* attributeLoc,
00107 const char* attributeType);
00108 void CopyFieldOn(const char* fieldLoc,
00109 const char* name);
00110 void CopyFieldOff(const char* fieldLoc,
00111 const char* name);
00113
00119 virtual void CopyAllOn();
00120
00126 virtual void CopyAllOff();
00127
00128 vtkMaskFields();
00129 virtual ~vtkMaskFields();
00130
00131
00132 enum FieldLocation
00133 {
00134 OBJECT_DATA=0,
00135 POINT_DATA=1,
00136 CELL_DATA=2
00137 };
00138
00139
00140 protected:
00141
00142 void Execute();
00143
00144
00145 struct CopyFieldFlag
00146 {
00147 char* Name;
00148 int Type;
00149 int Location;
00150 int IsCopied;
00151 };
00152
00153
00154 CopyFieldFlag* CopyFieldFlags;
00155 int NumberOfFieldFlags;
00156 void CopyFieldOnOff(int fieldLocation, const char* name, int onOff);
00157 void CopyAttributeOnOff(int attributeLocation, int attributeType, int onOff);
00158 void ClearFieldFlags();
00159 int FindFlag(const char* field, int location);
00160 int FindFlag(int arrayType, int location);
00161 int GetFlag(const char* field, int location);
00162 int GetFlag(int arrayType, int location);
00163 int GetAttributeLocation(const char* loc);
00164 int GetAttributeType(const char* type);
00165
00166 int CopyFields;
00167 int CopyAttributes;
00168
00169 static char FieldLocationNames[3][12];
00170 static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][10];
00171
00172 private:
00173 vtkMaskFields(const vtkMaskFields&);
00174 void operator=(const vtkMaskFields&);
00175 };
00176
00177 #endif
00178
00179