1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
|
/*=========================================================================
Program: ParaView
Module: vtkPVDataSetAttributesInformation.h
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkPVDataSetAttributesInformation
* @brief List of array info
*
* Information associated with vtkDataSetAttributes object (i.e point data).
* This object does not have any user interface. It is created and destroyed
* on the fly as needed. It may be possible to add features of this object
* to vtkDataSetAttributes. That would eliminate all of the "Information"
* in ParaView.
*/
#ifndef vtkPVDataSetAttributesInformation_h
#define vtkPVDataSetAttributesInformation_h
#include "vtkDataSetAttributes.h" // needed for NUM_ATTRIBUTES
#include "vtkPVClientServerCoreCoreModule.h" //needed for exports
#include "vtkPVInformation.h"
class vtkDataSetAttributes;
class vtkFieldData;
class vtkPVArrayInformation;
class vtkGenericAttributeCollection;
class VTKPVCLIENTSERVERCORECORE_EXPORT vtkPVDataSetAttributesInformation : public vtkPVInformation
{
public:
static vtkPVDataSetAttributesInformation* New();
vtkTypeMacro(vtkPVDataSetAttributesInformation, vtkPVInformation);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
//@{
/**
* Returns the field association to which the instance corresponds to.
* Returned value can be vtkDataObject::POINT, vtkDataObject::CELL,
* vtkDataObject::FIELD, etc i.e. vtkDataObject::FieldAssociations or
* vtkDataObject::AttributeTypes.
*/
vtkGetMacro(FieldAssociation, int);
vtkSetMacro(FieldAssociation, int);
//@}
//@{
/**
* Transfer information about a single vtk data object into
* this object.
*/
void CopyFromDataSetAttributes(vtkDataSetAttributes* data);
void DeepCopy(vtkPVDataSetAttributesInformation* info);
//@}
void CopyFromFieldData(vtkFieldData* data);
void CopyFromGenericAttributesOnPoints(vtkGenericAttributeCollection* data);
void CopyFromGenericAttributesOnCells(vtkGenericAttributeCollection* data);
void CopyFromGenericAttributes(vtkGenericAttributeCollection* data, int centering);
//@{
/**
* Intersect information of argument with information currently
* in this object. Arrays must be in both
* (same name and number of components)to be in final.
*/
void AddInformation(vtkPVDataSetAttributesInformation* info);
virtual void AddInformation(vtkPVInformation* info) VTK_OVERRIDE;
//@}
/**
* Remove all infommation. next add will be like a copy.
*/
void Initialize();
//@{
/**
* Access to information.
*/
int GetNumberOfArrays() const;
// Because not all the arrays have to be the same length:
int GetMaximumNumberOfTuples() const;
vtkPVArrayInformation* GetArrayInformation(int idx) const;
vtkPVArrayInformation* GetArrayInformation(const char* name) const;
//@}
/**
* For getting default scalars ... (vtkDataSetAttributes::SCALARS).
*/
vtkPVArrayInformation* GetAttributeInformation(int attributeType);
/**
* Mimicks data set attribute call. Returns -1 if array (of index) is
* not a standard attribute. Returns attribute type otherwise.
*/
int IsArrayAnAttribute(int arrayIndex);
//@{
/**
* Manage a serialized version of the information.
*/
virtual void CopyToStream(vtkClientServerStream*) VTK_OVERRIDE;
virtual void CopyFromStream(const vtkClientServerStream*) VTK_OVERRIDE;
//@}
protected:
vtkPVDataSetAttributesInformation();
~vtkPVDataSetAttributesInformation();
// Standard cell attributes.
int FieldAssociation;
private:
vtkPVDataSetAttributesInformation(const vtkPVDataSetAttributesInformation&) VTK_DELETE_FUNCTION;
void operator=(const vtkPVDataSetAttributesInformation&) VTK_DELETE_FUNCTION;
class vtkInternals;
vtkInternals* Internals;
};
#endif
|