Skip to content

StringArray ​

Introduction ​

Points and cells may sometimes have associated data that are stored as strings, e.g. labels for information visualization projects. This class provides a clean way to store and access those strings.

Methods ​

extend ​

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

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

getComponent ​

Get the data component at the location specified by tupleIdx and compIdx.

ArgumentTypeRequiredDescription
tupleIdxNumberYes
compIdxNumberNo

getData ​

getDataType ​

getName ​

getNumberOfComponents ​

getNumberOfTuples ​

getNumberOfValues ​

getTuple ​

ArgumentTypeRequiredDescription
idxNumberYes
tupleToFillArray[String]No

getTupleLocation ​

ArgumentTypeRequiredDescription
idxNumberNo

getValue ​

Get the value at a flat array index.

newClone ​

newInstance ​

Method used to create a new instance of vtkStringArray

ArgumentTypeRequiredDescription
initialValuesIStringArrayInitialValuesYesfor pre-setting some of its content

setComponent ​

Set the data component at the location specified by tupleIdx and compIdx to value. Note that i is less than NumberOfTuples and j is less than NumberOfComponents. Make sure enough memory has been allocated (use SetNumberOfTuples() and SetNumberOfComponents()).

ArgumentTypeRequiredDescription
tupleIdxNumberYes
compIdxNumberYes
valueStringYes

setData ​

ArgumentTypeRequiredDescription
arrayArray[String]Yes
numberOfComponentsNumberYes

setName ​

setValue ​

Set the value at a flat array index.