VTK  9.3.20240329
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
vtkImplicitArray< BackendT > Class Template Reference

A read only array class that wraps an implicit function from integers to any value type supported by VTK. More...

#include <vtkImplicitArray.h>

Inheritance diagram for vtkImplicitArray< BackendT >:
[legend]
Collaboration diagram for vtkImplicitArray< BackendT >:
[legend]

Public Types

using SelfType = vtkImplicitArray< BackendT >
 
using ValueType = typename GenericDataArrayType::ValueType
 
using BackendType = BackendT
 
- Public Types inherited from vtkGenericDataArray< vtkImplicitArray< BackendT >, vtk::detail::implicit_array_traits< BackendT >::rtype >
enum  
 Compile time access to the VTK type identifier. More...
 
typedef vtk::detail::implicit_array_traits< BackendT >::rtype 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

 vtkImplicitArrayTypeMacro (SelfType, GenericDataArrayType)
 
template<typename... Params>
void ConstructBackend (Params &&... params)
 Utility method for setting backend parameterization directly. More...
 
void * GetVoidPointer (vtkIdType valueIdx) override
 Use of this method is discouraged, it creates a memory copy of the data into a contiguous AoS-ordered buffer internally. More...
 
void Squeeze () override
 Release all extraneous internal memory including the void pointer used by GetVoidPointer More...
 
int GetArrayType () const override
 Get the type of array this is when down casting. More...
 
void Initialize () override
 Reset the array to default construction. More...
 
unsigned long GetActualMemorySize () const override
 Return the memory in kibibytes (1024 bytes) consumed by this implicit data array. More...
 
template<typename OtherBackend >
void ImplicitDeepCopy (vtkImplicitArray< OtherBackend > *other)
 Specific DeepCopy for implicit arrays. More...
 
ValueType GetValue (vtkIdType idx) const
 Implementation of vtkGDAConceptMethods. More...
 
void SetValue (vtkIdType idx, ValueType value)
 Will not do anything for these read only arrays! More...
 
void GetTypedTuple (vtkIdType idx, ValueType *tuple) const
 Copy the tuple at idx into tuple. More...
 
void SetTypedTuple (vtkIdType tupleIdx, const ValueType *tuple)
 Will not do anything for these read only arrays! More...
 
ValueType GetTypedComponent (vtkIdType idx, int comp) const
 Get component comp of the tuple at idx. More...
 
void SetTypedComponent (vtkIdType tupleIdx, int comp, ValueType value)
 Will not do anything for these read only arrays! More...
 
void SetBackend (std::shared_ptr< BackendT > newBackend)
 Setter/Getter for Backend. More...
 
std::shared_ptr< BackendT > GetBackend ()
 Setter/Getter for Backend. More...
 
- Public Member Functions inherited from vtkGenericDataArray< vtkImplicitArray< BackendT >, vtk::detail::implicit_array_traits< BackendT >::rtype >
 vtkTemplateTypeMacro (SelfType, vtkDataArray)
 
ValueType GetValue (vtkIdType valueIdx) const
 Get the value at valueIdx. More...
 
void SetValue (vtkIdType valueIdx, ValueType value)
 Set the value at valueIdx to value. More...
 
void GetTypedTuple (vtkIdType tupleIdx, ValueType *tuple) const
 Copy the tuple at tupleIdx into tuple. More...
 
void SetTypedTuple (vtkIdType tupleIdx, const ValueType *tuple)
 Set this array's tuple at tupleIdx to the values in tuple. More...
 
ValueType GetTypedComponent (vtkIdType tupleIdx, int compIdx) const
 Get component compIdx of the tuple at tupleIdx. More...
 
void SetTypedComponent (vtkIdType tupleIdx, int compIdx, ValueType value)
 Set component compIdx of the tuple at tupleIdx to value. More...
 
void RemoveTuple (vtkIdType tupleIdx) override
 Removes a tuple at the given index. More...
 
vtkIdType InsertNextValue (ValueType value)
 Insert data at the end of the array. More...
 
void InsertValue (vtkIdType valueIdx, ValueType value)
 Insert data at a specified position in the array. More...
 
void InsertTypedTuple (vtkIdType tupleIdx, const ValueType *t)
 Insert (memory allocation performed) the tuple t at tupleIdx. More...
 
vtkIdType InsertNextTypedTuple (const ValueType *t)
 Insert (memory allocation performed) the tuple onto the end of the array. More...
 
void InsertTypedComponent (vtkIdType tupleIdx, int compIdx, ValueType val)
 Insert (memory allocation performed) the value at the specified tuple and component location. More...
 
ValueTypeGetValueRange ()
 Get the range of array values for the 0th component in the native data type. More...
 
void GetValueRange (ValueType range[2])
 
vtkIdType Capacity ()
 Return the capacity in typeof T units of the current array. More...
 
virtual void FillTypedComponent (int compIdx, ValueType value)
 Set component comp of all tuples to value. More...
 
virtual void FillValue (ValueType value)
 Set all the values in array to value. More...
 
int GetDataType () const override
 Return the underlying data type. More...
 
int GetDataTypeSize () const override
 Return the size of the underlying data type. More...
 
bool HasStandardMemoryLayout () const override
 Returns true if this array uses the standard memory layout defined in the VTK user guide, e.g. More...
 
vtkTypeBool Allocate (vtkIdType size, vtkIdType ext=1000) override
 Allocate memory for this array. More...
 
vtkTypeBool Resize (vtkIdType numTuples) override
 Resize the array to the requested number of tuples and preserve data. More...
 
void SetNumberOfComponents (int num) override
 Set/Get the dimension (n) of the components. More...
 
void SetNumberOfTuples (vtkIdType number) override
 Set the number of tuples (a component group) in the array. More...
 
void Initialize () override
 Release storage and reset array to initial state. More...
 
void Squeeze () override
 Free any unnecessary memory. More...
 
void SetTuple (vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source) override
 See documentation from parent class. More...
 
void SetTuple (vtkIdType tupleIdx, const float *tuple) override
 Set the data tuple at tupleIdx. More...
 
void SetTuple (vtkIdType tupleIdx, const double *tuple) override
 Set the data tuple at tupleIdx. More...
 
void InsertTuplesStartingAt (vtkIdType dstStart, vtkIdList *srcIds, vtkAbstractArray *source) override
 See documentation from parent class. More...
 
void InsertTuples (vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source) override
 See documentation from parent class. More...
 
void InsertTuples (vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray *source) override
 See documentation from parent class. More...
 
void InsertTuple (vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source) override
 See documentation from parent class. More...
 
void InsertTuple (vtkIdType tupleIdx, const float *source) override
 Insert the data tuple at tupleIdx. More...
 
void InsertTuple (vtkIdType tupleIdx, const double *source) override
 Insert the data tuple at tupleIdx. More...
 
void InsertComponent (vtkIdType tupleIdx, int compIdx, double value) override
 Insert value at the location specified by tupleIdx and compIdx. More...
 
vtkIdType InsertNextTuple (vtkIdType srcTupleIdx, vtkAbstractArray *source) override
 See documentation from parent class. More...
 
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. More...
 
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. More...
 
void GetTuples (vtkIdList *tupleIds, vtkAbstractArray *output) override
 Given a list of tuple ids, return an array of tuples. More...
 
void GetTuples (vtkIdType p1, vtkIdType p2, vtkAbstractArray *output) override
 Get the tuples for the range of tuple ids specified (i.e., p1->p2 inclusive). More...
 
double * GetTuple (vtkIdType tupleIdx) override
 Get the data tuple at tupleIdx. More...
 
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. More...
 
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. More...
 
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. More...
 
void SetComponent (vtkIdType tupleIdx, int compIdx, double value) override
 Set the data component at the location specified by tupleIdx and compIdx to value. More...
 
double GetComponent (vtkIdType tupleIdx, int compIdx) override
 Return the data component at the location specified by tupleIdx and compIdx. More...
 
void SetVariantValue (vtkIdType valueIdx, vtkVariant value) override
 Set a value in the array from a variant. More...
 
vtkVariant GetVariantValue (vtkIdType valueIdx) override
 Retrieve value from the array as a variant. More...
 
void InsertVariantValue (vtkIdType valueIdx, vtkVariant value) override
 Insert a value into the array from a variant. More...
 
vtkIdType LookupValue (vtkVariant value) override
 Return the value indices where a specific value appears. More...
 
void LookupValue (vtkVariant value, vtkIdList *valueIds) override
 Return the value indices where a specific value appears. More...
 
virtual vtkIdType LookupTypedValue (ValueType value)
 
virtual void LookupTypedValue (ValueType value, vtkIdList *valueIds)
 
void ClearLookup () override
 Delete the associated fast lookup data structure on this array, if it exists. More...
 
void DataChanged () override
 Tell the array explicitly that the data has changed. More...
 
void FillComponent (int compIdx, double value) override
 Fill a component of a data array with a specified value. More...
 
vtkArrayIteratorNewIterator () override
 Subclasses must override this method and provide the right kind of templated vtkArrayIteratorTemplate. More...
 
void * GetVoidPointer (vtkIdType valueIdx) override
 Default implementation raises a runtime error. More...
 
ValueTypeGetPointer (vtkIdType valueIdx)
 Default implementation raises a runtime error. More...
 
void SetVoidArray (void *, vtkIdType, int) override
 Default implementation raises a runtime error. More...
 
void SetVoidArray (void *, vtkIdType, int, int) override
 Default implementation raises a runtime error. More...
 
void SetArrayFreeFunction (void(*callback)(void *)) override
 Default implementation raises a runtime error. More...
 
void * WriteVoidPointer (vtkIdType valueIdx, vtkIdType numValues) override
 Default implementation raises a runtime error. More...
 
ValueTypeWritePointer (vtkIdType valueIdx, vtkIdType numValues)
 Default implementation raises a runtime error. More...
 
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. More...
 
void GetValueRange (ValueType range[2], int comp)
 Get the range of array values for the given component in the native data type. More...
 
ValueTypeGetValueRange (int comp)
 Get the range of array values for the given component in the native data type. More...
 
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. More...
 
void GetFiniteValueRange (ValueType range[2], int comp)
 These methods are analogous to the GetValueRange methods, except that the only consider finite values. More...
 
ValueTypeGetFiniteValueRange (int comp)
 These methods are analogous to the GetValueRange methods, except that the only consider finite values. More...
 
ValueTypeGetFiniteValueRange ()
 These methods are analogous to the GetValueRange methods, except that the only consider finite values. More...
 
void GetFiniteValueRange (ValueType range[2])
 These methods are analogous to the GetValueRange methods, except that the only consider finite values. More...
 
- 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. More...
 
vtkDataArrayNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
int IsNumeric () const override
 This method is here to make backward compatibility easier. More...
 
int GetElementComponentSize () const override
 Return the size, in bytes, of the lowest-level element of an array. More...
 
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). More...
 
virtual void ShallowCopy (vtkDataArray *other)
 Create a shallow copy of other into this, if possible. More...
 
virtual void Fill (double value)
 Fill all values of a data array with a specified value. More...
 
virtual void CopyComponent (int dstComponent, vtkDataArray *src, int srcComponent)
 Copy a component from one data array into a component on this data array. More...
 
void CreateDefaultLookupTable ()
 Create default lookup table. More...
 
double * GetRange ()
 Return the range of the data array. More...
 
void GetRange (double range[2])
 The range of the data array values will be returned in the provided range array argument. More...
 
double * GetFiniteRange ()
 Return the range of the data array. More...
 
void GetFiniteRange (double range[2])
 The range of the data array values will be returned in the provided range array argument. More...
 
virtual double GetMaxNorm ()
 Return the maximum norm for the tuples. More...
 
void Modified () override
 Removes out-of-date L2_NORM_RANGE() and L2_NORM_FINITE_RANGE() values. More...
 
int CopyInformation (vtkInformation *infoFrom, vtkTypeBool deep=1) override
 Copy information instance. More...
 
double GetTuple1 (vtkIdType tupleIdx)
 These methods are included as convenience for the wrappers. More...
 
double * GetTuple2 (vtkIdType tupleIdx)
 These methods are included as convenience for the wrappers. More...
 
double * GetTuple3 (vtkIdType tupleIdx)
 These methods are included as convenience for the wrappers. More...
 
double * GetTuple4 (vtkIdType tupleIdx)
 These methods are included as convenience for the wrappers. More...
 
double * GetTuple6 (vtkIdType tupleIdx)
 These methods are included as convenience for the wrappers. More...
 
double * GetTuple9 (vtkIdType tupleIdx)
 These methods are included as convenience for the wrappers. More...
 
void SetTuple1 (vtkIdType tupleIdx, double value)
 These methods are included as convenience for the wrappers. More...
 
void SetTuple2 (vtkIdType tupleIdx, double val0, double val1)
 These methods are included as convenience for the wrappers. More...
 
void SetTuple3 (vtkIdType tupleIdx, double val0, double val1, double val2)
 These methods are included as convenience for the wrappers. More...
 
void SetTuple4 (vtkIdType tupleIdx, double val0, double val1, double val2, double val3)
 These methods are included as convenience for the wrappers. More...
 
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. More...
 
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. More...
 
void InsertTuple1 (vtkIdType tupleIdx, double value)
 These methods are included as convenience for the wrappers. More...
 
void InsertTuple2 (vtkIdType tupleIdx, double val0, double val1)
 These methods are included as convenience for the wrappers. More...
 
void InsertTuple3 (vtkIdType tupleIdx, double val0, double val1, double val2)
 These methods are included as convenience for the wrappers. More...
 
void InsertTuple4 (vtkIdType tupleIdx, double val0, double val1, double val2, double val3)
 These methods are included as convenience for the wrappers. More...
 
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. More...
 
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. More...
 
void InsertNextTuple1 (double value)
 These methods are included as convenience for the wrappers. More...
 
void InsertNextTuple2 (double val0, double val1)
 These methods are included as convenience for the wrappers. More...
 
void InsertNextTuple3 (double val0, double val1, double val2)
 These methods are included as convenience for the wrappers. More...
 
void InsertNextTuple4 (double val0, double val1, double val2, double val3)
 These methods are included as convenience for the wrappers. More...
 
void InsertNextTuple6 (double val0, double val1, double val2, double val3, double val4, double val5)
 These methods are included as convenience for the wrappers. More...
 
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. More...
 
virtual void RemoveFirstTuple ()
 These methods remove tuples from the data array. More...
 
virtual void RemoveLastTuple ()
 These methods remove tuples from the data array. More...
 
void DeepCopy (vtkAbstractArray *aa) override
 Deep copy of data. More...
 
virtual void DeepCopy (vtkDataArray *da)
 Deep copy of data. More...
 
void SetLookupTable (vtkLookupTable *lut)
 Set/get the lookup table associated with this scalar data, if any. More...
 
virtual vtkLookupTableGetLookupTable ()
 Set/get the lookup table associated with this scalar data, if any. More...
 
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. More...
 
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. More...
 
double * GetRange (int comp)
 Return the range of the data array values for the given component. More...
 
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. More...
 
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. More...
 
double * GetFiniteRange (int comp)
 Return the range of the data array values for the given component. More...
 
void GetDataTypeRange (double range[2])
 These methods return the Min and Max possible range of the native data type. More...
 
double GetDataTypeMin ()
 These methods return the Min and Max possible range of the native data type. More...
 
double GetDataTypeMax ()
 These methods return the Min and Max possible range of the native data type. More...
 
- Public Member Functions inherited from vtkAbstractArray
vtkAbstractArrayNewInstance () const
 
void SetComponentName (vtkIdType component, const char *name)
 Set the name for a component. More...
 
const char * GetComponentName (vtkIdType component) const
 Get the component name for a given component. More...
 
bool HasAComponentName () const
 Returns if any component has had a name assigned. More...
 
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. More...
 
virtual bool SetNumberOfValues (vtkIdType numValues)
 Specify the number of values (tuples * components) for this object to hold. More...
 
vtkIdType GetNumberOfTuples () const
 Get the number of complete tuples (a component group) in the array. More...
 
vtkIdType GetNumberOfValues () const
 Get the total number of values in the array. More...
 
vtkIdType GetSize () const
 Return the size of the data. More...
 
vtkIdType GetMaxId () const
 What is the maximum id currently in the array. More...
 
virtual void ExportToVoidPointer (void *out_ptr)
 This method copies the array data to the void pointer specified by the user. More...
 
virtual const char * GetDataTypeAsString () const
 Get the name of a data type as a string. More...
 
virtual bool IsIntegral () const
 This method will return true if and only if an array contains integer-valued data. More...
 
virtual vtkIdType GetDataSize () const
 Returns the size of the data in DataTypeSize units. More...
 
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). More...
 
vtkInformationGetInformation ()
 Get an information object that can be used to annotate the array. More...
 
bool HasInformation () const
 Inquire if this array has an instance of vtkInformation already associated with it. More...
 
const char * GetArrayTypeAsString () const
 Get the name for the array type as string. More...
 
int GetNumberOfComponents () const
 Set/Get the dimension (n) of the components. More...
 
void Reset ()
 Reset to an empty state, without freeing any memory. More...
 
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. More...
 
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. More...
 
virtual void SetName (const char *)
 Set/get array's name. More...
 
virtual char * GetName ()
 Set/get array's name. More...
 
virtual unsigned int GetMaxDiscreteValues ()
 Get/Set the maximum number of prominent values this array may contain before it is considered continuous. More...
 
virtual void SetMaxDiscreteValues (unsigned int)
 Get/Set the maximum number of prominent values this array may contain before it is considered continuous. 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 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...
 
vtkCommandGetCommand (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...
 
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 vtkImplicitArrayNew ()
 
static vtkImplicitArray< BackendT > * FastDownCast (vtkAbstractArray *source)
 Perform a fast, safe cast from a vtkAbstractArray to a vtkDataArray. More...
 
- 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. More...
 
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. More...
 
static vtkInformationDoubleVectorKeyCOMPONENT_RANGE ()
 This key is used to hold tight bounds on the range of one component over all tuples of the array. More...
 
static vtkInformationDoubleVectorKeyL2_NORM_RANGE ()
 This key is used to hold tight bounds on the $L_2$ norm of tuples in the array. More...
 
static vtkInformationDoubleVectorKeyL2_NORM_FINITE_RANGE ()
 This key is used to hold tight bounds on the $L_2$ norm of tuples in the array. More...
 
static vtkInformationStringKeyUNITS_LABEL ()
 A human-readable string indicating the units for the array data. More...
 
static void GetDataTypeRange (int type, double range[2])
 These methods return the Min and Max possible range of the native data type. More...
 
static double GetDataTypeMin (int type)
 These methods return the Min and Max possible range of the native data type. More...
 
static double GetDataTypeMax (int type)
 These methods return the Min and Max possible range of the native data type. More...
 
- 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. More...
 
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. More...
 
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. More...
 
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. More...
 
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). More...
 
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. More...
 
static int GetDataTypeSize (int type)
 Return the size of the underlying data type. More...
 
- 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. 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 vtkObjectBaseNew ()
 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

 vtkImplicitArray ()
 
 ~vtkImplicitArray () override
 
bool AllocateTuples (vtkIdType vtkNotUsed(numTuples))
 No allocation necessary. More...
 
bool ReallocateTuples (vtkIdType vtkNotUsed(numTuples))
 No allocation necessary. More...
 
- Protected Member Functions inherited from vtkGenericDataArray< vtkImplicitArray< BackendT >, vtk::detail::implicit_array_traits< BackendT >::rtype >
 vtkGenericDataArray ()
 
 ~vtkGenericDataArray () override
 
bool AllocateTuples (vtkIdType numTuples)
 Allocate space for numTuples. More...
 
bool ReallocateTuples (vtkIdType numTuples)
 Allocate space for numTuples. More...
 
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. More...
 
void ComputeFiniteValueRange (ValueType range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Compute the range for a specific component. More...
 
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. More...
 
bool ComputeVectorValueRange (ValueType range[2], const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Returns true if the range was computed. More...
 
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. More...
 
bool ComputeFiniteVectorValueRange (ValueType range[2], const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Returns true if the range was computed. More...
 
- 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. More...
 
virtual void ComputeRange (double range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Compute the range for a specific component. More...
 
virtual void ComputeFiniteRange (double range[2], int comp)
 Compute the range for a specific component. More...
 
virtual void ComputeFiniteRange (double range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Compute the range for a specific component. More...
 
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. More...
 
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. More...
 
virtual bool ComputeVectorRange (double range[2])
 Returns true if the range was computed. More...
 
virtual bool ComputeVectorRange (double range[2], const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Returns true if the range was computed. More...
 
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. More...
 
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. More...
 
virtual bool ComputeFiniteVectorRange (double range[2])
 Returns true if the range was computed. More...
 
virtual bool ComputeFiniteVectorRange (double range[2], const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Returns true if the range was computed. More...
 
- Protected Member Functions inherited from vtkAbstractArray
 vtkAbstractArray ()
 
 ~vtkAbstractArray () override
 
virtual void SetInformation (vtkInformation *)
 Set an information object that can be used to annotate the array. More...
 
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. More...
 
- 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 &)
 

Protected Attributes

std::unique_ptr< vtkInternals > Internals
 
std::shared_ptr< BackendT > Backend
 The backend object actually mapping the indexes. More...
 
- Protected Attributes inherited from vtkGenericDataArray< vtkImplicitArray< BackendT >, vtk::detail::implicit_array_traits< BackendT >::rtype >
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
 

Friends

class vtkGenericDataArray< vtkImplicitArray< BackendT >, ValueTypeT >
 

Additional Inherited Members

- Static Protected Member Functions inherited from vtkObjectBase
static vtkMallocingFunction GetCurrentMallocFunction ()
 
static vtkReallocingFunction GetCurrentReallocFunction ()
 
static vtkFreeingFunction GetCurrentFreeFunction ()
 
static vtkFreeingFunction GetAlternateFreeFunction ()
 

Detailed Description

template<class BackendT>
class vtkImplicitArray< BackendT >

A read only array class that wraps an implicit function from integers to any value type supported by VTK.

This templated array class allows one to mimic the vtkDataArray interface using an implicit map behind the scenes. The BackendT type can be a class or a struct that implements a const map method that takes integers to any VTK value type. It can also be any type of Closure/Functor that implements a const operator() method from integers to the value type of the array. If a void mapTuple(vtkIdType, TupleType*) const method is also present, the array will use this method to to populate the tuple instead of the map method. If a ValueType mapComponent(vtkIdType, int) const method is also present, the array will use this method to populate the GetTypedComponent function instead of the map method.

The ordering of the array for tuples and components is implicitly AOS.

The backend type can be trivially constructible, in which case the array gets initialized with a default constructed instance of the BackendT, or not default constructible, in which case the backend is initially a nullptr and must be set using the SetBackend method.

Being a "read_only" array, any attempt to set a value in the array will result in a warning message with no change to the backend itself. This may evolve in future versions of the class as the needs of users become clearer.

The GetVoidPointer method will create an internal vtkAOSDataArrayTemplate and populate it with the values from the implicit array and can thus be very memory intensive. The Squeeze method will destroy this internal memory array. Both deep and shallow copies to other types of arrays will populate the other array with the implicit values contained in the implicit one. Deep and shallow copies from other array into this one do not make sense and will result in undefined behavior. Deep and shallow copies from implicit arrays of the same type will act the same way and will transfer a shared backend object pointer. Deep and shallow copies from one type of implicit array to a different type should result in a compile time error.

Constraints on the backend type are enforced through implicit_array_traits found in the vtkImplicitArrayTraits header file. These traits use metaprogramming to check the proposed backend type at compile time. The decision to use this type of structure was taken for the following reasons:

Example for array that always returns 42:

struct Const42
{
int operator()(int idx) const { return 42; }
};
Allocate and hold a VTK object.
Definition: vtkNew.h:160

Example for array that implements map and mapTuple

struct ConstTupleStruct
{
int Tuple[3] = { 0, 0, 0 };
// constructor
ConstTupleStruct(int tuple[3])
{
this->Tuple[0] = tuple[0];
this->Tuple[1] = tuple[1];
this->Tuple[2] = tuple[2];
}
// used for GetValue
int map(int idx) const
{
int tuple[3];
this->mapTuple(idx / 3, tuple);
return tuple[idx % 3];
}
// used for GetTypedTuple
void mapTuple(int vtkNotUsed(idx), int* tuple) const
{
tuple[0] = this->tuple[0];
tuple[1] = this->tuple[1];
tuple[2] = this->tuple[2];
}
};

example for array that implements map and mapComponent

struct ConstComponentStruct
{
int Tuple[3] = { 0, 0, 0 };
ConstComponentStruct(int tuple[3])
{
this->Tuple[0] = tuple[0];
this->Tuple[1] = tuple[1];
this->Tuple[2] = tuple[2];
}
// used for GetValue
int map(int idx) const { return this->mapComponent(idx / 3, idx % 3); }
// used for GetTypedComponent
int mapComponent(int vtkNotUsed(idx), int comp) const { return this->Tuple[comp]; }
};

A peculiarity of vtkImplicitArrays is that their NewInstance method no longer gives an instance of the exact same array type. A NewInstance call on a vtkImplicitArray will return a vtkAOSDataArrayTemplate<ValueTypeT> with the same value type as the original implicit array. This is so that the following workflow (used extensively throughout VTK) can work without issues:

struct Const42
{
int operator()(int idx) const { return 42; }
};
arr42->SetNumberOfTuples(11);
arr43->SetNumberOfComponents(arr42->GetNumberOfComponents());
arr43->SetNumberOfTuples(arr42->GetNumberOfTuples());
arr43->Fill(43);
virtual void SetNumberOfTuples(vtkIdType numTuples)=0
Set the number of tuples (a component group) in the array.
virtual void SetNumberOfComponents(int)
Set/Get the dimension (n) of the components.
virtual void Fill(double value)
Fill all values of a data array with a specified value.
vtkSmartPointer< T > TakeSmartPointer(T *obj)
Construct a vtkSmartPointer<T> containing obj.

Optionally, vtkImplicitArrays backends can return their memory usage in KiB by defining the function getMemorySize returning unsigned long. vtkImplicitArray then exposes this function through the GetActualMemorySize function. If the backend does not define it, GetActualMemorySize always returns 1.

See also
vtkGenericDataArray vtkImplicitArrayTraits vtkDataArray

Definition at line 160 of file vtkImplicitArray.h.

Member Typedef Documentation

◆ SelfType

template<class BackendT >
using vtkImplicitArray< BackendT >::SelfType = vtkImplicitArray<BackendT>

Definition at line 172 of file vtkImplicitArray.h.

◆ ValueType

template<class BackendT >
using vtkImplicitArray< BackendT >::ValueType = typename GenericDataArrayType::ValueType

Definition at line 174 of file vtkImplicitArray.h.

◆ BackendType

template<class BackendT >
using vtkImplicitArray< BackendT >::BackendType = BackendT

Definition at line 175 of file vtkImplicitArray.h.

Constructor & Destructor Documentation

◆ vtkImplicitArray()

template<class BackendT >
vtkImplicitArray< BackendT >::vtkImplicitArray ( )
protected

◆ ~vtkImplicitArray()

template<class BackendT >
vtkImplicitArray< BackendT >::~vtkImplicitArray ( )
overrideprotected

Member Function Documentation

◆ vtkImplicitArrayTypeMacro()

template<class BackendT >
vtkImplicitArray< BackendT >::vtkImplicitArrayTypeMacro ( SelfType  ,
GenericDataArrayType   
)

◆ New()

template<class BackendT >
static vtkImplicitArray* vtkImplicitArray< BackendT >::New ( )
static

◆ GetValue()

template<class BackendT >
ValueType vtkImplicitArray< BackendT >::GetValue ( vtkIdType  idx) const
inline

Implementation of vtkGDAConceptMethods.

Get the value at idx. idx assumes AOS ordering.

Definition at line 186 of file vtkImplicitArray.h.

◆ SetValue()

template<class BackendT >
void vtkImplicitArray< BackendT >::SetValue ( vtkIdType  idx,
ValueType  value 
)

Will not do anything for these read only arrays!

◆ GetTypedTuple()

template<class BackendT >
void vtkImplicitArray< BackendT >::GetTypedTuple ( vtkIdType  idx,
ValueType tuple 
) const
inline

Copy the tuple at idx into tuple.

Definition at line 196 of file vtkImplicitArray.h.

◆ SetTypedTuple()

template<class BackendT >
void vtkImplicitArray< BackendT >::SetTypedTuple ( vtkIdType  tupleIdx,
const ValueType tuple 
)

Will not do anything for these read only arrays!

◆ GetTypedComponent()

template<class BackendT >
ValueType vtkImplicitArray< BackendT >::GetTypedComponent ( vtkIdType  idx,
int  comp 
) const
inline

Get component comp of the tuple at idx.

Definition at line 209 of file vtkImplicitArray.h.

◆ SetTypedComponent()

template<class BackendT >
void vtkImplicitArray< BackendT >::SetTypedComponent ( vtkIdType  tupleIdx,
int  comp,
ValueType  value 
)

Will not do anything for these read only arrays!

◆ SetBackend()

template<class BackendT >
void vtkImplicitArray< BackendT >::SetBackend ( std::shared_ptr< BackendT >  newBackend)
inline

Setter/Getter for Backend.

Definition at line 224 of file vtkImplicitArray.h.

◆ GetBackend()

template<class BackendT >
std::shared_ptr<BackendT> vtkImplicitArray< BackendT >::GetBackend ( )
inline

Setter/Getter for Backend.

Definition at line 229 of file vtkImplicitArray.h.

◆ ConstructBackend()

template<class BackendT >
template<typename... Params>
void vtkImplicitArray< BackendT >::ConstructBackend ( Params &&...  params)
inline

Utility method for setting backend parameterization directly.

Definition at line 236 of file vtkImplicitArray.h.

◆ GetVoidPointer()

template<class BackendT >
void* vtkImplicitArray< BackendT >::GetVoidPointer ( vtkIdType  valueIdx)
overridevirtual

Use of this method is discouraged, it creates a memory copy of the data into a contiguous AoS-ordered buffer internally.

Implements vtkAbstractArray.

◆ Squeeze()

template<class BackendT >
void vtkImplicitArray< BackendT >::Squeeze ( )
overridevirtual

Release all extraneous internal memory including the void pointer used by GetVoidPointer

Implements vtkAbstractArray.

◆ GetArrayType()

template<class BackendT >
int vtkImplicitArray< BackendT >::GetArrayType ( ) const
inlineoverridevirtual

Get the type of array this is when down casting.

Reimplemented from vtkDataArray.

Definition at line 255 of file vtkImplicitArray.h.

◆ Initialize()

template<class BackendT >
void vtkImplicitArray< BackendT >::Initialize ( )
inlineoverridevirtual

Reset the array to default construction.

Implements vtkAbstractArray.

Definition at line 260 of file vtkImplicitArray.h.

◆ GetActualMemorySize()

template<class BackendT >
unsigned long vtkImplicitArray< BackendT >::GetActualMemorySize ( ) const
inlineoverridevirtual

Return the memory in kibibytes (1024 bytes) consumed by this implicit data array.

The value returned is guaranteed to be greater than or equal to the memory required to actually represent the data represented by this object.

Implicit array backends can implement the getMemorySize function to override the default implementation, which always returns 1.

Reimplemented from vtkDataArray.

Definition at line 275 of file vtkImplicitArray.h.

◆ ImplicitDeepCopy()

template<class BackendT >
template<typename OtherBackend >
void vtkImplicitArray< BackendT >::ImplicitDeepCopy ( vtkImplicitArray< OtherBackend > *  other)
inline

Specific DeepCopy for implicit arrays.

This method should be preferred for two implicit arrays having the same backend. We cannot call the method DeepCopy since that conflicts with the virtual function of the same name that cannot be templated. The non-interopability of templates and virtual functions is a language limitation at the time of writing this documentation. We can call this from the dispatched version of the DeepCopy in vtkDataArray. However, the implicit array needs to be dispatchable in order to to not enter into the Generic implementation of the deep copy. This dispatch is not always the case for all implicit arrays.

Definition at line 292 of file vtkImplicitArray.h.

◆ FastDownCast()

template<class BackendT >
static vtkImplicitArray<BackendT>* vtkImplicitArray< BackendT >::FastDownCast ( vtkAbstractArray source)
static

Perform a fast, safe cast from a vtkAbstractArray to a vtkDataArray.

This method checks if source->GetArrayType() returns DataArray or a more derived type, and performs a static_cast to return source as a vtkDataArray pointer. Otherwise, nullptr is returned.

◆ AllocateTuples()

template<class BackendT >
bool vtkImplicitArray< BackendT >::AllocateTuples ( vtkIdType   vtkNotUsednumTuples)
inlineprotected

No allocation necessary.

Definition at line 320 of file vtkImplicitArray.h.

◆ ReallocateTuples()

template<class BackendT >
bool vtkImplicitArray< BackendT >::ReallocateTuples ( vtkIdType   vtkNotUsednumTuples)
inlineprotected

No allocation necessary.

Definition at line 321 of file vtkImplicitArray.h.

Friends And Related Function Documentation

◆ vtkGenericDataArray< vtkImplicitArray< BackendT >, ValueTypeT >

template<class BackendT >
friend class vtkGenericDataArray< vtkImplicitArray< BackendT >, ValueTypeT >
friend

Definition at line 480 of file vtkImplicitArray.h.

Member Data Documentation

◆ Internals

template<class BackendT >
std::unique_ptr<vtkInternals> vtkImplicitArray< BackendT >::Internals
protected

Definition at line 325 of file vtkImplicitArray.h.

◆ Backend

template<class BackendT >
std::shared_ptr<BackendT> vtkImplicitArray< BackendT >::Backend
protected

The backend object actually mapping the indexes.

Definition at line 330 of file vtkImplicitArray.h.


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