VTK
dox/Filtering/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 "vtkObject.h"
00055 
00056 //BTX
00057 class vtkAbstractArray;
00058 class vtkDataSetAttributes;
00059 class vtkInformation;
00060 class vtkInformationDoubleKey;
00061 class vtkInformationIntegerKey;
00062 class vtkInformationObjectBaseKey;
00063 class vtkProp;
00064 class vtkTable;
00065 //ETX
00066 
00067 class VTK_FILTERING_EXPORT vtkSelectionNode : public vtkObject
00068 {
00069 public:
00070   vtkTypeMacro(vtkSelectionNode,vtkObject);
00071   void PrintSelf(ostream& os, vtkIndent indent);
00072   static vtkSelectionNode* New();
00073 
00075   virtual void Initialize();
00076 
00078 
00079   virtual void SetSelectionList(vtkAbstractArray*);
00080   virtual vtkAbstractArray* GetSelectionList();
00082 
00084 
00085   virtual void SetSelectionData(vtkDataSetAttributes* data);
00086   vtkGetObjectMacro(SelectionData, vtkDataSetAttributes);
00088 
00090 
00091   vtkGetObjectMacro(Properties, vtkInformation);
00093 
00095   virtual void DeepCopy(vtkSelectionNode* src);
00096 
00100   virtual void ShallowCopy(vtkSelectionNode* src);
00101 
00103   unsigned long GetMTime();
00104 
00105   // vtkSelectionNode specific keys follow:
00107 
00120   static vtkInformationIntegerKey* CONTENT_TYPE();
00121 //BTX
00122   enum SelectionContent
00123   {
00124     SELECTIONS,  // Deprecated.
00125     GLOBALIDS,
00126     PEDIGREEIDS,
00127     VALUES,
00128     INDICES,
00129     FRUSTUM,
00130     LOCATIONS,
00131     THRESHOLDS,
00132     BLOCKS,       // used to select blocks within a composite dataset.
00133     QUERY
00134   };
00135 //ETX
00137 
00139 
00141   virtual void SetContentType(int type);
00142   virtual int GetContentType();
00144 
00146 
00150   static vtkInformationIntegerKey* FIELD_TYPE();
00151 //BTX
00152   enum SelectionField
00153   {
00154     CELL,
00155     POINT,
00156     FIELD,
00157     VERTEX,
00158     EDGE,
00159     ROW
00160   };
00161 //ETX
00163 
00165 
00167   virtual void SetFieldType(int type);
00168   virtual int GetFieldType();
00170 
00172 
00173   vtkSetStringMacro(QueryString);
00174   vtkGetStringMacro(QueryString);
00176 
00179   static vtkInformationDoubleKey* EPSILON();
00180 
00184   static vtkInformationIntegerKey* CONTAINING_CELLS();
00185 
00190   static vtkInformationIntegerKey* COMPONENT_NUMBER();
00191 
00193   static vtkInformationIntegerKey* INVERSE();
00194 
00197   static vtkInformationIntegerKey* PIXEL_COUNT();
00198 
00200   static vtkInformationObjectBaseKey* SOURCE();
00201 
00204   static vtkInformationIntegerKey* SOURCE_ID();
00205 
00207   static vtkInformationObjectBaseKey* PROP();
00208 
00211   static vtkInformationIntegerKey* PROP_ID();
00212 
00214   static vtkInformationIntegerKey* PROCESS_ID();
00215 
00217   static vtkInformationIntegerKey* COMPOSITE_INDEX();
00218 
00220 
00221   static vtkInformationIntegerKey* HIERARCHICAL_LEVEL();
00222   static vtkInformationIntegerKey* HIERARCHICAL_INDEX();
00224 
00228   static vtkInformationIntegerKey* INDEXED_VERTICES();
00229 
00232   void UnionSelectionList(vtkSelectionNode* other);
00233 
00237   void SubtractSelectionList(vtkSelectionNode* other);
00238 
00241   bool EqualProperties(vtkSelectionNode* other, bool fullcompare=true);
00242 
00243 //BTX
00244 protected:
00245   vtkSelectionNode();
00246   ~vtkSelectionNode();
00247 
00248   vtkInformation* Properties;
00249   vtkDataSetAttributes* SelectionData;
00250   char* QueryString;
00251 
00252 private:
00253   vtkSelectionNode(const vtkSelectionNode&);  // Not implemented.
00254   void operator=(const vtkSelectionNode&);  // Not implemented.
00255 //ETX
00256 };
00257 
00258 #endif