vtkMaskFields.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00039 #ifndef __vtkMaskFields_h
00040 #define __vtkMaskFields_h
00041
00042 #include "vtkDataSetToDataSetFilter.h"
00043
00044 #include "vtkDataSetAttributes.h"
00045
00046 class vtkDataSet;
00047
00048 class VTK_GRAPHICS_EXPORT vtkMaskFields : public vtkDataSetToDataSetFilter
00049 {
00050 public:
00051 vtkTypeRevisionMacro(vtkMaskFields,vtkDataSetToDataSetFilter);
00052 void PrintSelf(ostream& os, vtkIndent indent);
00053
00055 static vtkMaskFields *New();
00056
00058
00067 void CopyFieldOn(int fieldLocation, const char* name) { this->CopyFieldOnOff(fieldLocation, name, 1); }
00068 void CopyFieldOff(int fieldLocation, const char* name) { this->CopyFieldOnOff(fieldLocation, name, 0); }
00070
00071
00073
00083 void CopyAttributeOn(int attributeLocation, int attributeType) { this->CopyAttributeOnOff(attributeLocation, attributeType, 1); }
00084 void CopyAttributeOff(int attributeLocation, int attributeType) { this->CopyAttributeOnOff(attributeLocation, attributeType, 0); }
00086
00088
00090 void CopyFieldsOff() { this->CopyFields = 0; }
00091 void CopyAttributesOff() { this->CopyAttributes = 0; }
00093
00094 void CopyFieldsOn() { this->CopyFields = 1; }
00095 void CopyAttributesOn() { this->CopyAttributes = 1; }
00096
00098
00100 void CopyAttributeOn(const char* attributeLoc,
00101 const char* attributeType);
00102 void CopyAttributeOff(const char* attributeLoc,
00103 const char* attributeType);
00104 void CopyFieldOn(const char* fieldLoc,
00105 const char* name);
00106 void CopyFieldOff(const char* fieldLoc,
00107 const char* name);
00109
00115 virtual void CopyAllOn();
00116
00122 virtual void CopyAllOff();
00123
00124
00125 enum FieldLocation
00126 {
00127 OBJECT_DATA=0,
00128 POINT_DATA=1,
00129 CELL_DATA=2
00130 };
00131
00132
00133 protected:
00134 vtkMaskFields();
00135 virtual ~vtkMaskFields();
00136
00137 void Execute();
00138
00139
00140 struct CopyFieldFlag
00141 {
00142 char* Name;
00143 int Type;
00144 int Location;
00145 int IsCopied;
00146 };
00147
00148
00149 CopyFieldFlag* CopyFieldFlags;
00150 int NumberOfFieldFlags;
00151 void CopyFieldOnOff(int fieldLocation, const char* name, int onOff);
00152 void CopyAttributeOnOff(int attributeLocation, int attributeType, int onOff);
00153 void ClearFieldFlags();
00154 int FindFlag(const char* field, int location);
00155 int FindFlag(int arrayType, int location);
00156 int GetFlag(const char* field, int location);
00157 int GetFlag(int arrayType, int location);
00158 int GetAttributeLocation(const char* loc);
00159 int GetAttributeType(const char* type);
00160
00161 int CopyFields;
00162 int CopyAttributes;
00163
00164 static char FieldLocationNames[3][12];
00165 static char AttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][10];
00166
00167 private:
00168 vtkMaskFields(const vtkMaskFields&);
00169 void operator=(const vtkMaskFields&);
00170 };
00171
00172 #endif
00173
00174