VTK: vtkArray Class Reference

| VTK 9.3.1

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
vtkArray Class Referenceabstract

Abstract interface for N-dimensional arrays. More...

`#include <vtkArray.h>`

Inheritance diagram for vtkArray:
[legend]
Collaboration diagram for vtkArray:
[legend]

## Public Types
enum | { DENSE = 0 , SPARSE = 1 }
typedef vtkObject | Superclass
typedef vtkArrayExtents::CoordinateT | CoordinateT
typedef vtkArrayExtents::DimensionT | DimensionT
typedef vtkArrayExtents::SizeT | SizeT

## Public Member Functions
virtual vtkTypeBool | IsA (const char *type)
| Return 1 if this class is the same type of (or a subclass of) the named class. More...
vtkArray * | NewInstance () const
void | PrintSelf (ostream &os, vtkIndent indent) override
| Methods invoked by print to print information about the object including superclasses. More...
virtual bool | IsDense ()=0
| Returns true iff the underlying array storage is "dense", i.e. More...
vtkArrayRange | GetExtent (DimensionT dimension)
| Returns the extent (valid coordinate range) along the given dimension. More...
virtual const vtkArrayExtents & | GetExtents ()=0
| Returns the extents (the number of dimensions and size along each dimension) of the array. More...
DimensionT | GetDimensions ()
| Returns the number of dimensions stored in the array. More...
SizeT | GetSize ()
| Returns the number of values stored in the array. More...
virtual SizeT | GetNonNullSize ()=0
| Returns the number of non-null values stored in the array. More...
void | SetName (const vtkStdString &name)
| Sets the array name. More...
vtkStdString | GetName ()
| Returns the array name. More...
void | SetDimensionLabel (DimensionT i, const vtkStdString &label)
| Sets the label for the i-th array dimension. More...
vtkStdString | GetDimensionLabel (DimensionT i)
| Returns the label for the i-th array dimension. More...
virtual void | GetCoordinatesN (SizeT n, vtkArrayCoordinates &coordinates)=0
| Returns the coordinates of the n-th value in the array, where n is in the range [0, GetNonNullSize()). More...
virtual vtkVariant | GetVariantValueN (SizeT n)=0
| Returns the n-th value stored in the array, where n is in the range [0, GetNonNullSize()). More...
virtual void | SetVariantValueN (SizeT n, const vtkVariant &value)=0
| Overwrites the n-th value stored in the array, where n is in the range [0, GetNonNullSize()). More...
virtual vtkArray * | DeepCopy ()=0
| Returns a new array that is a deep copy of this array. More...
void | Resize (CoordinateT i)
| Resizes the array to the given extents (number of dimensions and size of each dimension). More...
void | Resize (CoordinateT i, CoordinateT j)
| Resizes the array to the given extents (number of dimensions and size of each dimension). More...
void | Resize (CoordinateT i, CoordinateT j, CoordinateT k)
| Resizes the array to the given extents (number of dimensions and size of each dimension). More...
void | Resize (const vtkArrayRange &i)
| Resizes the array to the given extents (number of dimensions and size of each dimension). More...
void | Resize (const vtkArrayRange &i, const vtkArrayRange &j)
| Resizes the array to the given extents (number of dimensions and size of each dimension). More...
void | Resize (const vtkArrayRange &i, const vtkArrayRange &j, const vtkArrayRange &k)
| Resizes the array to the given extents (number of dimensions and size of each dimension). More...
void | Resize (const vtkArrayExtents &extents)
| Resizes the array to the given extents (number of dimensions and size of each dimension). More...
vtkVariant | GetVariantValue (CoordinateT i)
| Returns the value stored in the array at the given coordinates. More...
vtkVariant | GetVariantValue (CoordinateT i, CoordinateT j)
| Returns the value stored in the array at the given coordinates. More...
vtkVariant | GetVariantValue (CoordinateT i, CoordinateT j, CoordinateT k)
| Returns the value stored in the array at the given coordinates. More...
virtual vtkVariant | GetVariantValue (const vtkArrayCoordinates &coordinates)=0
| Returns the value stored in the array at the given coordinates. More...
void | SetVariantValue (CoordinateT i, const vtkVariant &value)
| Overwrites the value stored in the array at the given coordinates. More...
void | SetVariantValue (CoordinateT i, CoordinateT j, const vtkVariant &value)
| Overwrites the value stored in the array at the given coordinates. More...
void | SetVariantValue (CoordinateT i, CoordinateT j, CoordinateT k, const vtkVariant &value)
| Overwrites the value stored in the array at the given coordinates. More...
virtual void | SetVariantValue (const vtkArrayCoordinates &coordinates, const vtkVariant &value)=0
| Overwrites the value stored in the array at the given coordinates. More...
virtual void | CopyValue (vtkArray *source, const vtkArrayCoordinates &source_coordinates, const vtkArrayCoordinates &target_coordinates)=0
| Overwrites a value with a value retrieved from another array. More...
virtual void | CopyValue (vtkArray *source, SizeT source_index, const vtkArrayCoordinates &target_coordinates)=0
| Overwrites a value with a value retrieved from another array. More...
virtual void | CopyValue (vtkArray *source, const vtkArrayCoordinates &source_coordinates, SizeT target_index)=0
| Overwrites a value with a value retrieved from another array. More...
Public Member Functions inherited from vtkObject
| vtkBaseTypeMacro (vtkObject, vtkObjectBase)
virtual void | DebugOn ()
| Turn debugging output on. More...
virtual void | DebugOff ()
| Turn debugging output off. More...
bool | GetDebug ()
| Get the value of the debug flag. More...
void | SetDebug (bool debugFlag)
| Set the value of the debug flag. More...
virtual void | Modified ()
| Update the modification time for this object. More...
virtual vtkMTimeType | GetMTime ()
| Return this object's modified time. More...
void | PrintSelf (ostream &os, vtkIndent indent) override
| Methods invoked by print to print information about the object including superclasses. More...
void | RemoveObserver (unsigned long tag)
void | RemoveObservers (unsigned long event)
void | RemoveObservers (const char *event)
void | RemoveAllObservers ()
vtkTypeBool | HasObserver (unsigned long event)
vtkTypeBool | HasObserver (const char *event)
vtkTypeBool | InvokeEvent (unsigned long event)
vtkTypeBool | InvokeEvent (const char *event)
std::string | GetObjectDescription () const override
| The object description printed in messages and PrintSelf output. More...
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f)
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
vtkCommand * | GetCommand (unsigned long tag)
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
void | RemoveObserver (vtkCommand *)
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
void | RemoveObservers (unsigned long event, vtkCommand *)
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
void | RemoveObservers (const char *event, vtkCommand *)
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
vtkTypeBool | HasObserver (unsigned long event, vtkCommand *)
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
vtkTypeBool | HasObserver (const char *event, vtkCommand *)
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
template<class U , class T >
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
| Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
template<class U , class T >
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
| Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
template<class U , class T >
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
| Allow user to set the AbortFlagOn() with the return value of the callback method. More...
vtkTypeBool | InvokeEvent (unsigned long event, void *callData)
| This method invokes an event and return whether the event was aborted or not. More...
vtkTypeBool | InvokeEvent (const char *event, void *callData)
| This method invokes an event and return whether the event was aborted or not. More...
virtual void | SetObjectName (const std::string &objectName)
| Set/get the name of this object for reporting purposes. More...
virtual std::string | GetObjectName () const
| Set/get the name of this object for reporting purposes. More...
Public Member Functions inherited from vtkObjectBase
const char * | GetClassName () const
| Return the class name as a string. More...
virtual vtkIdType | GetNumberOfGenerationsFromBase (const char *name)
| Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). More...
virtual void | Delete ()
| Delete a VTK object. More...
virtual void | FastDelete ()
| Delete a reference to this object. More...
void | InitializeObjectBase ()
void | Print (ostream &os)
| Print an object to an ostream. More...
virtual void | Register (vtkObjectBase *o)
| Increase the reference count (mark as used by another object). More...
virtual void | UnRegister (vtkObjectBase *o)
| Decrease the reference count (release by another object). More...
int | GetReferenceCount ()
| Return the current reference count of this object. More...
void | SetReferenceCount (int)
| Sets the reference count. More...
bool | GetIsInMemkind () const
| A local state flag that remembers whether this object lives in the normal or extended memory space. More...
virtual void | PrintHeader (ostream &os, vtkIndent indent)
| Methods invoked by print to print information about the object including superclasses. More...
virtual void | PrintTrailer (ostream &os, vtkIndent indent)
| Methods invoked by print to print information about the object including superclasses. More...
virtual bool | UsesGarbageCollector () const
| Indicate whether the class uses `vtkGarbageCollector` or not. More...

## Static Public Member Functions
static vtkTypeBool | IsTypeOf (const char *type)
static vtkArray * | SafeDownCast (vtkObjectBase *o)
static vtkArray * | CreateArray (int StorageType, int ValueType)
| Creates a new array where StorageType is one of vtkArray::DENSE or vtkArray::SPARSE, and ValueType is one of VTK_CHAR, VTK_UNSIGNED_CHAR, VTK_SHORT, VTK_UNSIGNED_SHORT, VTK_INT, VTK_UNSIGNED_INT, VTK_LONG, VTK_UNSIGNED_LONG, VTK_DOUBLE, VTK_ID_TYPE, or VTK_STRING. More...
Static Public Member Functions inherited from vtkObject
static vtkObject * | New ()
| Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
static void | BreakOnError ()
| This method is called when vtkErrorMacro executes. More...
static void | SetGlobalWarningDisplay (vtkTypeBool val)
| This is a global flag that controls whether any debug, warning or error messages are displayed. More...
static void | GlobalWarningDisplayOn ()
| This is a global flag that controls whether any debug, warning or error messages are displayed. More...
static void | GlobalWarningDisplayOff ()
| This is a global flag that controls whether any debug, warning or error messages are displayed. More...
static vtkTypeBool | GetGlobalWarningDisplay ()
| This is a global flag that controls whether any debug, warning or error messages are displayed. More...
Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool | IsTypeOf (const char *name)
| Return 1 if this class type is the same type of (or a subclass of) the named class. More...
static vtkIdType | GetNumberOfGenerationsFromBaseType (const char *name)
| Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). More...
static vtkObjectBase * | New ()
| Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
static void | SetMemkindDirectory (const char *directoryname)
| The name of a directory, ideally mounted -o dax, to memory map an extended memory space within. More...
static bool | GetUsingMemkind ()
| A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space. More...

## Protected Member Functions
virtual vtkObjectBase * | NewInstanceInternal () const
| vtkArray ()
| ~vtkArray () override
Protected Member Functions inherited from vtkObject
| vtkObject ()
| ~vtkObject () override
void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
| These methods allow a command to exclusively grab all events. More...
void | InternalReleaseFocus ()
| These methods allow a command to exclusively grab all events. More...
Protected Member Functions inherited from vtkObjectBase
| vtkObjectBase ()
virtual | ~vtkObjectBase ()
virtual void | ReportReferences (vtkGarbageCollector *)
| vtkObjectBase (const vtkObjectBase &)
void | operator= (const vtkObjectBase &)

## Additional Inherited Members
Static Protected Member Functions inherited from vtkObjectBase
static vtkMallocingFunction | GetCurrentMallocFunction ()
static vtkReallocingFunction | GetCurrentReallocFunction ()
static vtkFreeingFunction | GetCurrentFreeFunction ()
static vtkFreeingFunction | GetAlternateFreeFunction ()
Protected Attributes inherited from vtkObject
bool | Debug
vtkTimeStamp | MTime
vtkSubjectHelper * | SubjectHelper
std::string | ObjectName
Protected Attributes inherited from vtkObjectBase
std::atomic< int32_t > | ReferenceCount
vtkWeakPointerBase ** | WeakPointers

## Detailed Description

Abstract interface for N-dimensional arrays.

vtkArray is the root of a hierarchy of arrays that can be used to store data with any number of dimensions. It provides an abstract interface for retrieving and setting array attributes that are independent of the type of values stored in the array - such as the number of dimensions, extents along each dimension, and number of values stored in the array.

To get and set array values, the vtkTypedArray template class derives from vtkArray and provides type-specific methods for retrieval and update.

Two concrete derivatives of vtkTypedArray are provided at the moment: vtkDenseArray and vtkSparseArray, which provide dense and sparse storage for arbitrary-dimension data, respectively. Toolkit users can create their own concrete derivatives that implement alternative storage strategies, such as compressed-sparse-row, etc. You could also create an array that provided read-only access to 'virtual' data, such as an array that returned a Fibonacci sequence, etc.

See also
  vtkTypedArray, vtkDenseArray, vtkSparseArray

Thanks:
  Developed by Timothy M. Shead (tshea.nosp@m.d@sa.nosp@m.ndia..nosp@m.gov) at Sandia National Laboratories.

Tests:
  vtkArray (Tests)

Definition at line 51 of file vtkArray.h.

## Member Typedef Documentation

## ◆ Superclass

typedef vtkObject vtkArray::Superclass

Definition at line 54 of file vtkArray.h.

## ◆ CoordinateT

typedef vtkArrayExtents::CoordinateT vtkArray::CoordinateT

Definition at line 57 of file vtkArray.h.

## ◆ DimensionT

typedef vtkArrayExtents::DimensionT vtkArray::DimensionT

Definition at line 58 of file vtkArray.h.

## ◆ SizeT

typedef vtkArrayExtents::SizeT vtkArray::SizeT

Definition at line 59 of file vtkArray.h.

## Member Enumeration Documentation

## ◆ anonymous enum

anonymous enum

Enumerator
DENSE | Used with CreateArray() to create dense arrays.
SPARSE | Used with CreateArray() to create sparse arrays.

Definition at line 61 of file vtkArray.h.

## Constructor & Destructor Documentation

## ◆ vtkArray()

vtkArray::vtkArray | ( |  | ) |
| protected

## ◆ ~vtkArray()

vtkArray::~vtkArray | ( |  | ) |
| overrideprotected

## Member Function Documentation

## ◆ IsTypeOf()

static vtkTypeBool vtkArray::IsTypeOf | ( | const char * | type | ) |
| static

## ◆ IsA()

virtual vtkTypeBool vtkArray::IsA | ( | const char * | name | ) |
| virtual

Return 1 if this class is the same type of (or a subclass of) the named class.

Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObjectBase.

## ◆ SafeDownCast()

static vtkArray* vtkArray::SafeDownCast | ( | vtkObjectBase * | o | ) |
| static

## ◆ NewInstanceInternal()

virtual vtkObjectBase* vtkArray::NewInstanceInternal | ( |  | ) | const
| protectedvirtual

## ◆ NewInstance()

vtkArray* vtkArray::NewInstance | ( |  | ) | const

## ◆ PrintSelf()

void vtkArray::PrintSelf | ( | ostream & | os,
|  | vtkIndent | indent
| ) |  |
| overridevirtual

Methods invoked by print to print information about the object including superclasses.

Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObjectBase.

Reimplemented in vtkTypedArray< T >, vtkSparseArray< T >, and vtkDenseArray< T >.

## ◆ CreateArray()

static vtkArray* vtkArray::CreateArray | ( | int | StorageType,
|  | int | ValueType
| ) |  |
| static

Creates a new array where StorageType is one of vtkArray::DENSE or vtkArray::SPARSE, and ValueType is one of VTK_CHAR, VTK_UNSIGNED_CHAR, VTK_SHORT, VTK_UNSIGNED_SHORT, VTK_INT, VTK_UNSIGNED_INT, VTK_LONG, VTK_UNSIGNED_LONG, VTK_DOUBLE, VTK_ID_TYPE, or VTK_STRING.

The caller is responsible for the lifetime of the returned object.

## ◆ IsDense()

virtual bool vtkArray::IsDense | ( |  | ) |
| pure virtual

Returns true iff the underlying array storage is "dense", i.e.

that GetSize() and GetNonNullSize() will always return the same value. If not, the array is "sparse".

Implemented in vtkSparseArray< T >, and vtkDenseArray< T >.

## ◆ Resize() [1/7]

void vtkArray::Resize | ( | CoordinateT | i | ) |

Resizes the array to the given extents (number of dimensions and size of each dimension).

Note that concrete implementations of vtkArray may place constraints on the extents that they will store, so you cannot assume that GetExtents() will always return the same value passed to Resize().

The contents of the array are undefined after calling Resize() - you should initialize its contents accordingly. In particular, dimension-labels will be undefined, dense array values will be undefined, and sparse arrays will be empty.

## ◆ Resize() [2/7]

void vtkArray::Resize | ( | CoordinateT | i,
|  | CoordinateT | j
| ) |  |

Resizes the array to the given extents (number of dimensions and size of each dimension).

Note that concrete implementations of vtkArray may place constraints on the extents that they will store, so you cannot assume that GetExtents() will always return the same value passed to Resize().

The contents of the array are undefined after calling Resize() - you should initialize its contents accordingly. In particular, dimension-labels will be undefined, dense array values will be undefined, and sparse arrays will be empty.

## ◆ Resize() [3/7]

void vtkArray::Resize | ( | CoordinateT | i,
|  | CoordinateT | j,
|  | CoordinateT | k
| ) |  |

Resizes the array to the given extents (number of dimensions and size of each dimension).

Note that concrete implementations of vtkArray may place constraints on the extents that they will store, so you cannot assume that GetExtents() will always return the same value passed to Resize().

The contents of the array are undefined after calling Resize() - you should initialize its contents accordingly. In particular, dimension-labels will be undefined, dense array values will be undefined, and sparse arrays will be empty.

## ◆ Resize() [4/7]

void vtkArray::Resize | ( | const vtkArrayRange & | i | ) |

Resizes the array to the given extents (number of dimensions and size of each dimension).

Note that concrete implementations of vtkArray may place constraints on the extents that they will store, so you cannot assume that GetExtents() will always return the same value passed to Resize().

The contents of the array are undefined after calling Resize() - you should initialize its contents accordingly. In particular, dimension-labels will be undefined, dense array values will be undefined, and sparse arrays will be empty.

## ◆ Resize() [5/7]

void vtkArray::Resize | ( | const vtkArrayRange & | i,
|  | const vtkArrayRange & | j
| ) |  |

Resizes the array to the given extents (number of dimensions and size of each dimension).

Note that concrete implementations of vtkArray may place constraints on the extents that they will store, so you cannot assume that GetExtents() will always return the same value passed to Resize().

The contents of the array are undefined after calling Resize() - you should initialize its contents accordingly. In particular, dimension-labels will be undefined, dense array values will be undefined, and sparse arrays will be empty.

## ◆ Resize() [6/7]

void vtkArray::Resize | ( | const vtkArrayRange & | i,
|  | const vtkArrayRange & | j,
|  | const vtkArrayRange & | k
| ) |  |

Resizes the array to the given extents (number of dimensions and size of each dimension).

Note that concrete implementations of vtkArray may place constraints on the extents that they will store, so you cannot assume that GetExtents() will always return the same value passed to Resize().

The contents of the array are undefined after calling Resize() - you should initialize its contents accordingly. In particular, dimension-labels will be undefined, dense array values will be undefined, and sparse arrays will be empty.

## ◆ Resize() [7/7]

void vtkArray::Resize | ( | const vtkArrayExtents & | extents | ) |

Resizes the array to the given extents (number of dimensions and size of each dimension).

Note that concrete implementations of vtkArray may place constraints on the extents that they will store, so you cannot assume that GetExtents() will always return the same value passed to Resize().

The contents of the array are undefined after calling Resize() - you should initialize its contents accordingly. In particular, dimension-labels will be undefined, dense array values will be undefined, and sparse arrays will be empty.

## ◆ GetExtent()

vtkArrayRange vtkArray::GetExtent | ( | DimensionT | dimension | ) |

Returns the extent (valid coordinate range) along the given dimension.

## ◆ GetExtents()

virtual const vtkArrayExtents& vtkArray::GetExtents | ( |  | ) |
| pure virtual

Returns the extents (the number of dimensions and size along each dimension) of the array.

Implemented in vtkSparseArray< T >, and vtkDenseArray< T >.

## ◆ GetDimensions()

DimensionT vtkArray::GetDimensions | ( |  | ) |

Returns the number of dimensions stored in the array.

Note that this is the same as calling GetExtents().GetDimensions().

## ◆ GetSize()

SizeT vtkArray::GetSize | ( |  | ) |

Returns the number of values stored in the array.

Note that this is the same as calling GetExtents().GetSize(), and represents the maximum number of values that could ever be stored using the current extents. This is equal to the number of values stored in a dense array, but may be larger than the number of values stored in a sparse array.

## ◆ GetNonNullSize()

virtual SizeT vtkArray::GetNonNullSize | ( |  | ) |
| pure virtual

Returns the number of non-null values stored in the array.

Note that this value will equal GetSize() for dense arrays, and will be less-than-or-equal to GetSize() for sparse arrays.

Implemented in vtkSparseArray< T >, and vtkDenseArray< T >.

## ◆ SetName()

void vtkArray::SetName | ( | const vtkStdString & | name | ) |

Sets the array name.

## ◆ GetName()

vtkStdString vtkArray::GetName | ( |  | ) |

Returns the array name.

## ◆ SetDimensionLabel()

void vtkArray::SetDimensionLabel | ( | DimensionT | i,
|  | const vtkStdString & | label
| ) |  |

Sets the label for the i-th array dimension.

## ◆ GetDimensionLabel()

vtkStdString vtkArray::GetDimensionLabel | ( | DimensionT | i | ) |

Returns the label for the i-th array dimension.

## ◆ GetCoordinatesN()

virtual void vtkArray::GetCoordinatesN | ( | SizeT | n,
|  | vtkArrayCoordinates & | coordinates
| ) |  |
| pure virtual

Returns the coordinates of the n-th value in the array, where n is in the range [0, GetNonNullSize()).

Note that the order in which coordinates are visited is undefined, but is guaranteed to match the order in which values are visited using vtkTypedArray::GetValueN() and vtkTypedArray::SetValueN().

Implemented in vtkSparseArray< T >, and vtkDenseArray< T >.

## ◆ GetVariantValue() [1/4]

vtkVariant vtkArray::GetVariantValue | ( | CoordinateT | i | ) |
| inline

Returns the value stored in the array at the given coordinates.

Note that the number of dimensions in the supplied coordinates must match the number of dimensions in the array.

Definition at line 263 of file vtkArray.h.

## ◆ GetVariantValue() [2/4]

vtkVariant vtkArray::GetVariantValue | ( | CoordinateT | i,
|  | CoordinateT | j
| ) |  |
| inline

Returns the value stored in the array at the given coordinates.

Note that the number of dimensions in the supplied coordinates must match the number of dimensions in the array.

Definition at line 268 of file vtkArray.h.

## ◆ GetVariantValue() [3/4]

vtkVariant vtkArray::GetVariantValue | ( | CoordinateT | i,
|  | CoordinateT | j,
|  | CoordinateT | k
| ) |  |
| inline

Returns the value stored in the array at the given coordinates.

Note that the number of dimensions in the supplied coordinates must match the number of dimensions in the array.

Definition at line 273 of file vtkArray.h.

## ◆ GetVariantValue() [4/4]

virtual vtkVariant vtkArray::GetVariantValue | ( | const vtkArrayCoordinates & | coordinates | ) |
| pure virtual

Returns the value stored in the array at the given coordinates.

Note that the number of dimensions in the supplied coordinates must match the number of dimensions in the array.

Implemented in vtkTypedArray< T >.

## ◆ GetVariantValueN()

virtual vtkVariant vtkArray::GetVariantValueN | ( | SizeT | n | ) |
| pure virtual

Returns the n-th value stored in the array, where n is in the range [0, GetNonNullSize()).

This is useful for efficiently visiting every value in the array. Note that the order in which values are visited is undefined, but is guaranteed to match the order used by vtkArray::GetCoordinatesN().

Implemented in vtkTypedArray< T >.

## ◆ SetVariantValue() [1/4]

void vtkArray::SetVariantValue | ( | CoordinateT | i,
|  | const vtkVariant & | value
| ) |  |
| inline

Overwrites the value stored in the array at the given coordinates.

Note that the number of dimensions in the supplied coordinates must match the number of dimensions in the array.

Definition at line 278 of file vtkArray.h.

## ◆ SetVariantValue() [2/4]

void vtkArray::SetVariantValue | ( | CoordinateT | i,
|  | CoordinateT | j,
|  | const vtkVariant & | value
| ) |  |
| inline

Overwrites the value stored in the array at the given coordinates.

Note that the number of dimensions in the supplied coordinates must match the number of dimensions in the array.

Definition at line 283 of file vtkArray.h.

## ◆ SetVariantValue() [3/4]

void vtkArray::SetVariantValue | ( | CoordinateT | i,
|  | CoordinateT | j,
|  | CoordinateT | k,
|  | const vtkVariant & | value
| ) |  |
| inline

Overwrites the value stored in the array at the given coordinates.

Note that the number of dimensions in the supplied coordinates must match the number of dimensions in the array.

Definition at line 288 of file vtkArray.h.

## ◆ SetVariantValue() [4/4]

virtual void vtkArray::SetVariantValue | ( | const vtkArrayCoordinates & | coordinates,
|  | const vtkVariant & | value
| ) |  |
| pure virtual

Overwrites the value stored in the array at the given coordinates.

Note that the number of dimensions in the supplied coordinates must match the number of dimensions in the array.

Implemented in vtkTypedArray< T >.

## ◆ SetVariantValueN()

virtual void vtkArray::SetVariantValueN | ( | SizeT | n,
|  | const vtkVariant & | value
| ) |  |
| pure virtual

Overwrites the n-th value stored in the array, where n is in the range [0, GetNonNullSize()).

This is useful for efficiently visiting every value in the array. Note that the order in which values are visited is undefined, but is guaranteed to match the order used by vtkArray::GetCoordinatesN().

Implemented in vtkTypedArray< T >.

## ◆ CopyValue() [1/3]

virtual void vtkArray::CopyValue | ( | vtkArray * | source,
|  | const vtkArrayCoordinates & | source_coordinates,
|  | const vtkArrayCoordinates & | target_coordinates
| ) |  |
| pure virtual

Overwrites a value with a value retrieved from another array.

Both arrays must store the same data types.

Implemented in vtkTypedArray< T >.

## ◆ CopyValue() [2/3]

virtual void vtkArray::CopyValue | ( | vtkArray * | source,
|  | SizeT | source_index,
|  | const vtkArrayCoordinates & | target_coordinates
| ) |  |
| pure virtual

Overwrites a value with a value retrieved from another array.

Both arrays must store the same data types.

Implemented in vtkTypedArray< T >.

## ◆ CopyValue() [3/3]

virtual void vtkArray::CopyValue | ( | vtkArray * | source,
|  | const vtkArrayCoordinates & | source_coordinates,
|  | SizeT | target_index
| ) |  |
| pure virtual

Overwrites a value with a value retrieved from another array.

Both arrays must store the same data types.

Implemented in vtkTypedArray< T >.

## ◆ DeepCopy()

virtual vtkArray* vtkArray::DeepCopy | ( |  | ) |
| pure virtual

Returns a new array that is a deep copy of this array.

Implemented in vtkSparseArray< T >, and vtkDenseArray< T >.

The documentation for this class was generated from the following file:

- Common/Core/vtkArray.h