154 #ifndef vtkDataSetAttributes_h
155 #define vtkDataSetAttributes_h
157 #include "vtkCommonDataModelModule.h"
161 VTK_ABI_NAMESPACE_BEGIN
218 HIGHERORDERDEGREES = 10,
237 HIGHCONNECTIVITYCELL = 2,
238 LOWCONNECTIVITYCELL = 4,
608 this->CopyAllocate(pd, sze, ext, 0);
687 this->InterpolateAllocate(pd, sze, ext, 0);
774 vtkIdType ext = 1000,
int shallowCopyArrays = 0,
bool createNewArrays =
true);
781 int AttributeIndices[NUM_ATTRIBUTES];
782 int CopyAttributeFlags[ALLCOPY][NUM_ATTRIBUTES];
788 static const int NumberOfAttributeComponents[NUM_ATTRIBUTES];
789 static const int AttributeLimits[NUM_ATTRIBUTES];
790 static const char AttributeNames[NUM_ATTRIBUTES][19];
791 static const char LongAttributeNames[NUM_ATTRIBUTES][42];
794 static int CheckNumberOfComponents(
vtkAbstractArray* da,
int attributeType);
804 VTK_ABI_NAMESPACE_END
Abstract superclass for all arrays.
abstract superclass for arrays of numeric data
helps manage arrays from multiple vtkDataSetAttributes.
represent and manipulate attribute data in a dataset
vtkDataArray * GetScalars(const char *name)
If the string is nullptr or empty, calls the alternate method of the same name (that takes no paramet...
vtkTypeBool GetCopyPedigreeIds(int ctype=ALLCOPY)
static const char * GhostArrayName()
void PassData(vtkFieldData *fd) override
Pass entire arrays of input data through to output.
virtual void Update()
Attributes have a chance to bring themselves up to date; right now this is ignored.
vtkDataArray * GetTensors()
Set/Get the tensor data.
int SetActiveTangents(const char *name)
Set/get the tangent data.
int SetGlobalIds(vtkDataArray *da)
Set/Get the global id data.
void InterpolateEdge(vtkDataSetAttributes *fromPd, vtkIdType toId, vtkIdType p1, vtkIdType p2, double t)
Interpolate data from the two points p1,p2 (forming an edge) and an interpolation factor,...
void CopyAllocate(vtkDataSetAttributes *pd, vtkIdType sze, vtkIdType ext, int shallowCopyArrays)
Allocates point data for point-by-point (or cell-by-cell) copy operation.
vtkDataArray * GetNormals(const char *name)
If the string is nullptr or empty, calls the alternate method of the same name (that takes no paramet...
void Initialize() override
Initialize all of the object's data to nullptr Also, clear the copy flags.
int GetCopyAttribute(int index, int ctype)
Get the attribute copy flag for copy operation ctype of attribute index.
vtkDataArray * GetVectors(const char *name)
If the string is nullptr or empty, calls the alternate method of the same name (that takes no paramet...
vtkFieldData::BasicIterator RequiredArrays
vtkDataArray * GetRationalWeights()
Set/Get the rational weights data.
vtkTypeBool GetCopyScalars(int ctype=ALLCOPY)
vtkDataArray * GetProcessIds()
Set/Get the process id data.
int SetActiveAttribute(int index, int attributeType)
Make the array with the given index the active attribute.
void SetCopyAttribute(int index, int value, int ctype=ALLCOPY)
Turn on/off the copying of attribute data.
int SetActiveProcessIds(const char *name)
Set/Get the process id data.
~vtkDataSetAttributes() override
int SetHigherOrderDegrees(vtkDataArray *da)
Set/Get the rational degrees data.
int SetActiveNormals(const char *name)
Set/get the normal data.
void SetCopyNormals(vtkTypeBool i, int ctype=ALLCOPY)
Turn on/off the copying of attribute data.
void InterpolateAllocate(vtkDataSetAttributes *pd, vtkIdType sze=0, vtkIdType ext=1000)
Initialize point interpolation method.
void CopyData(vtkDataSetAttributes *fromPd, vtkIdList *fromIds, vtkIdType destStartId=0)
Copy the attribute data from one id to another.
int SetActiveHigherOrderDegrees(const char *name)
Set/Get the rational degrees data.
int SetScalars(vtkDataArray *da)
Set/Get the scalar data.
vtkAbstractArray * GetAbstractAttribute(int attributeType)
Return an attribute given the attribute type (see vtkDataSetAttributes::AttributeTypes).
vtkDataArray * GetTangents(const char *name)
If the string is nullptr or empty, calls the alternate method of the same name (that takes no paramet...
void SetCopyTCoords(vtkTypeBool i, int ctype=ALLCOPY)
Turn on/off the copying of attribute data.
void InterpolatePoint(vtkDataSetAttributes::FieldList &list, vtkDataSetAttributes *fromPd, int idx, vtkIdType toId, vtkIdList *ids, double *weights)
Interpolate data set attributes from other data set attributes given cell or point ids and associated...
vtkAbstractArray * GetPedigreeIds(const char *name)
If the string is nullptr or empty, calls the alternate method of the same name (that takes no paramet...
int SetActiveTCoords(const char *name)
Set/Get the texture coordinate data.
vtkDataArray * GetTensors(const char *name)
If the string is nullptr or empty, calls the alternate method of the same name (that takes no paramet...
void SetCopyTangents(vtkTypeBool i, int ctype=ALLCOPY)
Turn on/off the copying of attribute data.
vtkTypeBool GetCopyVectors(int ctype=ALLCOPY)
vtkTypeBool GetCopyNormals(int ctype=ALLCOPY)
void CopyTuples(vtkAbstractArray *fromData, vtkAbstractArray *toData, vtkIdList *fromIds, vtkIdList *toIds)
Copy a tuple (or set of tuples) of data from one data array to another.
void InterpolatePoint(vtkDataSetAttributes *fromPd, vtkIdType toId, vtkIdList *ids, double *weights)
Interpolate data set attributes from other data set attributes given cell or point ids and associated...
void InterpolateAllocate(vtkDataSetAttributes::FieldList &list, vtkIdType sze=0, vtkIdType ext=1000)
A special form of InterpolateAllocate() to be used with FieldLists.
void SetCopyPedigreeIds(vtkTypeBool i, int ctype=ALLCOPY)
Turn on/off the copying of attribute data.
void InitializeFields() override
Initialize all of the object's data to nullptr.
int SetActiveGlobalIds(const char *name)
Set/Get the global id data.
void SetupForCopy(vtkDataSetAttributes *pd)
Create a mapping between the input attributes and this object so that methods like CopyData() and Cop...
int SetActiveScalars(const char *name)
Set/Get the scalar data.
void CopyData(vtkDataSetAttributes *fromPd, vtkIdType dstStart, vtkIdType n, vtkIdType srcStart)
Copy n consecutive attributes starting at srcStart from fromPd to this container, starting at the dst...
vtkDataArray * GetNormals()
Set/get the normal data.
vtkDataArray * GetHigherOrderDegrees(const char *name)
If the string is nullptr or empty, calls the alternate method of the same name (that takes no paramet...
int SetNormals(vtkDataArray *da)
Set/get the normal data.
void InterpolateTime(vtkDataSetAttributes *from1, vtkDataSetAttributes *from2, vtkIdType id, double t)
Interpolate data from the same id (point or cell) at different points in time (parameter t).
void CopyData(vtkDataSetAttributes::FieldList &list, vtkDataSetAttributes *dsa, int idx, vtkIdType fromId, vtkIdType toId)
Special forms of CopyData() to be used with FieldLists.
void CopyAllOn(int ctype=ALLCOPY) override
Turn on/off the copying of attribute data.
vtkDataArray * GetProcessIds(const char *name)
If the string is nullptr or empty, calls the alternate method of the same name (that takes no paramet...
void SetCopyScalars(vtkTypeBool i, int ctype=ALLCOPY)
Turn on/off the copying of attribute data.
void CopyTuple(vtkAbstractArray *fromData, vtkAbstractArray *toData, vtkIdType fromId, vtkIdType toId)
Copy a tuple (or set of tuples) of data from one data array to another.
vtkDataArray * GetGlobalIds(const char *name)
If the string is nullptr or empty, calls the alternate method of the same name (that takes no paramet...
void InternalCopyAllocate(vtkDataSetAttributes *pd, int ctype, vtkIdType sze=0, vtkIdType ext=1000, int shallowCopyArrays=0, bool createNewArrays=true)
int IsArrayAnAttribute(int idx)
Determine whether a data array of index idx is considered a data set attribute (i....
vtkTypeBool GetCopyTangents(int ctype=ALLCOPY)
void CopyData(vtkDataSetAttributes *fromPd, vtkIdType fromId, vtkIdType toId)
Copy the attribute data from one id to another.
int SetActivePedigreeIds(const char *name)
Set/Get the pedigree id data.
int SetProcessIds(vtkDataArray *da)
Set/Get the process id data.
static vtkDataSetAttributes * ExtendedNew()
int SetActiveRationalWeights(const char *name)
Set/Get the rational weights data.
vtkDataArray * GetGlobalIds()
Set/Get the global id data.
void RemoveArray(int index) override
Remove an array (with the given index) from the list of arrays.
vtkTypeBool GetCopyRationalWeights(int ctype=ALLCOPY)
vtkTypeBool GetCopyHigherOrderDegrees(int ctype=ALLCOPY)
void CopyTuples(vtkAbstractArray *fromData, vtkAbstractArray *toData, vtkIdType dstStart, vtkIdType n, vtkIdType srcStart)
Copy a tuple (or set of tuples) of data from one data array to another.
void CopyData(vtkDataSetAttributes::FieldList &list, vtkDataSetAttributes *dsa, int idx, vtkIdType dstStart, vtkIdType n, vtkIdType srcStart)
vtkTypeBool GetCopyGlobalIds(int ctype=ALLCOPY)
vtkTypeBool GetCopyTCoords(int ctype=ALLCOPY)
void CopyStructuredData(vtkDataSetAttributes *inDsa, const int *inExt, const int *outExt, bool setSize=true)
This method is used to copy data arrays in images.
static vtkDataSetAttributes * New()
Construct object with copying turned on for all data.
static const char * GetAttributeTypeAsString(int attributeType)
Given an integer attribute type, this static method returns a string type for the attribute (i....
vtkDataArray * GetVectors()
Set/Get the vector data.
void CopyAllocate(vtkDataSetAttributes::FieldList &list, vtkIdType sze=0, vtkIdType ext=1000)
A special form of CopyAllocate() to be used with FieldLists.
void CopyAllocate(vtkDataSetAttributes *pd, vtkIdType sze=0, vtkIdType ext=1000)
Allocates point data for point-by-point (or cell-by-cell) copy operation.
static const char * GetLongAttributeTypeAsString(int attributeType)
Given an integer attribute type, this static method returns a string type for the attribute (i....
vtkDataArray * GetRationalWeights(const char *name)
If the string is nullptr or empty, calls the alternate method of the same name (that takes no paramet...
void DeepCopy(vtkFieldData *pd) override
Deep copy of data (i.e., create new data arrays and copy from input data).
int SetRationalWeights(vtkDataArray *da)
Set/Get the rational weights data.
void ShallowCopy(vtkFieldData *pd) override
Shallow copy of data (i.e., use reference counting).
void GetAttributeIndices(int *indexArray)
Get the field data array indices corresponding to scalars, vectors, tensors, etc.
vtkDataArray * GetTCoords(const char *name)
If the string is nullptr or empty, calls the alternate method of the same name (that takes no paramet...
void SetCopyRationalWeights(vtkTypeBool i, int ctype=ALLCOPY)
Turn on/off the copying of attribute data.
vtkDataArray * GetTangents()
Set/get the tangent data.
void SetCopyTensors(vtkTypeBool i, int ctype=ALLCOPY)
Turn on/off the copying of attribute data.
vtkAbstractArray * GetPedigreeIds()
Set/Get the pedigree id data.
int SetActiveAttribute(const char *name, int attributeType)
Make the array with the given name the active attribute.
vtkDataArray * GetTCoords()
Set/Get the texture coordinate data.
int SetTCoords(vtkDataArray *da)
Set/Get the texture coordinate data.
vtkTypeBool GetCopyProcessIds(int ctype=ALLCOPY)
vtkDataArray * GetHigherOrderDegrees()
Set/Get the rational degrees data.
void SetCopyHigherOrderDegrees(vtkTypeBool i, int ctype=ALLCOPY)
Turn on/off the copying of attribute data.
vtkDataArray * GetScalars()
Set/Get the scalar data.
void InterpolateAllocate(vtkDataSetAttributes *pd, vtkIdType sze, vtkIdType ext, int shallowCopyArrays)
Initialize point interpolation method.
int SetPedigreeIds(vtkAbstractArray *da)
Set/Get the pedigree id data.
vtkTypeBool GetCopyTensors(int ctype=ALLCOPY)
void CopyData(vtkDataSetAttributes *fromPd, vtkIdList *fromIds, vtkIdList *toIds)
Copy the attribute data from one id to another.
void SetCopyProcessIds(vtkTypeBool i, int ctype=ALLCOPY)
Turn on/off the copying of attribute data.
int SetActiveVectors(const char *name)
Set/Get the vector data.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetCopyGlobalIds(vtkTypeBool i, int ctype=ALLCOPY)
Turn on/off the copying of attribute data.
void CopyAllOff(int ctype=ALLCOPY) override
Turn on/off the copying of attribute data.
int SetTangents(vtkDataArray *da)
Set/get the tangent data.
int SetActiveTensors(const char *name)
Set/Get the tensor data.
void SetCopyVectors(vtkTypeBool i, int ctype=ALLCOPY)
Turn on/off the copying of attribute data.
int SetVectors(vtkDataArray *da)
Set/Get the vector data.
int SetTensors(vtkDataArray *da)
Set/Get the tensor data.
vtkDataArray * GetAttribute(int attributeType)
Return an attribute given the attribute type (see vtkDataSetAttributes::AttributeTypes).
int SetAttribute(vtkAbstractArray *aa, int attributeType)
Set an array to use as the given attribute type (i.e., vtkDataSetAttributes::SCALAR,...
represent and manipulate fields of data
virtual void RemoveArray(const char *name)
Remove an array (with the given name) from the list of arrays.
list of point or cell ids
a simple class to control print indentation
map scalar values into colors via a lookup table