VTK  9.4.20241121
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkGenericDataArray< DerivedT, ValueTypeT > Class Template Reference

Base interface for all typed vtkDataArray subclasses. More...

#include <vtkGenericDataArray.h>

Inheritance diagram for vtkGenericDataArray< DerivedT, ValueTypeT >:
[legend]
Collaboration diagram for vtkGenericDataArray< DerivedT, ValueTypeT >:
[legend]

Public Types

enum  { VTK_DATA_TYPE = vtkTypeTraits<ValueType>::VTK_TYPE_ID }
 Compile time access to the VTK type identifier. More...
 
typedef ValueTypeT ValueType
 
- Public Types inherited from vtkDataArray
typedef vtkAbstractArray Superclass
 
- Public Types inherited from vtkAbstractArray
enum  DeleteMethod { VTK_DATA_ARRAY_FREE , VTK_DATA_ARRAY_DELETE , VTK_DATA_ARRAY_ALIGNED_FREE , VTK_DATA_ARRAY_USER_DEFINED }
 
enum  { MAX_DISCRETE_VALUES = 32 }
 
enum  {
  AbstractArray = 0 , DataArray , AoSDataArrayTemplate , SoADataArrayTemplate ,
  TypedDataArray , MappedDataArray , ScaleSoADataArrayTemplate , ImplicitArray ,
  DataArrayTemplate = AoSDataArrayTemplate
}
 
typedef vtkObject Superclass
 

Public Member Functions

 vtkTemplateTypeMacro (SelfType, vtkDataArray)
 
ValueType GetValue (vtkIdType valueIdx) const
 Get the value at valueIdx.
 
void SetValue (vtkIdType valueIdx, ValueType value)
 Set the value at valueIdx to value.
 
void GetTypedTuple (vtkIdType tupleIdx, ValueType *tuple) const
 Copy the tuple at tupleIdx into tuple.
 
void SetTypedTuple (vtkIdType tupleIdx, const ValueType *tuple)
 Set this array's tuple at tupleIdx to the values in tuple.
 
ValueType GetTypedComponent (vtkIdType tupleIdx, int compIdx) const
 Get component compIdx of the tuple at tupleIdx.
 
void SetTypedComponent (vtkIdType tupleIdx, int compIdx, ValueType value)
 Set component compIdx of the tuple at tupleIdx to value.
 
void RemoveTuple (vtkIdType tupleIdx) override
 Removes a tuple at the given index.
 
vtkIdType InsertNextValue (ValueType value)
 Insert data at the end of the array.
 
void InsertValue (vtkIdType valueIdx, ValueType value)
 Insert data at a specified position in the array.
 
void InsertTypedTuple (vtkIdType tupleIdx, const ValueType *t)
 Insert (memory allocation performed) the tuple t at tupleIdx.
 
vtkIdType InsertNextTypedTuple (const ValueType *t)
 Insert (memory allocation performed) the tuple onto the end of the array.
 
void InsertTypedComponent (vtkIdType tupleIdx, int compIdx, ValueType val)
 Insert (memory allocation performed) the value at the specified tuple and component location.
 
ValueTypeGetValueRange ()
 Get the range of array values for the 0th component in the native data type.
 
void GetValueRange (ValueType range[2])
 
vtkIdType Capacity ()
 Return the capacity in typeof T units of the current array.
 
virtual void FillTypedComponent (int compIdx, ValueType value)
 Set component comp of all tuples to value.
 
virtual void FillValue (ValueType value)
 Set all the values in array to value.
 
int GetDataType () const override
 Return the underlying data type.
 
int GetDataTypeSize () const override
 Return the size of the underlying data type.
 
bool HasStandardMemoryLayout () const override
 Returns true if this array uses the standard memory layout defined in the VTK user guide, e.g.
 
vtkTypeBool Allocate (vtkIdType size, vtkIdType ext=1000) override
 Allocate memory for this array.
 
vtkTypeBool Resize (vtkIdType numTuples) override
 Resize the array to the requested number of tuples and preserve data.
 
void SetNumberOfComponents (int num) override
 Set/Get the dimension (n) of the components.
 
void SetNumberOfTuples (vtkIdType number) override
 Set the number of tuples (a component group) in the array.
 
void Initialize () override
 Release storage and reset array to initial state.
 
void Squeeze () override
 Free any unnecessary memory.
 
void SetTuple (vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source) override
 See documentation from parent class.
 
void SetTuple (vtkIdType tupleIdx, const float *tuple) override
 Set the data tuple at tupleIdx.
 
void SetTuple (vtkIdType tupleIdx, const double *tuple) override
 Set the data tuple at tupleIdx.
 
void InsertTuplesStartingAt (vtkIdType dstStart, vtkIdList *srcIds, vtkAbstractArray *source) override
 See documentation from parent class.
 
void InsertTuples (vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source) override
 See documentation from parent class.
 
void InsertTuples (vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray *source) override
 See documentation from parent class.
 
void InsertTuple (vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source) override
 See documentation from parent class.
 
void InsertTuple (vtkIdType tupleIdx, const float *source) override
 Insert the data tuple at tupleIdx.
 
void InsertTuple (vtkIdType tupleIdx, const double *source) override
 Insert the data tuple at tupleIdx.
 
void InsertComponent (vtkIdType tupleIdx, int compIdx, double value) override
 Insert value at the location specified by tupleIdx and compIdx.
 
vtkIdType InsertNextTuple (vtkIdType srcTupleIdx, vtkAbstractArray *source) override
 See documentation from parent class.
 
vtkIdType InsertNextTuple (const float *tuple) override
 Insert the data tuple at the end of the array and return the tuple index at which the data was inserted.
 
vtkIdType InsertNextTuple (const double *tuple) override
 Insert the data tuple at the end of the array and return the tuple index at which the data was inserted.
 
void GetTuples (vtkIdList *tupleIds, vtkAbstractArray *output) override
 Given a list of tuple ids, return an array of tuples.
 
void GetTuples (vtkIdType p1, vtkIdType p2, vtkAbstractArray *output) override
 Get the tuples for the range of tuple ids specified (i.e., p1->p2 inclusive).
 
double * GetTuple (vtkIdType tupleIdx) override
 Get the data tuple at tupleIdx.
 
void GetTuple (vtkIdType tupleIdx, double *tuple) override
 Get the data tuple at tupleIdx by filling in a user-provided array, Make sure that your array is large enough to hold the NumberOfComponents amount of data being returned.
 
void InterpolateTuple (vtkIdType dstTupleIdx, vtkIdList *ptIndices, vtkAbstractArray *source, double *weights) override
 Set the tuple at dstTupleIdx in this array to the interpolated tuple value, given the ptIndices in the source array and associated interpolation weights.
 
void InterpolateTuple (vtkIdType dstTupleIdx, vtkIdType srcTupleIdx1, vtkAbstractArray *source1, vtkIdType srcTupleIdx2, vtkAbstractArray *source2, double t) override
 Insert the tuple at dstTupleIdx in this array to the tuple interpolated from the two tuple indices, srcTupleIdx1 and srcTupleIdx2, and an interpolation factor, t.
 
void SetComponent (vtkIdType tupleIdx, int compIdx, double value) override
 Set the data component at the location specified by tupleIdx and compIdx to value.
 
double GetComponent (vtkIdType tupleIdx, int compIdx) override
 Return the data component at the location specified by tupleIdx and compIdx.
 
void SetVariantValue (vtkIdType valueIdx, vtkVariant value) override
 Set a value in the array from a variant.
 
vtkVariant GetVariantValue (vtkIdType valueIdx) override
 Retrieve value from the array as a variant.
 
void InsertVariantValue (vtkIdType valueIdx, vtkVariant value) override
 Insert a value into the array from a variant.
 
vtkIdType LookupValue (vtkVariant value) override
 Return the value indices where a specific value appears.
 
virtual vtkIdType LookupTypedValue (ValueType value)
 
void LookupValue (vtkVariant value, vtkIdList *valueIds) override
 Return the value indices where a specific value appears.
 
virtual void LookupTypedValue (ValueType value, vtkIdList *valueIds)
 
void ClearLookup () override
 Delete the associated fast lookup data structure on this array, if it exists.
 
void DataChanged () override
 Tell the array explicitly that the data has changed.
 
void FillComponent (int compIdx, double value) override
 Fill a component of a data array with a specified value.
 
vtkArrayIteratorNewIterator () override
 Subclasses must override this method and provide the right kind of templated vtkArrayIteratorTemplate.
 
void * GetVoidPointer (vtkIdType valueIdx) override
 Default implementation raises a runtime error.
 
ValueTypeGetPointer (vtkIdType valueIdx)
 Default implementation raises a runtime error.
 
void SetVoidArray (void *, vtkIdType, int) override
 Default implementation raises a runtime error.
 
void SetVoidArray (void *, vtkIdType, int, int) override
 Default implementation raises a runtime error.
 
void SetArrayFreeFunction (void(*callback)(void *)) override
 Default implementation raises a runtime error.
 
void * WriteVoidPointer (vtkIdType valueIdx, vtkIdType numValues) override
 Default implementation raises a runtime error.
 
ValueTypeWritePointer (vtkIdType valueIdx, vtkIdType numValues)
 Default implementation raises a runtime error.
 
void GetValueRange (ValueType range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Get the range of array values for the given component in the native data type.
 
void GetValueRange (ValueType range[2], int comp)
 Get the range of array values for the given component in the native data type.
 
ValueTypeGetValueRange (int comp)
 Get the range of array values for the given component in the native data type.
 
void GetFiniteValueRange (ValueType range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 These methods are analogous to the GetValueRange methods, except that the only consider finite values.
 
void GetFiniteValueRange (ValueType range[2], int comp)
 These methods are analogous to the GetValueRange methods, except that the only consider finite values.
 
ValueTypeGetFiniteValueRange (int comp)
 These methods are analogous to the GetValueRange methods, except that the only consider finite values.
 
ValueTypeGetFiniteValueRange ()
 These methods are analogous to the GetValueRange methods, except that the only consider finite values.
 
void GetFiniteValueRange (ValueType range[2])
 These methods are analogous to the GetValueRange methods, except that the only consider finite values.
 
- Public Member Functions inherited from vtkDataArray
virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
vtkDataArrayNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
int IsNumeric () const override
 This method is here to make backward compatibility easier.
 
int GetElementComponentSize () const override
 Return the size, in bytes, of the lowest-level element of an array.
 
void GetTuples (vtkIdList *tupleIds, vtkAbstractArray *output) override
 Given a list of tuple ids, return an array of tuples.
 
void GetTuples (vtkIdType p1, vtkIdType p2, vtkAbstractArray *output) override
 Get the tuples for the range of tuple ids specified (i.e., p1->p2 inclusive).
 
void InterpolateTuple (vtkIdType dstTupleIdx, vtkIdList *ptIndices, vtkAbstractArray *source, double *weights) override
 Set the tuple at dstTupleIdx in this array to the interpolated tuple value, given the ptIndices in the source array and associated interpolation weights.
 
void InterpolateTuple (vtkIdType dstTupleIdx, vtkIdType srcTupleIdx1, vtkAbstractArray *source1, vtkIdType srcTupleIdx2, vtkAbstractArray *source2, double t) override
 Insert the tuple at dstTupleIdx in this array to the tuple interpolated from the two tuple indices, srcTupleIdx1 and srcTupleIdx2, and an interpolation factor, t.
 
virtual double * GetTuple (vtkIdType tupleIdx)=0
 Get the data tuple at tupleIdx.
 
virtual void GetTuple (vtkIdType tupleIdx, double *tuple)=0
 Get the data tuple at tupleIdx by filling in a user-provided array, Make sure that your array is large enough to hold the NumberOfComponents amount of data being returned.
 
virtual double GetComponent (vtkIdType tupleIdx, int compIdx)
 Return the data component at the location specified by tupleIdx and compIdx.
 
virtual void SetComponent (vtkIdType tupleIdx, int compIdx, double value)
 Set the data component at the location specified by tupleIdx and compIdx to value.
 
virtual void InsertComponent (vtkIdType tupleIdx, int compIdx, double value)
 Insert value at the location specified by tupleIdx and compIdx.
 
virtual void GetData (vtkIdType tupleMin, vtkIdType tupleMax, int compMin, int compMax, vtkDoubleArray *data)
 Get the data as a double array in the range (tupleMin,tupleMax) and (compMin, compMax).
 
virtual void ShallowCopy (vtkDataArray *other)
 Create a shallow copy of other into this, if possible.
 
virtual void FillComponent (int compIdx, double value)
 Fill a component of a data array with a specified value.
 
virtual void Fill (double value)
 Fill all values of a data array with a specified value.
 
virtual void CopyComponent (int dstComponent, vtkDataArray *src, int srcComponent)
 Copy a component from one data array into a component on this data array.
 
virtual void * WriteVoidPointer (vtkIdType valueIdx, vtkIdType numValues)=0
 Get the address of a particular data index.
 
unsigned long GetActualMemorySize () const override
 Return the memory in kibibytes (1024 bytes) consumed by this data array.
 
void CreateDefaultLookupTable ()
 Create default lookup table.
 
double * GetRange ()
 Return the range of the data array.
 
void GetRange (double range[2])
 The range of the data array values will be returned in the provided range array argument.
 
double * GetFiniteRange ()
 Return the range of the data array.
 
void GetFiniteRange (double range[2])
 The range of the data array values will be returned in the provided range array argument.
 
virtual double GetMaxNorm ()
 Return the maximum norm for the tuples.
 
void Modified () override
 Removes out-of-date L2_NORM_RANGE() and L2_NORM_FINITE_RANGE() values.
 
int CopyInformation (vtkInformation *infoFrom, vtkTypeBool deep=1) override
 Copy information instance.
 
int GetArrayType () const override
 Method for type-checking in FastDownCast implementations.
 
virtual void GetIntegerTuple (vtkIdType tupleIdx, vtkTypeInt64 *tuple)
 Get/set the data at tupleIdx by filling in a user-provided array of integers.
 
virtual void SetIntegerTuple (vtkIdType tupleIdx, vtkTypeInt64 *tuple)
 Get/set the data at tupleIdx by filling in a user-provided array of integers.
 
virtual void GetUnsignedTuple (vtkIdType tupleIdx, vtkTypeUInt64 *tuple)
 Get/set the data at tupleIdx by filling in a user-provided array of unsigned integers.
 
virtual void SetUnsignedTuple (vtkIdType tupleIdx, vtkTypeUInt64 *tuple)
 Get/set the data at tupleIdx by filling in a user-provided array of unsigned integers.
 
double GetTuple1 (vtkIdType tupleIdx)
 These methods are included as convenience for the wrappers.
 
double * GetTuple2 (vtkIdType tupleIdx)
 These methods are included as convenience for the wrappers.
 
double * GetTuple3 (vtkIdType tupleIdx)
 These methods are included as convenience for the wrappers.
 
double * GetTuple4 (vtkIdType tupleIdx)
 These methods are included as convenience for the wrappers.
 
double * GetTuple6 (vtkIdType tupleIdx)
 These methods are included as convenience for the wrappers.
 
double * GetTuple9 (vtkIdType tupleIdx)
 These methods are included as convenience for the wrappers.
 
void SetTuple1 (vtkIdType tupleIdx, double value)
 These methods are included as convenience for the wrappers.
 
void SetTuple2 (vtkIdType tupleIdx, double val0, double val1)
 These methods are included as convenience for the wrappers.
 
void SetTuple3 (vtkIdType tupleIdx, double val0, double val1, double val2)
 These methods are included as convenience for the wrappers.
 
void SetTuple4 (vtkIdType tupleIdx, double val0, double val1, double val2, double val3)
 These methods are included as convenience for the wrappers.
 
void SetTuple6 (vtkIdType tupleIdx, double val0, double val1, double val2, double val3, double val4, double val5)
 These methods are included as convenience for the wrappers.
 
void SetTuple9 (vtkIdType tupleIdx, double val0, double val1, double val2, double val3, double val4, double val5, double val6, double val7, double val8)
 These methods are included as convenience for the wrappers.
 
void InsertTuple1 (vtkIdType tupleIdx, double value)
 These methods are included as convenience for the wrappers.
 
void InsertTuple2 (vtkIdType tupleIdx, double val0, double val1)
 These methods are included as convenience for the wrappers.
 
void InsertTuple3 (vtkIdType tupleIdx, double val0, double val1, double val2)
 These methods are included as convenience for the wrappers.
 
void InsertTuple4 (vtkIdType tupleIdx, double val0, double val1, double val2, double val3)
 These methods are included as convenience for the wrappers.
 
void InsertTuple6 (vtkIdType tupleIdx, double val0, double val1, double val2, double val3, double val4, double val5)
 These methods are included as convenience for the wrappers.
 
void InsertTuple9 (vtkIdType tupleIdx, double val0, double val1, double val2, double val3, double val4, double val5, double val6, double val7, double val8)
 These methods are included as convenience for the wrappers.
 
void InsertNextTuple1 (double value)
 These methods are included as convenience for the wrappers.
 
void InsertNextTuple2 (double val0, double val1)
 These methods are included as convenience for the wrappers.
 
void InsertNextTuple3 (double val0, double val1, double val2)
 These methods are included as convenience for the wrappers.
 
void InsertNextTuple4 (double val0, double val1, double val2, double val3)
 These methods are included as convenience for the wrappers.
 
void InsertNextTuple6 (double val0, double val1, double val2, double val3, double val4, double val5)
 These methods are included as convenience for the wrappers.
 
void InsertNextTuple9 (double val0, double val1, double val2, double val3, double val4, double val5, double val6, double val7, double val8)
 These methods are included as convenience for the wrappers.
 
virtual void RemoveFirstTuple ()
 These methods remove tuples from the data array.
 
virtual void RemoveLastTuple ()
 These methods remove tuples from the data array.
 
void DeepCopy (vtkAbstractArray *aa) override
 Deep copy of data.
 
virtual void DeepCopy (vtkDataArray *da)
 Deep copy of data.
 
void SetLookupTable (vtkLookupTable *lut)
 Set/get the lookup table associated with this scalar data, if any.
 
virtual vtkLookupTableGetLookupTable ()
 Set/get the lookup table associated with this scalar data, if any.
 
void GetRange (double range[2], int comp)
 The range of the data array values for the given component will be returned in the provided range array argument.
 
void GetRange (double range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip)
 The range of the data array values for the given component will be returned in the provided range array argument.
 
double * GetRange (int comp)
 Return the range of the data array values for the given component.
 
void GetFiniteRange (double range[2], int comp)
 The range of the data array values for the given component will be returned in the provided range array argument.
 
void GetFiniteRange (double range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip)
 The range of the data array values for the given component will be returned in the provided range array argument.
 
double * GetFiniteRange (int comp)
 Return the range of the data array values for the given component.
 
void GetDataTypeRange (double range[2])
 These methods return the Min and Max possible range of the native data type.
 
double GetDataTypeMin ()
 These methods return the Min and Max possible range of the native data type.
 
double GetDataTypeMax ()
 These methods return the Min and Max possible range of the native data type.
 
- Public Member Functions inherited from vtkAbstractArray
virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
vtkAbstractArrayNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
void PrintValues (ostream &os)
 
nlohmann::json SerializeValues ()
 
virtual vtkTypeBool Allocate (vtkIdType numValues, vtkIdType ext=1000)=0
 Allocate memory for this array.
 
virtual void Initialize ()=0
 Release storage and reset array to initial state.
 
virtual int GetDataType () const =0
 Return the underlying data type.
 
virtual int GetElementComponentSize () const =0
 Return the size, in bytes, of the lowest-level element of an array.
 
void SetComponentName (vtkIdType component, const char *name)
 Set the name for a component.
 
const char * GetComponentName (vtkIdType component) const
 Get the component name for a given component.
 
bool HasAComponentName () const
 Returns if any component has had a name assigned.
 
int CopyComponentNames (vtkAbstractArray *da)
 Copies the component names from the inputted array to the current array make sure that the current array has the same number of components as the input array.
 
virtual void SetNumberOfTuples (vtkIdType numTuples)=0
 Set the number of tuples (a component group) in the array.
 
virtual bool SetNumberOfValues (vtkIdType numValues)
 Specify the number of values (tuples * components) for this object to hold.
 
vtkIdType GetNumberOfTuples () const
 Get the number of complete tuples (a component group) in the array.
 
vtkIdType GetNumberOfValues () const
 Get the total number of values in the array.
 
virtual void SetTuple (vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source)=0
 Set the tuple at dstTupleIdx in this array to the tuple at srcTupleIdx in the source array.
 
virtual void InsertTuple (vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source)=0
 Insert the tuple at srcTupleIdx in the source array into this array at dstTupleIdx.
 
virtual void InsertTuples (vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source)=0
 Copy the tuples indexed in srcIds from the source array to the tuple locations indexed by dstIds in this array.
 
virtual void InsertTuplesStartingAt (vtkIdType dstStart, vtkIdList *srcIds, vtkAbstractArray *source)=0
 Copy the tuples indexed in srcIds from the source array to the tuple locations starting at index dstStart.
 
virtual void InsertTuples (vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray *source)=0
 Copy n consecutive tuples starting at srcStart from the source array to this array, starting at the dstStart location.
 
virtual vtkIdType InsertNextTuple (vtkIdType srcTupleIdx, vtkAbstractArray *source)=0
 Insert the tuple from srcTupleIdx in the source array at the end of this array.
 
virtual void GetTuples (vtkIdList *tupleIds, vtkAbstractArray *output)
 Given a list of tuple ids, return an array of tuples.
 
virtual void GetTuples (vtkIdType p1, vtkIdType p2, vtkAbstractArray *output)
 Get the tuples for the range of tuple ids specified (i.e., p1->p2 inclusive).
 
virtual bool HasStandardMemoryLayout () const
 Returns true if this array uses the standard memory layout defined in the VTK user guide, e.g.
 
virtual void * GetVoidPointer (vtkIdType valueIdx)=0
 Return a void pointer.
 
virtual void DeepCopy (vtkAbstractArray *da)
 Deep copy of data.
 
virtual void InterpolateTuple (vtkIdType dstTupleIdx, vtkIdList *ptIndices, vtkAbstractArray *source, double *weights)=0
 Set the tuple at dstTupleIdx in this array to the interpolated tuple value, given the ptIndices in the source array and associated interpolation weights.
 
virtual void InterpolateTuple (vtkIdType dstTupleIdx, vtkIdType srcTupleIdx1, vtkAbstractArray *source1, vtkIdType srcTupleIdx2, vtkAbstractArray *source2, double t)=0
 Insert the tuple at dstTupleIdx in this array to the tuple interpolated from the two tuple indices, srcTupleIdx1 and srcTupleIdx2, and an interpolation factor, t.
 
virtual void Squeeze ()=0
 Free any unnecessary memory.
 
virtual vtkTypeBool Resize (vtkIdType numTuples)=0
 Resize the array to the requested number of tuples and preserve data.
 
vtkIdType GetSize () const
 Return the size of the data.
 
vtkIdType GetMaxId () const
 What is the maximum id currently in the array.
 
virtual void SetArrayFreeFunction (void(*callback)(void *))=0
 This method allows the user to specify a custom free function to be called when the array is deallocated.
 
virtual void ExportToVoidPointer (void *out_ptr)
 This method copies the array data to the void pointer specified by the user.
 
virtual unsigned long GetActualMemorySize () const =0
 Return the memory in kibibytes (1024 bytes) consumed by this data array.
 
virtual const char * GetDataTypeAsString () const
 Get the name of a data type as a string.
 
virtual int IsNumeric () const =0
 This method is here to make backward compatibility easier.
 
virtual bool IsIntegral () const
 This method will return true if and only if an array contains integer-valued data.
 
virtual vtkArrayIteratorNewIterator ()=0
 Subclasses must override this method and provide the right kind of templated vtkArrayIteratorTemplate.
 
virtual vtkIdType GetDataSize () const
 Returns the size of the data in DataTypeSize units.
 
virtual vtkVariant GetVariantValue (vtkIdType valueIdx)
 Retrieve value from the array as a variant.
 
virtual void InsertVariantValue (vtkIdType valueIdx, vtkVariant value)=0
 Insert a value into the array from a variant.
 
virtual void SetVariantValue (vtkIdType valueIdx, vtkVariant value)=0
 Set a value in the array from a variant.
 
virtual void DataChanged ()=0
 Tell the array explicitly that the data has changed.
 
virtual void ClearLookup ()=0
 Delete the associated fast lookup data structure on this array, if it exists.
 
virtual void GetProminentComponentValues (int comp, vtkVariantArray *values, double uncertainty=1.e-6, double minimumProminence=1.e-3)
 Populate the given vtkVariantArray with a set of distinct values taken on by the requested component (or, when passed -1, by the tuples as a whole).
 
vtkInformationGetInformation ()
 Get an information object that can be used to annotate the array.
 
bool HasInformation () const
 Inquire if this array has an instance of vtkInformation already associated with it.
 
virtual int CopyInformation (vtkInformation *infoFrom, vtkTypeBool deep=1)
 Copy information instance.
 
void Modified () override
 Removes out-of-date PER_COMPONENT() and PER_FINITE_COMPONENT() values.
 
virtual int GetArrayType () const
 Method for type-checking in FastDownCast implementations.
 
const char * GetArrayTypeAsString () const
 Get the name for the array type as string.
 
int GetNumberOfComponents () const
 Set/Get the dimension (n) of the components.
 
void Reset ()
 Reset to an empty state, without freeing any memory.
 
virtual void SetVoidArray (void *vtkNotUsed(array), vtkIdType vtkNotUsed(size), int vtkNotUsed(save))=0
 This method lets the user specify data to be held by the array.
 
virtual void SetVoidArray (void *array, vtkIdType size, int save, int vtkNotUsed(deleteMethod))
 This method lets the user specify data to be held by the array.
 
virtual void SetName (const char *)
 Set/get array's name.
 
virtual char * GetName ()
 Set/get array's name.
 
virtual unsigned int GetMaxDiscreteValues ()
 Get/Set the maximum number of prominent values this array may contain before it is considered continuous.
 
virtual void SetMaxDiscreteValues (unsigned int)
 Get/Set the maximum number of prominent values this array may contain before it is considered continuous.
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 Turn debugging output on.
 
virtual void DebugOff ()
 Turn debugging output off.
 
bool GetDebug ()
 Get the value of the debug flag.
 
void SetDebug (bool debugFlag)
 Set the value of the debug flag.
 
virtual void Modified ()
 Update the modification time for this object.
 
virtual vtkMTimeType GetMTime ()
 Return this object's modified time.
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
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.
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkCommandGetCommand (unsigned long tag)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObserver (vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObservers (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObservers (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkTypeBool HasObserver (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
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.
 
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.
 
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.
 
vtkTypeBool InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not.
 
vtkTypeBool InvokeEvent (const char *event, void *callData)
 This method invokes an event and return whether the event was aborted or not.
 
virtual void SetObjectName (const std::string &objectName)
 Set/get the name of this object for reporting purposes.
 
virtual std::string GetObjectName () const
 Set/get the name of this object for reporting purposes.
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string.
 
virtual std::string GetObjectDescription () const
 The object description printed in messages and PrintSelf output.
 
virtual vtkTypeBool IsA (const char *name)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
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).
 
virtual void Delete ()
 Delete a VTK object.
 
virtual void FastDelete ()
 Delete a reference to this object.
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream.
 
void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object).
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object).
 
int GetReferenceCount ()
 Return the current reference count of this object.
 
void SetReferenceCount (int)
 Sets the reference count.
 
bool GetIsInMemkind () const
 A local state flag that remembers whether this object lives in the normal or extended memory space.
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses.
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses.
 
virtual bool UsesGarbageCollector () const
 Indicate whether the class uses vtkGarbageCollector or not.
 

Protected Member Functions

 vtkGenericDataArray ()
 
 ~vtkGenericDataArray () override
 
bool AllocateTuples (vtkIdType numTuples)
 Allocate space for numTuples.
 
bool ReallocateTuples (vtkIdType numTuples)
 Allocate space for numTuples.
 
bool EnsureAccessToTuple (vtkIdType tupleIdx)
 
void ComputeValueRange (ValueType range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Compute the range for a specific component.
 
void ComputeFiniteValueRange (ValueType range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Compute the range for a specific component.
 
bool ComputeScalarValueRange (ValueType *ranges, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Computes the range for each component of an array, the length of ranges must be two times the number of components.
 
bool ComputeVectorValueRange (ValueType range[2], const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Returns true if the range was computed.
 
bool ComputeFiniteScalarValueRange (ValueType *ranges, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Computes the range for each component of an array, the length of ranges must be two times the number of components.
 
bool ComputeFiniteVectorValueRange (ValueType range[2], const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Returns true if the range was computed.
 
- Protected Member Functions inherited from vtkDataArray
virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkDataArray ()
 
 ~vtkDataArray () override
 
virtual void ComputeRange (double range[2], int comp)
 Compute the range for a specific component.
 
virtual void ComputeRange (double range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Compute the range for a specific component.
 
virtual void ComputeFiniteRange (double range[2], int comp)
 Compute the range for a specific component.
 
virtual void ComputeFiniteRange (double range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Compute the range for a specific component.
 
virtual bool ComputeScalarRange (double *ranges)
 Computes the range for each component of an array, the length of ranges must be two times the number of components.
 
virtual bool ComputeScalarRange (double *ranges, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Computes the range for each component of an array, the length of ranges must be two times the number of components.
 
virtual bool ComputeVectorRange (double range[2])
 Returns true if the range was computed.
 
virtual bool ComputeVectorRange (double range[2], const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Returns true if the range was computed.
 
virtual bool ComputeFiniteScalarRange (double *ranges)
 Computes the range for each component of an array, the length of ranges must be two times the number of components.
 
virtual bool ComputeFiniteScalarRange (double *ranges, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Computes the range for each component of an array, the length of ranges must be two times the number of components.
 
virtual bool ComputeFiniteVectorRange (double range[2])
 Returns true if the range was computed.
 
virtual bool ComputeFiniteVectorRange (double range[2], const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Returns true if the range was computed.
 
- Protected Member Functions inherited from vtkAbstractArray
virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkAbstractArray ()
 
 ~vtkAbstractArray () override
 
virtual void SetInformation (vtkInformation *)
 Set an information object that can be used to annotate the array.
 
virtual void UpdateDiscreteValueSet (double uncertainty, double minProminence)
 Obtain the set of unique values taken on by each component of the array, as well as by the tuples of the array.
 
- 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.
 
void InternalReleaseFocus ()
 These methods allow a command to exclusively grab all events.
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void RegisterInternal (vtkObjectBase *, vtkTypeBool check)
 
virtual void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
virtual void ObjectFinalize ()
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

std::vector< double > LegacyTuple
 
std::vector< ValueTypeLegacyValueRange
 
std::vector< ValueTypeLegacyValueRangeFull
 
vtkGenericDataArrayLookupHelper< SelfTypeLookup
 
- Protected Attributes inherited from vtkDataArray
vtkLookupTableLookupTable
 
double Range [2]
 
double FiniteRange [2]
 
- Protected Attributes inherited from vtkAbstractArray
vtkIdType Size
 
vtkIdType MaxId
 
int NumberOfComponents
 
unsigned int MaxDiscreteValues
 
char * Name
 
bool RebuildArray
 
vtkInformationInformation
 
vtkInternalComponentNames * ComponentNames
 
- 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
 

Additional Inherited Members

- Static Public Member Functions inherited from vtkDataArray
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkDataArraySafeDownCast (vtkObjectBase *o)
 
static vtkDataArrayFastDownCast (vtkAbstractArray *source)
 Perform a fast, safe cast from a vtkAbstractArray to a vtkDataArray.
 
static vtkDataArrayCreateDataArray (int dataType)
 Creates an array for dataType where dataType is one of VTK_BIT, VTK_CHAR, VTK_SIGNED_CHAR, VTK_UNSIGNED_CHAR, VTK_SHORT, VTK_UNSIGNED_SHORT, VTK_INT, VTK_UNSIGNED_INT, VTK_LONG, VTK_UNSIGNED_LONG, VTK_FLOAT, VTK_DOUBLE, VTK_ID_TYPE.
 
static vtkInformationDoubleVectorKeyCOMPONENT_RANGE ()
 This key is used to hold tight bounds on the range of one component over all tuples of the array.
 
static vtkInformationDoubleVectorKeyL2_NORM_RANGE ()
 This key is used to hold tight bounds on the $L_2$ norm of tuples in the array.
 
static vtkInformationDoubleVectorKeyL2_NORM_FINITE_RANGE ()
 This key is used to hold tight bounds on the $L_2$ norm of tuples in the array.
 
static vtkInformationStringKeyUNITS_LABEL ()
 A human-readable string indicating the units for the array data.
 
static void GetDataTypeRange (int type, double range[2])
 These methods return the Min and Max possible range of the native data type.
 
static double GetDataTypeMin (int type)
 These methods return the Min and Max possible range of the native data type.
 
static double GetDataTypeMax (int type)
 These methods return the Min and Max possible range of the native data type.
 
- Static Public Member Functions inherited from vtkAbstractArray
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkAbstractArraySafeDownCast (vtkObjectBase *o)
 
static vtkAbstractArrayCreateArray (int dataType)
 Creates an array for dataType where dataType is one of VTK_BIT, VTK_CHAR, VTK_UNSIGNED_CHAR, VTK_SHORT, VTK_UNSIGNED_SHORT, VTK_INT, VTK_UNSIGNED_INT, VTK_LONG, VTK_UNSIGNED_LONG, VTK_FLOAT, VTK_DOUBLE, VTK_ID_TYPE, VTK_STRING.
 
static vtkInformationIntegerKeyGUI_HIDE ()
 This key is a hint to end user interface that this array is internal and should not be shown to the end user.
 
static vtkInformationInformationVectorKeyPER_COMPONENT ()
 This key is used to hold a vector of COMPONENT_VALUES (and, for vtkDataArray subclasses, COMPONENT_RANGE) keys – one for each component of the array.
 
static vtkInformationInformationVectorKeyPER_FINITE_COMPONENT ()
 This key is used to hold a vector of COMPONENT_VALUES (and, for vtkDataArray subclasses, COMPONENT_RANGE) keys – one for each component of the array.
 
static vtkInformationVariantVectorKeyDISCRETE_VALUES ()
 A key used to hold discrete values taken on either by the tuples of the array (when present in this->GetInformation()) or individual components (when present in one entry of the PER_COMPONENT() information vector).
 
static vtkInformationDoubleVectorKeyDISCRETE_VALUE_SAMPLE_PARAMETERS ()
 A key used to hold conditions under which cached discrete values were generated; the value is a 2-vector of doubles.
 
static int GetDataTypeSize (int type)
 Return the size of the underlying data type.
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes.
 
static void SetGlobalWarningDisplay (vtkTypeBool val)
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static void GlobalWarningDisplayOn ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static void GlobalWarningDisplayOff ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static vtkTypeBool GetGlobalWarningDisplay ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
- 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.
 
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).
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
 
static void SetMemkindDirectory (const char *directoryname)
 The name of a directory, ideally mounted -o dax, to memory map an extended memory space within.
 
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.
 
- Static Protected Member Functions inherited from vtkObjectBase
static vtkMallocingFunction GetCurrentMallocFunction ()
 
static vtkReallocingFunction GetCurrentReallocFunction ()
 
static vtkFreeingFunction GetCurrentFreeFunction ()
 
static vtkFreeingFunction GetAlternateFreeFunction ()
 

Detailed Description

template<class DerivedT, class ValueTypeT>
class vtkGenericDataArray< DerivedT, ValueTypeT >

Base interface for all typed vtkDataArray subclasses.

A more detailed description of this class and related tools can be found here

The vtkGenericDataArray class provides a generic implementation of the vtkDataArray API. It relies on subclasses providing access to data via 8 "concept methods", which should be implemented as non-virtual methods of the subclass. These methods are:

Note that these methods use the CRTP idiom, which provides static binding to avoid virtual calls. This allows the compiler to optimize away layers of indirection when these methods are used. Well-designed implementations of these methods will reduce to raw memory accesses, providing efficient performance comparable to working with the pointer data.

See vtkAOSDataArrayTemplate and vtkSOADataArrayTemplate for example implementations.

In practice, code should not be written to use vtkGenericDataArray objects. Doing so is rather unweildy due to the CRTP pattern requiring the derived class be provided as a template argument. Instead, the vtkArrayDispatch framework can be used to detect a vtkDataArray's implementation type and instantiate appropriate templated worker code.

vtkArrayDispatch is also intended to replace code that currently relies on the encapsulation-breaking GetVoidPointer method. Not all subclasses of vtkDataArray use the memory layout assumed by GetVoidPointer; calling this method on, e.g. a vtkSOADataArrayTemplate will trigger a deep copy of the array data into an AOS buffer. This is very inefficient and should be avoided.

See also
vtkArrayDispatcher vtkDataArrayRange
Online Examples:

Tests:
vtkGenericDataArray (Tests)

Definition at line 180 of file vtkGenericDataArray.h.

Member Typedef Documentation

◆ ValueType

template<class DerivedT , class ValueTypeT >
typedef ValueTypeT vtkGenericDataArray< DerivedT, ValueTypeT >::ValueType

Definition at line 185 of file vtkGenericDataArray.h.

Member Enumeration Documentation

◆ anonymous enum

template<class DerivedT , class ValueTypeT >
anonymous enum

Compile time access to the VTK type identifier.

Enumerator
VTK_DATA_TYPE 

Definition at line 191 of file vtkGenericDataArray.h.

Constructor & Destructor Documentation

◆ vtkGenericDataArray()

template<class DerivedT , class ValueTypeT >
vtkGenericDataArray< DerivedT, ValueTypeT >::vtkGenericDataArray ( )
protected

◆ ~vtkGenericDataArray()

template<class DerivedT , class ValueTypeT >
vtkGenericDataArray< DerivedT, ValueTypeT >::~vtkGenericDataArray ( )
overrideprotected

Member Function Documentation

◆ vtkTemplateTypeMacro()

template<class DerivedT , class ValueTypeT >
vtkGenericDataArray< DerivedT, ValueTypeT >::vtkTemplateTypeMacro ( SelfType  ,
vtkDataArray   
)

◆ GetVoidPointer()

template<class DerivedT , class ValueTypeT >
void * vtkGenericDataArray< DerivedT, ValueTypeT >::GetVoidPointer ( vtkIdType  valueIdx)
overridevirtual

Default implementation raises a runtime error.

If subclasses keep on supporting this API, they should override this method.

Implements vtkAbstractArray.

Reimplemented in vtkMappedDataArray< Scalar >, vtkmDataArray< T >, vtkImplicitArray< BackendT >, vtkScaledSOADataArrayTemplate< ValueTypeT >, vtkSOADataArrayTemplate< ValueTypeT >, vtkTestDataArray< ArrayT >, and vtkPeriodicDataArray< Scalar >.

◆ GetPointer()

template<class DerivedT , class ValueTypeT >
ValueType * vtkGenericDataArray< DerivedT, ValueTypeT >::GetPointer ( vtkIdType  valueIdx)

Default implementation raises a runtime error.

If subclasses keep on supporting this API, they should override this method.

◆ SetVoidArray() [1/2]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::SetVoidArray ( void *  ,
vtkIdType  ,
int   
)
override

Default implementation raises a runtime error.

If subclasses keep on supporting this API, they should override this method.

◆ SetVoidArray() [2/2]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::SetVoidArray ( void *  ,
vtkIdType  ,
int  ,
int   
)
override

Default implementation raises a runtime error.

If subclasses keep on supporting this API, they should override this method.

◆ SetArrayFreeFunction()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::SetArrayFreeFunction ( void(*)(void *)  callback)
overridevirtual

Default implementation raises a runtime error.

If subclasses keep on supporting this API, they should override this method.

Implements vtkAbstractArray.

Reimplemented in vtkScaledSOADataArrayTemplate< ValueTypeT >, and vtkSOADataArrayTemplate< ValueTypeT >.

◆ WriteVoidPointer()

template<class DerivedT , class ValueTypeT >
void * vtkGenericDataArray< DerivedT, ValueTypeT >::WriteVoidPointer ( vtkIdType  valueIdx,
vtkIdType  numValues 
)
overridevirtual

Default implementation raises a runtime error.

If subclasses keep on supporting this API, they should override this method.

Implements vtkDataArray.

Reimplemented in vtkmDataArray< T >, and vtkMappedDataArray< Scalar >.

◆ WritePointer()

template<class DerivedT , class ValueTypeT >
ValueType * vtkGenericDataArray< DerivedT, ValueTypeT >::WritePointer ( vtkIdType  valueIdx,
vtkIdType  numValues 
)

Default implementation raises a runtime error.

If subclasses keep on supporting this API, they should override this method.

◆ RemoveTuple()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::RemoveTuple ( vtkIdType  tupleIdx)
overridevirtual

Removes a tuple at the given index.

Default implementation iterates over tuples to move elements. Subclasses are encouraged to reimplemented this method to support faster implementations, if needed.

Implements vtkDataArray.

Reimplemented in vtkPeriodicDataArray< Scalar >.

◆ InsertNextValue()

template<class DerivedT , class ValueTypeT >
vtkIdType vtkGenericDataArray< DerivedT, ValueTypeT >::InsertNextValue ( ValueType  value)

Insert data at the end of the array.

Return its location in the array.

◆ InsertValue()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::InsertValue ( vtkIdType  valueIdx,
ValueType  value 
)

Insert data at a specified position in the array.

◆ InsertTypedTuple()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::InsertTypedTuple ( vtkIdType  tupleIdx,
const ValueType t 
)

Insert (memory allocation performed) the tuple t at tupleIdx.

◆ InsertNextTypedTuple()

template<class DerivedT , class ValueTypeT >
vtkIdType vtkGenericDataArray< DerivedT, ValueTypeT >::InsertNextTypedTuple ( const ValueType t)

Insert (memory allocation performed) the tuple onto the end of the array.

◆ InsertTypedComponent()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::InsertTypedComponent ( vtkIdType  tupleIdx,
int  compIdx,
ValueType  val 
)

Insert (memory allocation performed) the value at the specified tuple and component location.

◆ GetValueRange() [1/5]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::GetValueRange ( ValueType  range[2],
int  comp,
const unsigned char *  ghosts,
unsigned char  ghostsToSkip = 0xff 
)

Get the range of array values for the given component in the native data type.

The optional ghosts array is used to skip values when computing the range. Values whose associated ghost matches types from ghostsToSkip are skipped. See vtkDataSetAttributes for a definition of ghosts.

See also
vtkDataSetAttributes

◆ GetValueRange() [2/5]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::GetValueRange ( ValueType  range[2],
int  comp 
)

Get the range of array values for the given component in the native data type.

The optional ghosts array is used to skip values when computing the range. Values whose associated ghost matches types from ghostsToSkip are skipped. See vtkDataSetAttributes for a definition of ghosts.

See also
vtkDataSetAttributes

◆ GetValueRange() [3/5]

template<class DerivedT , class ValueTypeT >
ValueType * vtkGenericDataArray< DerivedT, ValueTypeT >::GetValueRange ( int  comp)

Get the range of array values for the given component in the native data type.

The optional ghosts array is used to skip values when computing the range. Values whose associated ghost matches types from ghostsToSkip are skipped. See vtkDataSetAttributes for a definition of ghosts.

See also
vtkDataSetAttributes

◆ GetValueRange() [4/5]

template<class DerivedT , class ValueTypeT >
ValueType * vtkGenericDataArray< DerivedT, ValueTypeT >::GetValueRange ( )
inline

Get the range of array values for the 0th component in the native data type.

Definition at line 348 of file vtkGenericDataArray.h.

◆ GetValueRange() [5/5]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::GetValueRange ( ValueType  range[2])
inline

Definition at line 349 of file vtkGenericDataArray.h.

◆ GetFiniteValueRange() [1/5]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::GetFiniteValueRange ( ValueType  range[2],
int  comp,
const unsigned char *  ghosts,
unsigned char  ghostsToSkip = 0xff 
)

These methods are analogous to the GetValueRange methods, except that the only consider finite values.

◆ GetFiniteValueRange() [2/5]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::GetFiniteValueRange ( ValueType  range[2],
int  comp 
)

These methods are analogous to the GetValueRange methods, except that the only consider finite values.

◆ GetFiniteValueRange() [3/5]

template<class DerivedT , class ValueTypeT >
ValueType * vtkGenericDataArray< DerivedT, ValueTypeT >::GetFiniteValueRange ( int  comp)

These methods are analogous to the GetValueRange methods, except that the only consider finite values.

◆ GetFiniteValueRange() [4/5]

template<class DerivedT , class ValueTypeT >
ValueType * vtkGenericDataArray< DerivedT, ValueTypeT >::GetFiniteValueRange ( )
inline

These methods are analogous to the GetValueRange methods, except that the only consider finite values.

Definition at line 360 of file vtkGenericDataArray.h.

◆ GetFiniteValueRange() [5/5]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::GetFiniteValueRange ( ValueType  range[2])
inline

These methods are analogous to the GetValueRange methods, except that the only consider finite values.

Definition at line 361 of file vtkGenericDataArray.h.

◆ Capacity()

template<class DerivedT , class ValueTypeT >
vtkIdType vtkGenericDataArray< DerivedT, ValueTypeT >::Capacity ( )
inline

Return the capacity in typeof T units of the current array.

TODO Leftover from vtkDataArrayTemplate, redundant with GetSize. Deprecate?

Definition at line 368 of file vtkGenericDataArray.h.

◆ FillTypedComponent()

template<class DerivedT , class ValueTypeT >
virtual void vtkGenericDataArray< DerivedT, ValueTypeT >::FillTypedComponent ( int  compIdx,
ValueType  value 
)
virtual

Set component comp of all tuples to value.

◆ FillValue()

template<class DerivedT , class ValueTypeT >
virtual void vtkGenericDataArray< DerivedT, ValueTypeT >::FillValue ( ValueType  value)
virtual

Set all the values in array to value.

◆ GetDataType()

template<class DerivedT , class ValueTypeT >
int vtkGenericDataArray< DerivedT, ValueTypeT >::GetDataType ( ) const
overridevirtual

Return the underlying data type.

An integer indicating data type is returned as specified in vtkType.h.

Implements vtkAbstractArray.

Reimplemented in vtkIdTypeArray, and vtkTypedDataArray< Scalar >.

◆ GetDataTypeSize()

template<class DerivedT , class ValueTypeT >
int vtkGenericDataArray< DerivedT, ValueTypeT >::GetDataTypeSize ( ) const
overridevirtual

Return the size of the underlying data type.

For a bit, 0 is returned. For string 0 is returned. Arrays with variable length components return 0.

Implements vtkAbstractArray.

Reimplemented in vtkTypedDataArray< Scalar >.

◆ HasStandardMemoryLayout()

template<class DerivedT , class ValueTypeT >
bool vtkGenericDataArray< DerivedT, ValueTypeT >::HasStandardMemoryLayout ( ) const
overridevirtual

Returns true if this array uses the standard memory layout defined in the VTK user guide, e.g.

a contiguous array: {t1c1, t1c2, t1c3, ... t1cM, t2c1, ... tNcM} where t1c2 is the second component of the first tuple.

Reimplemented from vtkAbstractArray.

Reimplemented in vtkMappedDataArray< Scalar >.

◆ Allocate()

template<class DerivedT , class ValueTypeT >
vtkTypeBool vtkGenericDataArray< DerivedT, ValueTypeT >::Allocate ( vtkIdType  numValues,
vtkIdType  ext = 1000 
)
overridevirtual

Allocate memory for this array.

Delete old storage only if necessary. Note that ext is no longer used. This method will reset MaxId to -1 and resize the array capacity such that this->Size >= numValues. If numValues is 0, all memory will be freed. Return 1 on success, 0 on failure.

Implements vtkAbstractArray.

Reimplemented in vtkTypedDataArray< Scalar >, and vtkPeriodicDataArray< Scalar >.

◆ Resize()

template<class DerivedT , class ValueTypeT >
vtkTypeBool vtkGenericDataArray< DerivedT, ValueTypeT >::Resize ( vtkIdType  numTuples)
overridevirtual

Resize the array to the requested number of tuples and preserve data.

Increasing the array size may allocate extra memory beyond what was requested. MaxId will not be modified when increasing array size. Decreasing the array size will trim memory to the requested size and may update MaxId if the valid id range is truncated. Requesting an array size of 0 will free all memory. Returns 1 if resizing succeeded and 0 otherwise.

Implements vtkAbstractArray.

Reimplemented in vtkPeriodicDataArray< Scalar >, and vtkTypedDataArray< Scalar >.

◆ SetNumberOfComponents()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::SetNumberOfComponents ( int  )
overridevirtual

Set/Get the dimension (n) of the components.

Must be >= 1. Make sure that this is set before allocation.

Reimplemented from vtkAbstractArray.

Reimplemented in vtkScaledSOADataArrayTemplate< ValueTypeT >, and vtkSOADataArrayTemplate< ValueTypeT >.

◆ SetNumberOfTuples()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::SetNumberOfTuples ( vtkIdType  numTuples)
overridevirtual

Set the number of tuples (a component group) in the array.

Note that this may allocate space depending on the number of components. Also note that if allocation is performed no copy is performed so existing data will be lost (if data conservation is sought, one may use the Resize method instead).

Implements vtkAbstractArray.

Reimplemented in vtkPeriodicDataArray< Scalar >.

◆ Initialize()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::Initialize ( )
overridevirtual

Release storage and reset array to initial state.

Implements vtkAbstractArray.

Reimplemented in vtkImplicitArray< BackendT >, and vtkPeriodicDataArray< Scalar >.

◆ Squeeze()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::Squeeze ( )
overridevirtual

Free any unnecessary memory.

Description: Resize object to just fit data requirement. Reclaims extra memory.

Implements vtkAbstractArray.

Reimplemented in vtkImplicitArray< BackendT >, and vtkPeriodicDataArray< Scalar >.

◆ SetTuple() [1/3]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::SetTuple ( vtkIdType  dstTupleIdx,
vtkIdType  srcTupleIdx,
vtkAbstractArray source 
)
overridevirtual

See documentation from parent class.

This method assumes that the source inherits from vtkDataArray, but its value type doesn't have to match the type of the current instance.

Reimplemented from vtkDataArray.

Reimplemented in vtkPeriodicDataArray< Scalar >.

◆ SetTuple() [2/3]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::SetTuple ( vtkIdType  tupleIdx,
const float *  tuple 
)
inlineoverridevirtual

Set the data tuple at tupleIdx.

Note that range checking or memory allocation is not performed; use this method in conjunction with SetNumberOfTuples() to allocate space.

Reimplemented from vtkDataArray.

Reimplemented in vtkPeriodicDataArray< Scalar >.

Definition at line 392 of file vtkGenericDataArray.h.

◆ SetTuple() [3/3]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::SetTuple ( vtkIdType  tupleIdx,
const double *  tuple 
)
inlineoverridevirtual

Set the data tuple at tupleIdx.

Note that range checking or memory allocation is not performed; use this method in conjunction with SetNumberOfTuples() to allocate space.

Reimplemented from vtkDataArray.

Reimplemented in vtkPeriodicDataArray< Scalar >.

Definition at line 396 of file vtkGenericDataArray.h.

◆ InsertTuplesStartingAt()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::InsertTuplesStartingAt ( vtkIdType  dstStart,
vtkIdList srcIds,
vtkAbstractArray source 
)
overridevirtual

See documentation from parent class.

This method assumes that the source inherits from vtkDataArray, but its value type doesn't have to match the type of the current instance.

Reimplemented from vtkDataArray.

Reimplemented in vtkScaledSOADataArrayTemplate< ValueTypeT >, vtkSOADataArrayTemplate< ValueTypeT >, and vtkPeriodicDataArray< Scalar >.

◆ InsertTuples() [1/2]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::InsertTuples ( vtkIdList dstIds,
vtkIdList srcIds,
vtkAbstractArray source 
)
overridevirtual

See documentation from parent class.

This method assumes that the source inherits from vtkDataArray, but its value type doesn't have to match the type of the current instance.

Reimplemented from vtkDataArray.

Reimplemented in vtkScaledSOADataArrayTemplate< ValueTypeT >, vtkSOADataArrayTemplate< ValueTypeT >, and vtkPeriodicDataArray< Scalar >.

◆ InsertTuples() [2/2]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::InsertTuples ( vtkIdType  dstStart,
vtkIdType  n,
vtkIdType  srcStart,
vtkAbstractArray source 
)
inlineoverridevirtual

See documentation from parent class.

This method assumes that the source inherits from vtkDataArray, but its value type doesn't have to match the type of the current instance.

Reimplemented from vtkDataArray.

Reimplemented in vtkScaledSOADataArrayTemplate< ValueTypeT >, vtkSOADataArrayTemplate< ValueTypeT >, and vtkPeriodicDataArray< Scalar >.

Definition at line 406 of file vtkGenericDataArray.h.

◆ InsertTuple() [1/3]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::InsertTuple ( vtkIdType  dstTupleIdx,
vtkIdType  srcTupleIdx,
vtkAbstractArray source 
)
overridevirtual

See documentation from parent class.

This method assumes that the source inherits from vtkDataArray, but its value type doesn't have to match the type of the current instance.

Reimplemented from vtkDataArray.

Reimplemented in vtkPeriodicDataArray< Scalar >.

◆ InsertTuple() [2/3]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::InsertTuple ( vtkIdType  tupleIdx,
const float *  tuple 
)
overridevirtual

Insert the data tuple at tupleIdx.

Note that memory allocation is performed as necessary to hold the data.

Implements vtkDataArray.

Reimplemented in vtkPeriodicDataArray< Scalar >.

◆ InsertTuple() [3/3]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::InsertTuple ( vtkIdType  tupleIdx,
const double *  tuple 
)
overridevirtual

Insert the data tuple at tupleIdx.

Note that memory allocation is performed as necessary to hold the data.

Implements vtkDataArray.

Reimplemented in vtkPeriodicDataArray< Scalar >.

◆ InsertComponent()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::InsertComponent ( vtkIdType  tupleIdx,
int  compIdx,
double  value 
)
overridevirtual

Insert value at the location specified by tupleIdx and compIdx.

Note that memory allocation is performed as necessary to hold the data.

Reimplemented from vtkDataArray.

◆ InsertNextTuple() [1/3]

template<class DerivedT , class ValueTypeT >
vtkIdType vtkGenericDataArray< DerivedT, ValueTypeT >::InsertNextTuple ( vtkIdType  srcTupleIdx,
vtkAbstractArray source 
)
overridevirtual

See documentation from parent class.

This method assumes that the source inherits from vtkDataArray, but its value type doesn't have to match the type of the current instance.

Reimplemented from vtkDataArray.

Reimplemented in vtkPeriodicDataArray< Scalar >.

◆ InsertNextTuple() [2/3]

template<class DerivedT , class ValueTypeT >
vtkIdType vtkGenericDataArray< DerivedT, ValueTypeT >::InsertNextTuple ( const float *  tuple)
overridevirtual

Insert the data tuple at the end of the array and return the tuple index at which the data was inserted.

Memory is allocated as necessary to hold the data.

Implements vtkDataArray.

Reimplemented in vtkPeriodicDataArray< Scalar >.

◆ InsertNextTuple() [3/3]

template<class DerivedT , class ValueTypeT >
vtkIdType vtkGenericDataArray< DerivedT, ValueTypeT >::InsertNextTuple ( const double *  tuple)
overridevirtual

Insert the data tuple at the end of the array and return the tuple index at which the data was inserted.

Memory is allocated as necessary to hold the data.

Implements vtkDataArray.

Reimplemented in vtkPeriodicDataArray< Scalar >.

◆ GetTuples() [1/2]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::GetTuples ( vtkIdList tupleIds,
vtkAbstractArray output 
)
overridevirtual

Given a list of tuple ids, return an array of tuples.

You must ensure that the output array has been previously allocated with enough space to hold the data.

Reimplemented from vtkDataArray.

Reimplemented in vtkPeriodicDataArray< Scalar >, and vtkMappedDataArray< Scalar >.

◆ GetTuples() [2/2]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::GetTuples ( vtkIdType  p1,
vtkIdType  p2,
vtkAbstractArray output 
)
overridevirtual

Get the tuples for the range of tuple ids specified (i.e., p1->p2 inclusive).

You must ensure that the output array has been previously allocated with enough space to hold the data.

Reimplemented from vtkDataArray.

Reimplemented in vtkPeriodicDataArray< Scalar >, and vtkMappedDataArray< Scalar >.

◆ GetTuple() [1/2]

template<class DerivedT , class ValueTypeT >
double * vtkGenericDataArray< DerivedT, ValueTypeT >::GetTuple ( vtkIdType  tupleIdx)
overridevirtual

Get the data tuple at tupleIdx.

Return it as a pointer to an array. Note: this method is not thread-safe, and the pointer is only valid as long as another method invocation to a vtk object is not performed.

Implements vtkDataArray.

Reimplemented in vtkPeriodicDataArray< Scalar >.

◆ GetTuple() [2/2]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::GetTuple ( vtkIdType  tupleIdx,
double *  tuple 
)
overridevirtual

Get the data tuple at tupleIdx by filling in a user-provided array, Make sure that your array is large enough to hold the NumberOfComponents amount of data being returned.

Implements vtkDataArray.

Reimplemented in vtkPeriodicDataArray< Scalar >.

◆ InterpolateTuple() [1/2]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::InterpolateTuple ( vtkIdType  dstTupleIdx,
vtkIdList ptIndices,
vtkAbstractArray source,
double *  weights 
)
overridevirtual

Set the tuple at dstTupleIdx in this array to the interpolated tuple value, given the ptIndices in the source array and associated interpolation weights.

This method assumes that the two arrays are of the same type and structure.

Reimplemented from vtkDataArray.

Reimplemented in vtkPeriodicDataArray< Scalar >, and vtkMappedDataArray< Scalar >.

◆ InterpolateTuple() [2/2]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::InterpolateTuple ( vtkIdType  dstTupleIdx,
vtkIdType  srcTupleIdx1,
vtkAbstractArray source1,
vtkIdType  srcTupleIdx2,
vtkAbstractArray source2,
double  t 
)
overridevirtual

Insert the tuple at dstTupleIdx in this array to the tuple interpolated from the two tuple indices, srcTupleIdx1 and srcTupleIdx2, and an interpolation factor, t.

The interpolation factor ranges from (0,1), with t=0 located at the tuple described by srcTupleIdx1. This method assumes that the three arrays are of the same type, srcTupleIdx1 is an index to array source1, and srcTupleIdx2 is an index to array source2.

Reimplemented from vtkDataArray.

Reimplemented in vtkPeriodicDataArray< Scalar >, and vtkMappedDataArray< Scalar >.

◆ SetComponent()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::SetComponent ( vtkIdType  tupleIdx,
int  compIdx,
double  value 
)
overridevirtual

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()).

Reimplemented from vtkDataArray.

◆ GetComponent()

template<class DerivedT , class ValueTypeT >
double vtkGenericDataArray< DerivedT, ValueTypeT >::GetComponent ( vtkIdType  tupleIdx,
int  compIdx 
)
overridevirtual

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

Reimplemented from vtkDataArray.

◆ SetVariantValue()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::SetVariantValue ( vtkIdType  valueIdx,
vtkVariant  value 
)
overridevirtual

Set a value in the array from a variant.

This method does NOT do bounds checking.

Implements vtkAbstractArray.

Reimplemented in vtkPeriodicDataArray< Scalar >, and vtkMappedDataArray< Scalar >.

◆ GetVariantValue()

template<class DerivedT , class ValueTypeT >
vtkVariant vtkGenericDataArray< DerivedT, ValueTypeT >::GetVariantValue ( vtkIdType  valueIdx)
overridevirtual

Retrieve value from the array as a variant.

Reimplemented from vtkAbstractArray.

Reimplemented in vtkPeriodicDataArray< Scalar >, and vtkMappedDataArray< Scalar >.

◆ InsertVariantValue()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::InsertVariantValue ( vtkIdType  valueIdx,
vtkVariant  value 
)
overridevirtual

Insert a value into the array from a variant.

This method does bounds checking.

Implements vtkAbstractArray.

Reimplemented in vtkPeriodicDataArray< Scalar >.

◆ LookupValue() [1/2]

template<class DerivedT , class ValueTypeT >
vtkIdType vtkGenericDataArray< DerivedT, ValueTypeT >::LookupValue ( vtkVariant  value)
overridevirtual

Return the value indices where a specific value appears.

Warning
Make sure that the lookup structure is not outdated. Calls to Modified should be done appropriately so the array knows when to update its lookup structure.

Implements vtkAbstractArray.

Reimplemented in vtkPeriodicDataArray< Scalar >.

◆ LookupTypedValue() [1/2]

template<class DerivedT , class ValueTypeT >
virtual vtkIdType vtkGenericDataArray< DerivedT, ValueTypeT >::LookupTypedValue ( ValueType  value)
virtual

◆ LookupValue() [2/2]

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::LookupValue ( vtkVariant  value,
vtkIdList valueIds 
)
overridevirtual

Return the value indices where a specific value appears.

Warning
Make sure that the lookup structure is not outdated. Calls to Modified should be done appropriately so the array knows when to update its lookup structure.

Implements vtkAbstractArray.

Reimplemented in vtkPeriodicDataArray< Scalar >.

◆ LookupTypedValue() [2/2]

template<class DerivedT , class ValueTypeT >
virtual void vtkGenericDataArray< DerivedT, ValueTypeT >::LookupTypedValue ( ValueType  value,
vtkIdList valueIds 
)
virtual

◆ ClearLookup()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::ClearLookup ( )
overridevirtual

Delete the associated fast lookup data structure on this array, if it exists.

The lookup will be rebuilt on the next call to a lookup function.

Implements vtkAbstractArray.

Reimplemented in vtkPeriodicDataArray< Scalar >.

◆ DataChanged()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::DataChanged ( )
overridevirtual

Tell the array explicitly that the data has changed.

This is only necessary to call when you modify the array contents without using the array's API (i.e. you retrieve a pointer to the data and modify the array contents). You need to call this so that the fast lookup will know to rebuild itself. Otherwise, the lookup functions will give incorrect results.

Implements vtkAbstractArray.

Reimplemented in vtkMappedDataArray< Scalar >.

◆ FillComponent()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::FillComponent ( int  compIdx,
double  value 
)
overridevirtual

Fill a component of a data array with a specified value.

This method sets the specified component to specified value for all tuples in the data array. This methods can be used to initialize or reinitialize a single component of a multi-component array.

Reimplemented from vtkDataArray.

◆ NewIterator()

template<class DerivedT , class ValueTypeT >
vtkArrayIterator * vtkGenericDataArray< DerivedT, ValueTypeT >::NewIterator ( )
overridevirtual

Subclasses must override this method and provide the right kind of templated vtkArrayIteratorTemplate.

Implements vtkAbstractArray.

Reimplemented in vtkScaledSOADataArrayTemplate< ValueTypeT >, vtkSOADataArrayTemplate< ValueTypeT >, and vtkPeriodicDataArray< Scalar >.

◆ EnsureAccessToTuple()

template<class DerivedT , class ValueTypeT >
bool vtkGenericDataArray< DerivedT, ValueTypeT >::EnsureAccessToTuple ( vtkIdType  tupleIdx)
protected

◆ ComputeValueRange()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::ComputeValueRange ( ValueType  range[2],
int  comp,
const unsigned char *  ghosts,
unsigned char  ghostsToSkip = 0xff 
)
protected

Compute the range for a specific component.

If comp is set -1 then L2 norm is computed on all components. Call ClearRange to force a recomputation if it is needed. The range is copied to the range argument. THIS METHOD IS NOT THREAD SAFE.

◆ ComputeFiniteValueRange()

template<class DerivedT , class ValueTypeT >
void vtkGenericDataArray< DerivedT, ValueTypeT >::ComputeFiniteValueRange ( ValueType  range[2],
int  comp,
const unsigned char *  ghosts,
unsigned char  ghostsToSkip = 0xff 
)
protected

Compute the range for a specific component.

If comp is set -1 then L2 norm is computed on all components. Call ClearRange to force a recomputation if it is needed. The range is copied to the range argument. THIS METHOD IS NOT THREAD SAFE.

◆ ComputeScalarValueRange()

template<class DerivedT , class ValueTypeT >
bool vtkGenericDataArray< DerivedT, ValueTypeT >::ComputeScalarValueRange ( ValueType ranges,
const unsigned char *  ghosts,
unsigned char  ghostsToSkip = 0xff 
)
protected

Computes the range for each component of an array, the length of ranges must be two times the number of components.

Returns true if the range was computed. Will return false if you try to compute the range of an array of length zero.

◆ ComputeVectorValueRange()

template<class DerivedT , class ValueTypeT >
bool vtkGenericDataArray< DerivedT, ValueTypeT >::ComputeVectorValueRange ( ValueType  range[2],
const unsigned char *  ghosts,
unsigned char  ghostsToSkip = 0xff 
)
protected

Returns true if the range was computed.

Will return false if you try to compute the range of an array of length zero.

◆ ComputeFiniteScalarValueRange()

template<class DerivedT , class ValueTypeT >
bool vtkGenericDataArray< DerivedT, ValueTypeT >::ComputeFiniteScalarValueRange ( ValueType ranges,
const unsigned char *  ghosts,
unsigned char  ghostsToSkip = 0xff 
)
protected

Computes the range for each component of an array, the length of ranges must be two times the number of components.

Returns true if the range was computed. Will return false if you try to compute the range of an array of length zero.

◆ ComputeFiniteVectorValueRange()

template<class DerivedT , class ValueTypeT >
bool vtkGenericDataArray< DerivedT, ValueTypeT >::ComputeFiniteVectorValueRange ( ValueType  range[2],
const unsigned char *  ghosts,
unsigned char  ghostsToSkip = 0xff 
)
protected

Returns true if the range was computed.

Will return false if you try to compute the range of an array of length zero.

Member Data Documentation

◆ LegacyTuple

template<class DerivedT , class ValueTypeT >
std::vector<double> vtkGenericDataArray< DerivedT, ValueTypeT >::LegacyTuple
protected

Definition at line 521 of file vtkGenericDataArray.h.

◆ LegacyValueRange

template<class DerivedT , class ValueTypeT >
std::vector<ValueType> vtkGenericDataArray< DerivedT, ValueTypeT >::LegacyValueRange
protected

Definition at line 522 of file vtkGenericDataArray.h.

◆ LegacyValueRangeFull

template<class DerivedT , class ValueTypeT >
std::vector<ValueType> vtkGenericDataArray< DerivedT, ValueTypeT >::LegacyValueRangeFull
protected

Definition at line 523 of file vtkGenericDataArray.h.

◆ Lookup

template<class DerivedT , class ValueTypeT >
vtkGenericDataArrayLookupHelper<SelfType> vtkGenericDataArray< DerivedT, ValueTypeT >::Lookup
protected

Definition at line 525 of file vtkGenericDataArray.h.


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