VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Common/DataModel/vtkSelectionNode.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   ParaView
00004   Module:    vtkSelectionNode.h
00005 
00006   Copyright (c) Kitware, Inc.
00007   All rights reserved.
00008   See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00051 #ifndef vtkSelectionNode_h
00052 #define vtkSelectionNode_h
00053 
00054 #include "vtkCommonDataModelModule.h" // For export macro
00055 #include "vtkObject.h"
00056 
00057 //BTX
00058 class vtkAbstractArray;
00059 class vtkDataSetAttributes;
00060 class vtkInformation;
00061 class vtkInformationDoubleKey;
00062 class vtkInformationIntegerKey;
00063 class vtkInformationObjectBaseKey;
00064 class vtkProp;
00065 class vtkTable;
00066 //ETX
00067 
00068 class VTKCOMMONDATAMODEL_EXPORT vtkSelectionNode : public vtkObject
00069 {
00070 public:
00071   vtkTypeMacro(vtkSelectionNode,vtkObject);
00072   void PrintSelf(ostream& os, vtkIndent indent);
00073   static vtkSelectionNode* New();
00074 
00076   virtual void Initialize();
00077 
00079 
00080   virtual void SetSelectionList(vtkAbstractArray*);
00081   virtual vtkAbstractArray* GetSelectionList();
00083 
00085 
00086   virtual void SetSelectionData(vtkDataSetAttributes* data);
00087   vtkGetObjectMacro(SelectionData, vtkDataSetAttributes);
00089 
00091 
00092   vtkGetObjectMacro(Properties, vtkInformation);
00094 
00096   virtual void DeepCopy(vtkSelectionNode* src);
00097 
00101   virtual void ShallowCopy(vtkSelectionNode* src);
00102 
00104   unsigned long GetMTime();
00105 
00106   // vtkSelectionNode specific keys follow:
00108 
00121   static vtkInformationIntegerKey* CONTENT_TYPE();
00122 //BTX
00123   enum SelectionContent
00124   {
00125     SELECTIONS,  // Deprecated.
00126     GLOBALIDS,
00127     PEDIGREEIDS,
00128     VALUES,
00129     INDICES,
00130     FRUSTUM,
00131     LOCATIONS,
00132     THRESHOLDS,
00133     BLOCKS,       // used to select blocks within a composite dataset.
00134     QUERY
00135   };
00136 //ETX
00138 
00140 
00142   virtual void SetContentType(int type);
00143   virtual int GetContentType();
00145 
00147 
00151   static vtkInformationIntegerKey* FIELD_TYPE();
00152 //BTX
00153   enum SelectionField
00154   {
00155     CELL,
00156     POINT,
00157     FIELD,
00158     VERTEX,
00159     EDGE,
00160     ROW
00161   };
00162 //ETX
00164 
00166 
00168   virtual void SetFieldType(int type);
00169   virtual int GetFieldType();
00171 
00173 
00175   static int ConvertSelectionFieldToAttributeType(int val);
00176   static int ConvertAttributeTypeToSelectionField(int val);
00178 
00180 
00181   vtkSetStringMacro(QueryString);
00182   vtkGetStringMacro(QueryString);
00184 
00187   static vtkInformationDoubleKey* EPSILON();
00188 
00192   static vtkInformationIntegerKey* CONTAINING_CELLS();
00193 
00198   static vtkInformationIntegerKey* COMPONENT_NUMBER();
00199 
00201   static vtkInformationIntegerKey* INVERSE();
00202 
00205   static vtkInformationIntegerKey* PIXEL_COUNT();
00206 
00208   static vtkInformationObjectBaseKey* SOURCE();
00209 
00212   static vtkInformationIntegerKey* SOURCE_ID();
00213 
00215   static vtkInformationObjectBaseKey* PROP();
00216 
00219   static vtkInformationIntegerKey* PROP_ID();
00220 
00222   static vtkInformationIntegerKey* PROCESS_ID();
00223 
00225   static vtkInformationIntegerKey* COMPOSITE_INDEX();
00226 
00228 
00229   static vtkInformationIntegerKey* HIERARCHICAL_LEVEL();
00230   static vtkInformationIntegerKey* HIERARCHICAL_INDEX();
00232 
00236   static vtkInformationIntegerKey* INDEXED_VERTICES();
00237 
00240   void UnionSelectionList(vtkSelectionNode* other);
00241 
00245   void SubtractSelectionList(vtkSelectionNode* other);
00246 
00249   bool EqualProperties(vtkSelectionNode* other, bool fullcompare=true);
00250 
00251 //BTX
00252 protected:
00253   vtkSelectionNode();
00254   ~vtkSelectionNode();
00255 
00256   vtkInformation* Properties;
00257   vtkDataSetAttributes* SelectionData;
00258   char* QueryString;
00259 
00260 private:
00261   vtkSelectionNode(const vtkSelectionNode&);  // Not implemented.
00262   void operator=(const vtkSelectionNode&);  // Not implemented.
00263 //ETX
00264 };
00265 
00266 #endif