00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00050 #ifndef __vtkSelection_h
00051 #define __vtkSelection_h
00052
00053 #include "vtkDataObject.h"
00054
00055
00056 class vtkAbstractArray;
00057 class vtkFieldData;
00058 class vtkInformation;
00059 class vtkInformationIntegerKey;
00060 class vtkInformationObjectBaseKey;
00061 class vtkTable;
00062 struct vtkSelectionInternals;
00063
00064
00065 class VTK_FILTERING_EXPORT vtkSelection : public vtkDataObject
00066 {
00067 public:
00068 vtkTypeRevisionMacro(vtkSelection,vtkDataObject);
00069 void PrintSelf(ostream& os, vtkIndent indent);
00070 static vtkSelection* New();
00071
00073 virtual void Initialize();
00074
00076 virtual int GetDataObjectType() {return VTK_SELECTION;}
00077
00079 virtual void SetSelectionList(vtkAbstractArray*);
00080
00082 virtual vtkAbstractArray* GetSelectionList();
00083
00085 virtual void SetSelectionData(vtkFieldData* data) { this->SetFieldData(data); }
00086
00088 virtual vtkFieldData* GetSelectionData() { return this->GetFieldData(); }
00089
00091
00092 vtkGetObjectMacro(Properties, vtkInformation);
00094
00096 unsigned int GetNumberOfChildren();
00097
00100 virtual vtkSelection* GetChild(unsigned int idx);
00101
00103
00105 virtual vtkSelection* GetParentNode()
00106 {
00107 return this->ParentNode;
00108 }
00110
00115 virtual void AddChild(vtkSelection*);
00116
00118
00120 virtual void RemoveChild(unsigned int idx);
00121 virtual void RemoveChild(vtkSelection*);
00122 virtual void RemoveAllChildren();
00124
00127 virtual void Clear();
00128
00130 virtual void DeepCopy(vtkDataObject* src);
00131
00135 virtual void ShallowCopy(vtkDataObject* src);
00136
00144 virtual void CopyChildren(vtkSelection*);
00145
00148 virtual void Union(vtkSelection* selection);
00149
00151 unsigned long GetMTime();
00152
00153
00168 static vtkInformationIntegerKey* CONTENT_TYPE();
00169
00170 enum SelectionContent
00171 {
00172 SELECTIONS,
00173 GLOBALIDS,
00174 PEDIGREEIDS,
00175 VALUES,
00176 INDICES,
00177 FRUSTUM,
00178 LOCATIONS,
00179 THRESHOLDS,
00180 BLOCKS
00181 };
00182
00183
00185
00187 virtual void SetContentType(int type);
00188 virtual int GetContentType();
00190
00195 static vtkInformationIntegerKey* FIELD_TYPE();
00196
00197 enum SelectionField
00198 {
00199 CELL,
00200 POINT,
00201 FIELD,
00202 VERTEX,
00203 EDGE
00204 };
00205
00206
00208
00210 virtual void SetFieldType(int type);
00211 virtual int GetFieldType();
00213
00216 static vtkInformationDoubleKey* EPSILON();
00217
00221 static vtkInformationIntegerKey* CONTAINING_CELLS();
00222
00224 static vtkInformationIntegerKey* INVERSE();
00225
00228 static vtkInformationIntegerKey* PIXEL_COUNT();
00229
00231 static vtkInformationObjectBaseKey* SOURCE();
00232
00235 static vtkInformationIntegerKey* SOURCE_ID();
00236
00238 static vtkInformationObjectBaseKey* PROP();
00239
00242 static vtkInformationIntegerKey* PROP_ID();
00243
00245 static vtkInformationIntegerKey* PROCESS_ID();
00246
00248 static vtkInformationIntegerKey* COMPOSITE_INDEX();
00249
00251
00252 static vtkInformationIntegerKey* HIERARCHICAL_LEVEL();
00253 static vtkInformationIntegerKey* HIERARCHICAL_INDEX();
00255
00259 static vtkInformationIntegerKey* INDEXED_VERTICES();
00260
00262
00263 static vtkSelection* GetData(vtkInformation* info);
00264 static vtkSelection* GetData(vtkInformationVector* v, int i=0);
00266
00267
00268 protected:
00269 vtkSelection();
00270 ~vtkSelection();
00271
00274 void UnionSelectionList(vtkSelection* other);
00275
00276
00279 bool EqualProperties(vtkSelection* other, bool fullcompare=true);
00280
00281 vtkInformation* Properties;
00282 vtkSelection* ParentNode;
00283
00284 private:
00285 vtkSelection(const vtkSelection&);
00286 void operator=(const vtkSelection&);
00287
00288 vtkSelectionInternals* Internal;
00289
00290 };
00291
00292 #endif