Skip to content

DataSetAttributes ​

Introduction ​

vtkDataSetAttributes is a class that is used to represent and manipulate attribute data (e.g., scalars, vectors, normals, texture coordinates, tensors, global ids, pedigree ids, and field data).

This adds to vtkFieldData the ability to pick one of the arrays from the field as the currently active array for each attribute type. In other words, you pick one array to be called "THE" Scalars, and then filters down the pipeline will treat that array specially. For example vtkContourFilter will contour "THE" Scalar array unless a different array is asked for.

Additionally vtkDataSetAttributes provides methods that filters call to pass data through, copy data into, and interpolate from Fields. PassData passes entire arrays from the source to the destination. Copy passes through some subset of the tuples from the source to the destination. Interpolate interpolates from the chosen tuple(s) in the source data, using the provided weights, to produce new tuples in the destination. Each attribute type has pass, copy and interpolate "copy" flags that can be set in the destination to choose which attribute arrays will be transferred from the source to the destination.

Finally this class provides a mechanism to determine which attributes a group of sources have in common, and to copy tuples from a source into the destination, for only those attributes that are held by all.

Methods ​

checkNumberOfComponents ​

ArgumentTypeRequiredDescription
xYes

copyGlobalIdsOff ​

copyGlobalIdsOn ​

copyNormalsOff ​

copyNormalsOn ​

copyPedigreeIdsOff ​

copyPedigreeIdsOn ​

copyScalarsOff ​

copyScalarsOn ​

copyTCoordsOff ​

copyTCoordsOn ​

copyTensorsOff ​

copyTensorsOn ​

copyVectorsOff ​

copyVectorsOn ​

extend ​

Method used to decorate a given object (publicAPI+model) with vtkDataSetAttributes characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIDataSetAttributesInitialValuesNo(default: {})

getActiveAttribute ​

ArgumentTypeRequiredDescription
attTypestringYes

getActiveGlobalIds ​

getActiveNormals ​

getActivePedigreeIds ​

getActiveScalars ​

getActiveTCoords ​

getActiveTensors ​

getActiveVectors ​

getAttributes ​

Get a list of attribute names that the given array is for this vtkDataSetAttributes.

ArgumentTypeRequiredDescription
arrvtkDataArrayYes

Returns ​

TypeDescription
Array[String]

getGlobalIds ​

Get the global id data.

getNormals ​

Get the normal data.

getPedigreeIds ​

Get the pedigree id data.

getScalars ​

Get the scalar data.

getTCoords ​

Get the texture coordinate data.

getTensors ​

Get the tensors data.

getVectors ​

Get the vectors data.

initializeAttributeCopyFlags ​

Called when initialize() is called.

newInstance ​

Method used to create a new instance of vtkDataSetAttributes.

ArgumentTypeRequiredDescription
initialValuesIDataSetAttributesInitialValuesNofor pre-setting some of its content

removeAllArrays ​

Override to allow proper handling of active attributes

removeArray ​

Override to allow proper handling of active attributes

ArgumentTypeRequiredDescription
arrayNamestringYesThe name of the array.

removeArrayByIndex ​

Override to allow proper handling of active attributes

ArgumentTypeRequiredDescription
arrayIdxNumberYesThe index of the array.

setActiveAttributeByIndex ​

ArgumentTypeRequiredDescription
arrayIdxNumberYes
uncleanAttTypeYes

setActiveAttributeByName ​

ArgumentTypeRequiredDescription
arrayNamestringYes
attTypeYes

setActiveGlobalIds ​

ArgumentTypeRequiredDescription
arrayNamestringYesThe name of the array to activate.

setActiveGlobalIds ​

ArgumentTypeRequiredDescription
activeGlobalIdsNumberYes

setActiveNormals ​

ArgumentTypeRequiredDescription
arrayNamestringYesThe name of the array to activate.

setActiveNormals ​

ArgumentTypeRequiredDescription
activeNormalsNumberYes

setActivePedigreeIds ​

ArgumentTypeRequiredDescription
arrayNamestringYesThe name of the array to activate.

setActivePedigreeIds ​

ArgumentTypeRequiredDescription
activePedigreeIdsNumberYes

setActiveScalars ​

ArgumentTypeRequiredDescription
arrayNamestringYesThe name of the array to activate.

setActiveScalars ​

ArgumentTypeRequiredDescription
activeScalarsNumberYes

setActiveTCoords ​

ArgumentTypeRequiredDescription
arrayNamestringYesThe name of the array to activate.

setActiveTCoords ​

ArgumentTypeRequiredDescription
activeTCoordsNumberYes

setActiveTensors ​

ArgumentTypeRequiredDescription
arrayNamestringYesThe name of the array to activate.

setActiveTensors ​

ArgumentTypeRequiredDescription
activeTensorsNumberYes

setActiveVectors ​

ArgumentTypeRequiredDescription
arrayNamestringYesThe name of the array to activate.

setActiveVectors ​

ArgumentTypeRequiredDescription
activeVectorsNumberYes

setAttribute ​

ArgumentTypeRequiredDescription
arrYes
uncleanAttTypeYes

setGlobalIds ​

Set the global id data.

ArgumentTypeRequiredDescription
globalIdsvtkDataArrayYesThe global id data.

setNormals ​

Set the normal data.

ArgumentTypeRequiredDescription
normalsvtkDataArrayYesThe normal data.

setPedigreeIds ​

Set the pedigree id data.

ArgumentTypeRequiredDescription
pedigreeidsvtkDataArrayYesThe pedigree id data.

setScalars ​

Set the scalar data.

ArgumentTypeRequiredDescription
scalarsvtkDataArrayYesThe scalar data.

setTCoords ​

Set the texture coordinate data.

ArgumentTypeRequiredDescription
tcoordsvtkDataArrayYesThe texture coordinate data.

setTensors ​

Set the tensor data.

ArgumentTypeRequiredDescription
tensorsvtkDataArrayYesThe tensor data.

setVectors ​

Set the vector data.

ArgumentTypeRequiredDescription
vectorsvtkDataArrayYesThe vector data.

shallowCopy ​

Try to copy the state of the other to ourselves by just using references.

ArgumentTypeRequiredDescription
otherYesinstance to copy the reference from
debugYes(default: false) if true feedback will be provided when mismatch happen