vtkScaledSOADataArrayTemplate< ValueTypeT > Class Template Reference

Struct-Of-Arrays implementation of vtkGenericDataArray with a scaling factor. More...

`#include <vtkScaledSOADataArrayTemplate.h>`

Inheritance diagram for vtkScaledSOADataArrayTemplate< ValueTypeT >:
[legend]
Collaboration diagram for vtkScaledSOADataArrayTemplate< ValueTypeT >:
[legend]

## Public Types

enum | DeleteMethod { VTK_DATA_ARRAY_FREE = vtkAbstractArray::VTK_DATA_ARRAY_FREE, VTK_DATA_ARRAY_DELETE = vtkAbstractArray::VTK_DATA_ARRAY_DELETE, VTK_DATA_ARRAY_ALIGNED_FREE = vtkAbstractArray::VTK_DATA_ARRAY_ALIGNED_FREE, VTK_DATA_ARRAY_USER_DEFINED = vtkAbstractArray::VTK_DATA_ARRAY_USER_DEFINED }
typedef vtkScaledSOADataArrayTemplate< ValueTypeT > | SelfType
typedef Superclass::ValueType | ValueType
Public Types inherited from vtkGenericDataArray< vtkScaledSOADataArrayTemplate< ValueTypeT >, ValueTypeT >
enum |
| 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, DataArrayTemplate = AoSDataArrayTemplate }
typedef vtkObject | Superclass

## Public Member Functions

| vtkTemplateTypeMacro (SelfType, GenericDataArrayType)
void | SetScale (ValueType scale)
| Set/Get the Scale value for the object. More...
ValueType | GetScale () const
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 comp) const
| Get component comp of the tuple at tupleIdx. More...
void | SetTypedComponent (vtkIdType tupleIdx, int comp, ValueType value)
| Set component comp of the tuple at tupleIdx to value. More...
void | FillTypedComponent (int compIdx, ValueType value) override
| Set component comp of all tuples to value. More...
void | SetArray (int comp, ValueType *array, vtkIdType size, bool updateMaxId=false, bool save=false, int deleteMethod=VTK_DATA_ARRAY_FREE)
| Use this API to pass externally allocated memory to this instance. More...
void | SetArrayFreeFunction (void(*callback)(void *)) override
| This method allows the user to specify a custom free function to be called when the array is deallocated. More...
void | SetArrayFreeFunction (int comp, void(*callback)(void *))
| This method allows the user to specify a custom free function to be called when the array is deallocated. More...
ValueType * | GetComponentArrayPointer (int comp)
| Return a pointer to a contiguous block of memory containing all values for a particular components (ie. More...
void * | GetVoidPointer (vtkIdType valueIdx) override
| Use of this method is discouraged, it creates a deep copy of the data into a contiguous AoS-ordered buffer and prints a warning. More...
void | ExportToVoidPointer (void *ptr) override
| Export a copy of the data in AoS ordering to the preallocated memory buffer. More...
int | GetArrayType () const override
| Method for type-checking in FastDownCast implementations. More...
vtkArrayIterator * | NewIterator () override
| Subclasses must override this method and provide the right kind of templated vtkArrayIteratorTemplate. More...
void | SetNumberOfComponents (int numComps) override
| Set/Get the dimension (n) of the components. More...
void | ShallowCopy (vtkDataArray *other) override
| Create a shallow copy of other into this, if possible. More...
void | InsertTuples (vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray *source) override
| Copy n consecutive tuples starting at srcStart from the source array to this array, starting at the dstStart location. More...
void | InsertTuples (vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source) override
| Copy the tuples indexed in srcIds from the source array to the tuple locations indexed by dstIds in this array. More...
Public Member Functions inherited from vtkGenericDataArray< vtkScaledSOADataArrayTemplate< ValueTypeT >, ValueTypeT >
| 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 * | GetVoidPointer (vtkIdType valueIdx) override
| Default implementation raises a runtime error. More...
ValueType * | GetPointer (vtkIdType valueIdx)
void | SetVoidArray (void *, vtkIdType, int) override
void | SetVoidArray (void *, vtkIdType, int, int) override
void | SetArrayFreeFunction (void(*callback)(void *)) override
| This method allows the user to specify a custom free function to be called when the array is deallocated. More...
void * | WriteVoidPointer (vtkIdType valueIdx, vtkIdType numValues) override
| Get the address of a particular data index. More...
ValueType * | WritePointer (vtkIdType valueIdx, vtkIdType numValues)
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...
void | GetValueRange (ValueType range[2], int comp)
| Get the range of array values for the given component in the native data type. More...
ValueType * | GetValueRange (int comp)
ValueType * | GetValueRange ()
| 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
| Set the tuple at dstTupleIdx in this array to the tuple at srcTupleIdx in the source array. More...
void | SetTuple (vtkIdType tupleIdx, const float *tuple) override
| Set the data tuple at tupleIdx. More...
void | SetTuple (vtkIdType tupleIdx, const double *tuple) override
void | InsertTuples (vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source) override
| Copy the tuples indexed in srcIds from the source array to the tuple locations indexed by dstIds in this array. More...
void | InsertTuples (vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray *source) override
| Copy n consecutive tuples starting at srcStart from the source array to this array, starting at the dstStart location. More...
void | InsertTuple (vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source) override
| Insert the tuple at srcTupleIdx in the source array into this array at dstTupleIdx. More...
void | InsertTuple (vtkIdType tupleIdx, const float *source) override
| Insert the data tuple at tupleIdx. More...
void | InsertTuple (vtkIdType tupleIdx, const double *source) override
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
| Insert the tuple from srcTupleIdx in the source array at the end of this array. 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
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
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...
vtkArrayIterator * | NewIterator () override
| Subclasses must override this method and provide the right kind of templated vtkArrayIteratorTemplate. More...
void | GetFiniteValueRange (ValueType range[2], int comp)
| These methods are analogous to the GetValueRange methods, except that the only consider finite values. More...
ValueType * | GetFiniteValueRange (int comp)
| These methods are analogous to the GetValueRange methods, except that the only consider finite values. More...
ValueType * | GetFiniteValueRange ()
| 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...
vtkDataArray * | NewInstance () 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...
double | GetTuple1 (vtkIdType tupleIdx)
| These methods are included as convenience for the wrappers. More...
double * | GetTuple2 (vtkIdType tupleIdx)
double * | GetTuple3 (vtkIdType tupleIdx)
double * | GetTuple4 (vtkIdType tupleIdx)
double * | GetTuple6 (vtkIdType tupleIdx)
double * | GetTuple9 (vtkIdType tupleIdx)
void | SetTuple1 (vtkIdType tupleIdx, double value)
| These methods are included as convenience for the wrappers. More...
void | SetTuple2 (vtkIdType tupleIdx, double val0, double val1)
void | SetTuple3 (vtkIdType tupleIdx, double val0, double val1, double val2)
void | SetTuple4 (vtkIdType tupleIdx, double val0, double val1, double val2, double val3)
void | SetTuple6 (vtkIdType tupleIdx, double val0, double val1, double val2, double val3, double val4, double val5)
void | SetTuple9 (vtkIdType tupleIdx, double val0, double val1, double val2, double val3, double val4, double val5, double val6, double val7, double val8)
void | InsertTuple1 (vtkIdType tupleIdx, double value)
| These methods are included as convenience for the wrappers. More...
void | InsertTuple2 (vtkIdType tupleIdx, double val0, double val1)
void | InsertTuple3 (vtkIdType tupleIdx, double val0, double val1, double val2)
void | InsertTuple4 (vtkIdType tupleIdx, double val0, double val1, double val2, double val3)
void | InsertTuple6 (vtkIdType tupleIdx, double val0, double val1, double val2, double val3, double val4, double val5)
void | InsertTuple9 (vtkIdType tupleIdx, double val0, double val1, double val2, double val3, double val4, double val5, double val6, double val7, double val8)
void | InsertNextTuple1 (double value)
| These methods are included as convenience for the wrappers. More...
void | InsertNextTuple2 (double val0, double val1)
void | InsertNextTuple3 (double val0, double val1, double val2)
void | InsertNextTuple4 (double val0, double val1, double val2, double val3)
void | InsertNextTuple6 (double val0, double val1, double val2, double val3, double val4, double val5)
void | InsertNextTuple9 (double val0, double val1, double val2, double val3, double val4, double val5, double val6, double val7, double val8)
virtual void | RemoveFirstTuple ()
virtual void | RemoveLastTuple ()
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...
void | DeepCopy (vtkAbstractArray *aa) override
| Deep copy of data. More...
virtual void | DeepCopy (vtkDataArray *da)
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...
unsigned long | GetActualMemorySize () const override
| Return the memory in kibibytes (1024 bytes) consumed by this data array. More...
void | CreateDefaultLookupTable ()
| Create default lookup table. More...
void | SetLookupTable (vtkLookupTable *lut)
| Set/get the lookup table associated with this scalar data, if any. More...
virtual vtkLookupTable * | GetLookupTable ()
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...
double * | GetRange (int comp)
| Return the range of the data array values for the given component. 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...
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...
double * | GetFiniteRange (int comp)
| Return the range of the data array values for the given component. 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...
void | GetDataTypeRange (double range[2])
| These methods return the Min and Max possible range of the native data type. More...
double | GetDataTypeMin ()
double | GetDataTypeMax ()
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, int deep=1) override
| Copy information instance. More...
Public Member Functions inherited from vtkAbstractArray
vtkAbstractArray * | NewInstance () const
virtual int | GetDataType () const =0
| Return the underlying data type. More...
virtual int | GetDataTypeSize () const =0
| Return the size of the underlying data type. More...
int | GetNumberOfComponents () 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 inputed 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...
virtual bool | HasStandardMemoryLayout () const
| Returns true if this array uses the standard memory layout defined in the VTK user guide, e.g. More...
void | Reset ()
| Reset to an empty state, without freeing any memory. 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 | 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))
virtual void | SetName (const char *)
| Set/get array's name. More...
virtual char * | GetName ()
virtual const char * | GetDataTypeAsString (void) const
| Get the name of a data type as a string. 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...
vtkInformation * | GetInformation ()
| 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...
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)
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...
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)
vtkCommand * | GetCommand (unsigned long tag)
void | RemoveObserver (vtkCommand *)
void | RemoveObservers (unsigned long event, vtkCommand *)
void | RemoveObservers (const char *event, vtkCommand *)
vtkTypeBool | HasObserver (unsigned long event, vtkCommand *)
vtkTypeBool | HasObserver (const char *event, vtkCommand *)
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)
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)
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...
int | InvokeEvent (unsigned long event, void *callData)
| This method invokes an event and return whether the event was aborted or not. More...
int | InvokeEvent (const char *event, void *callData)
int | InvokeEvent (unsigned long event)
int | InvokeEvent (const char *event)
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 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...
virtual void | Delete ()
| Delete a VTK object. More...
virtual void | FastDelete ()
| Delete a reference to this object. More...
void | InitializeObjectBase ()
void | Print (ostream &os)
| Print an object to an ostream. More...
virtual void | PrintHeader (ostream &os, vtkIndent indent)
virtual void | PrintTrailer (ostream &os, vtkIndent indent)
virtual void | Register (vtkObjectBase *o)
| Increase the reference count (mark as used by another object). More...
virtual void | UnRegister (vtkObjectBase *o)
| Decrease the reference count (release by another object). More...
int | GetReferenceCount ()
| Return the current reference count of this object. More...
void | SetReferenceCount (int)
| Sets the reference count. More...
void | PrintRevisions (ostream &)
| Legacy. More...

## Static Public Member Functions

static vtkScaledSOADataArrayTemplate * | New ()
static vtkScaledSOADataArrayTemplate< ValueType > * | 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 vtkDataArray * | SafeDownCast (vtkObjectBase *o)
static vtkDataArray * | FastDownCast (vtkAbstractArray *source)
| Perform a fast, safe cast from a vtkAbstractArray to a vtkDataArray. More...
static void | GetDataTypeRange (int type, double range[2])
static double | GetDataTypeMin (int type)
static double | GetDataTypeMax (int type)
static vtkDataArray * | CreateDataArray (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_DOUBLE, VTK_DOUBLE, VTK_ID_TYPE. More...
static vtkInformationDoubleVectorKey * | COMPONENT_RANGE ()
| This key is used to hold tight bounds on the range of one component over all tuples of the array. More...
static vtkInformationDoubleVectorKey * | L2_NORM_RANGE ()
| This key is used to hold tight bounds on the $L_2$ norm of tuples in the array. More...
static vtkInformationDoubleVectorKey * | L2_NORM_FINITE_RANGE ()
| This key is used to hold tight bounds on the $L_2$ norm of tuples in the array. More...
static vtkInformationStringKey * | UNITS_LABEL ()
| A human-readable string indicating the units for the array data. More...
Static Public Member Functions inherited from vtkAbstractArray
static vtkTypeBool | IsTypeOf (const char *type)
static vtkAbstractArray * | SafeDownCast (vtkObjectBase *o)
static int | GetDataTypeSize (int type)
static vtkAbstractArray * | CreateArray (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_DOUBLE, VTK_DOUBLE, VTK_ID_TYPE, VTK_STRING. More...
static vtkInformationIntegerKey * | GUI_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 vtkInformationInformationVectorKey * | PER_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 vtkInformationInformationVectorKey * | PER_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 vtkInformationVariantVectorKey * | DISCRETE_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 vtkInformationDoubleVectorKey * | DISCRETE_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 Public Member Functions inherited from vtkObject
static vtkObject * | New ()
| Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
static void | BreakOnError ()
| This method is called when vtkErrorMacro executes. More...
static void | SetGlobalWarningDisplay (int val)
| This is a global flag that controls whether any debug, warning or error messages are displayed. More...
static void | GlobalWarningDisplayOn ()
static void | GlobalWarningDisplayOff ()
static int | GetGlobalWarningDisplay ()
Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool | IsTypeOf (const char *name)
| Return 1 if this class type is the same type of (or a subclass of) the named class. More...
static vtkIdType | GetNumberOfGenerationsFromBaseType (const char *name)
| Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). More...
static vtkObjectBase * | New ()
| Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...

## Protected Member Functions

| vtkScaledSOADataArrayTemplate ()
| ~vtkScaledSOADataArrayTemplate () override
bool | AllocateTuples (vtkIdType numTuples)
| Allocate space for numTuples. More...
bool | ReallocateTuples (vtkIdType numTuples)
| Allocate space for numTuples. More...
Protected Member Functions inherited from vtkGenericDataArray< vtkScaledSOADataArrayTemplate< ValueTypeT >, ValueTypeT >
| 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)
| Compute the range for a specific component. More...
void | ComputeFiniteValueRange (ValueType range[2], int comp)
| Compute the range for a specific component. More...
bool | ComputeScalarValueRange (ValueType *ranges)
| 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])
| Returns true if the range was computed. More...
bool | ComputeFiniteScalarValueRange (ValueType *ranges)
| 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])
| Returns true if the range was computed. More...
Protected Member Functions inherited from vtkDataArray
virtual vtkObjectBase * | NewInstanceInternal () const
virtual void | ComputeRange (double range[2], int comp)
| 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 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 | ComputeVectorRange (double range[2])
| 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 | ComputeFiniteVectorRange (double range[2])
| Returns true if the range was computed. More...
| vtkDataArray ()
| ~vtkDataArray () override
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 ()
Protected Member Functions inherited from vtkObjectBase
| vtkObjectBase ()
virtual | ~vtkObjectBase ()
virtual void | CollectRevisions (ostream &)
virtual void | ReportReferences (vtkGarbageCollector *)
| vtkObjectBase (const vtkObjectBase &)
void | operator= (const vtkObjectBase &)

## Protected Attributes

std::vector< vtkBuffer< ValueType > * > | Data
vtkBuffer< ValueType > * | AoSCopy
Protected Attributes inherited from vtkGenericDataArray< vtkScaledSOADataArrayTemplate< ValueTypeT >, ValueTypeT >
std::vector< double > | LegacyTuple
std::vector< ValueType > | LegacyValueRange
std::vector< ValueType > | LegacyValueRangeFull
vtkGenericDataArrayLookupHelper< SelfType > | Lookup
Protected Attributes inherited from vtkDataArray
vtkLookupTable * | LookupTable
double | Range [2]
double | FiniteRange [2]
Protected Attributes inherited from vtkAbstractArray
vtkIdType | Size
vtkIdType | MaxId
int | NumberOfComponents
unsigned int | MaxDiscreteValues
char * | Name
bool | RebuildArray
vtkInformation * | Information
vtkInternalComponentNames * | ComponentNames
Protected Attributes inherited from vtkObject
bool | Debug
vtkTimeStamp | MTime
vtkSubjectHelper * | SubjectHelper
Protected Attributes inherited from vtkObjectBase
std::atomic< int32_t > | ReferenceCount
vtkWeakPointerBase ** | WeakPointers

## Friends

class | vtkGenericDataArray< vtkScaledSOADataArrayTemplate< ValueTypeT >, ValueTypeT >

## Detailed Description

### template<class ValueTypeT>
class vtkScaledSOADataArrayTemplate< ValueTypeT >

Struct-Of-Arrays implementation of vtkGenericDataArray with a scaling factor.

vtkScaledSOADataArrayTemplate is the counterpart of vtkSOADataArrayTemplate with a scaling factor. Each component is stored in a separate array. The Scale value is used to multiply the output of the stored value in the array. For example, if Scale is 2 and the requested tuple value stored in memory is [1, 2, 3] then the returned tuple values will actually be [2, 4, 6]. Similarly, if Scale is 2 and the tuple values for SetTupleValue() is [2, 4, 6] then the stored values in memory will be [1, 2, 3].

See also
  vtkGenericDataArray vtkSOADataArrayTemplate

Definition at line 43 of file vtkScaledSOADataArrayTemplate.h.

## Member Typedef Documentation

## SelfType

template<class ValueTypeT >

typedef vtkScaledSOADataArrayTemplate<ValueTypeT> vtkScaledSOADataArrayTemplate< ValueTypeT >::SelfType

Definition at line 50 of file vtkScaledSOADataArrayTemplate.h.

## ValueType

template<class ValueTypeT >

typedef Superclass::ValueType vtkScaledSOADataArrayTemplate< ValueTypeT >::ValueType

Definition at line 52 of file vtkScaledSOADataArrayTemplate.h.

## Member Enumeration Documentation

## DeleteMethod

template<class ValueTypeT >

enum vtkScaledSOADataArrayTemplate::DeleteMethod

Enumerator
VTK_DATA_ARRAY_FREE |
VTK_DATA_ARRAY_DELETE |
VTK_DATA_ARRAY_ALIGNED_FREE |
VTK_DATA_ARRAY_USER_DEFINED |

Definition at line 54 of file vtkScaledSOADataArrayTemplate.h.

## Constructor & Destructor Documentation

## vtkScaledSOADataArrayTemplate()

template<class ValueTypeT >

vtkScaledSOADataArrayTemplate< ValueTypeT >::vtkScaledSOADataArrayTemplate | ( |  | ) |

protected

## ~vtkScaledSOADataArrayTemplate()

template<class ValueTypeT >

vtkScaledSOADataArrayTemplate< ValueTypeT >::~vtkScaledSOADataArrayTemplate | ( |  | ) |

override protected

## Member Function Documentation

## vtkTemplateTypeMacro()

template<class ValueTypeT >

vtkScaledSOADataArrayTemplate< ValueTypeT >::vtkTemplateTypeMacro | ( | SelfType | ,
|  | GenericDataArrayType |
| ) |  |

## New()

template<class ValueTypeT >

static vtkScaledSOADataArrayTemplate* vtkScaledSOADataArrayTemplate< ValueTypeT >::New | ( |  | ) |

static

## SetScale()

template<class ValueTypeT >

void vtkScaledSOADataArrayTemplate< ValueTypeT >::SetScale | ( | ValueType | scale | ) |

inline

Set/Get the Scale value for the object.

The default is 1.

Definition at line 68 of file vtkScaledSOADataArrayTemplate.h.

## GetScale()

template<class ValueTypeT >

ValueType vtkScaledSOADataArrayTemplate< ValueTypeT >::GetScale | ( |  | ) | const

inline

Definition at line 83 of file vtkScaledSOADataArrayTemplate.h.

## GetValue()

template<class ValueTypeT >

ValueType vtkScaledSOADataArrayTemplate< ValueTypeT >::GetValue | ( | vtkIdType | valueIdx | ) | const

inline

Get the value at valueIdx.

valueIdx assumes AOS ordering.

Definition at line 90 of file vtkScaledSOADataArrayTemplate.h.

## SetValue()

template<class ValueTypeT >

void vtkScaledSOADataArrayTemplate< ValueTypeT >::SetValue | ( | vtkIdType | valueIdx,
|  | ValueType | value
| ) |  |

inline

Set the value at valueIdx to value.

valueIdx assumes AOS ordering.

Definition at line 103 of file vtkScaledSOADataArrayTemplate.h.

## GetTypedTuple()

template<class ValueTypeT >

void vtkScaledSOADataArrayTemplate< ValueTypeT >::GetTypedTuple | ( | vtkIdType | tupleIdx,
|  | ValueType * | tuple
| ) |  | const

inline

Copy the tuple at tupleIdx into tuple.

Definition at line 115 of file vtkScaledSOADataArrayTemplate.h.

## SetTypedTuple()

template<class ValueTypeT >

void vtkScaledSOADataArrayTemplate< ValueTypeT >::SetTypedTuple | ( | vtkIdType | tupleIdx,
|  | const ValueType * | tuple
| ) |  |

inline

Set this array's tuple at tupleIdx to the values in tuple.

Definition at line 126 of file vtkScaledSOADataArrayTemplate.h.

## GetTypedComponent()

template<class ValueTypeT >

ValueType vtkScaledSOADataArrayTemplate< ValueTypeT >::GetTypedComponent | ( | vtkIdType | tupleIdx,
|  | int | comp
| ) |  | const

inline

Get component comp of the tuple at tupleIdx.

Definition at line 137 of file vtkScaledSOADataArrayTemplate.h.

## SetTypedComponent()

template<class ValueTypeT >

void vtkScaledSOADataArrayTemplate< ValueTypeT >::SetTypedComponent | ( | vtkIdType | tupleIdx,
|  | int | comp,
|  | ValueType | value
| ) |  |

inline

Set component comp of the tuple at tupleIdx to value.

Definition at line 145 of file vtkScaledSOADataArrayTemplate.h.

## FillTypedComponent()

template<class ValueTypeT >

void vtkScaledSOADataArrayTemplate< ValueTypeT >::FillTypedComponent | ( | int | compIdx,
|  | ValueType | value
| ) |  |

override

Set component comp of all tuples to value.

## SetArray()

template<class ValueTypeT >

void vtkScaledSOADataArrayTemplate< ValueTypeT >::SetArray | ( | int | comp,
|  | ValueType * | array,
|  | vtkIdType | size,
|  | bool | updateMaxId = `false`,
|  | bool | save = `false`,
|  | int | deleteMethod = `VTK_DATA_ARRAY_FREE`
| ) |  |

Use this API to pass externally allocated memory to this instance.

Since vtkScaledSOADataArrayTemplate uses separate contiguous regions for each component, use this API to add arrays for each of the component. `save:` When set to true, vtkScaledSOADataArrayTemplate will not release or realloc the memory even when the AllocatorType is set to RESIZABLE. If needed it will simply allow new memory buffers and "forget" the supplied pointers. When save is set to false, this will be the `deleteMethod` specified to release the array. If updateMaxId is true, the array's MaxId will be updated, and assumes that size is the number of tuples in the array. `size` is specified in number of elements of ScalarType.

## SetArrayFreeFunction() [1/2]

template<class ValueTypeT >

void vtkScaledSOADataArrayTemplate< ValueTypeT >::SetArrayFreeFunction | ( | void(*)(void *) | callback | ) |

override virtual

This method allows the user to specify a custom free function to be called when the array is deallocated.

Calling this method will implicitly mean that the given free function will be called when the class cleans up or reallocates memory. This custom free function will be used for all components.

Implements vtkAbstractArray.

## SetArrayFreeFunction() [2/2]

template<class ValueTypeT >

void vtkScaledSOADataArrayTemplate< ValueTypeT >::SetArrayFreeFunction | ( | int | comp,
|  | void(*)(void *) | callback
| ) |  |

This method allows the user to specify a custom free function to be called when the array is deallocated.

Calling this method will implicitly mean that the given free function will be called when the class cleans up or reallocates memory.

## GetComponentArrayPointer()

template<class ValueTypeT >

ValueType* vtkScaledSOADataArrayTemplate< ValueTypeT >::GetComponentArrayPointer | ( | int | comp | ) |

Return a pointer to a contiguous block of memory containing all values for a particular components (ie.

a single array of the struct-of-arrays). Note that this is to raw memory and no scaling of the data is done here.

## GetVoidPointer()

template<class ValueTypeT >

void* vtkScaledSOADataArrayTemplate< ValueTypeT >::GetVoidPointer | ( | vtkIdType | valueIdx | ) |

override virtual

Use of this method is discouraged, it creates a deep copy of the data into a contiguous AoS-ordered buffer and prints a warning.

Implements vtkAbstractArray.

## ExportToVoidPointer()

template<class ValueTypeT >

void vtkScaledSOADataArrayTemplate< ValueTypeT >::ExportToVoidPointer | ( | void * | ptr | ) |

override virtual

Export a copy of the data in AoS ordering to the preallocated memory buffer.

Reimplemented from vtkAbstractArray.

## FastDownCast()

template<class ValueTypeT >

static vtkScaledSOADataArrayTemplate<ValueType>* vtkScaledSOADataArrayTemplate< ValueTypeT >::FastDownCast | ( | vtkAbstractArray * | source | ) |

inline 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.

Definition at line 215 of file vtkScaledSOADataArrayTemplate.h.

## GetArrayType()

template<class ValueTypeT >

int vtkScaledSOADataArrayTemplate< ValueTypeT >::GetArrayType | ( |  | ) | const

inline override virtual

Method for type-checking in FastDownCast implementations.

Reimplemented from vtkDataArray.

Definition at line 234 of file vtkScaledSOADataArrayTemplate.h.

## NewIterator()

template<class ValueTypeT >

vtkArrayIterator* vtkScaledSOADataArrayTemplate< ValueTypeT >::NewIterator | ( |  | ) |

override virtual

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

Implements vtkAbstractArray.

## SetNumberOfComponents()

template<class ValueTypeT >

void vtkScaledSOADataArrayTemplate< ValueTypeT >::SetNumberOfComponents | ( | int |  | ) |

override virtual

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

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

Reimplemented from vtkAbstractArray.

## ShallowCopy()

template<class ValueTypeT >

void vtkScaledSOADataArrayTemplate< ValueTypeT >::ShallowCopy | ( | vtkDataArray * | other | ) |

override virtual

Create a shallow copy of other into this, if possible.

Shallow copies are only possible: (a) if both arrays are the same data type (b) if both arrays are the same array type (e.g. AOS vs. SOA) (c) if both arrays support shallow copies (e.g. vtkBitArray currently does not.) If a shallow copy is not possible, a deep copy will be performed instead.

Reimplemented from vtkDataArray.

## InsertTuples() [1/2]

template<class ValueTypeT >

void vtkScaledSOADataArrayTemplate< ValueTypeT >::InsertTuples | ( | vtkIdType | dstStart,
|  | vtkIdType | n,
|  | vtkIdType | srcStart,
|  | vtkAbstractArray * | source
| ) |  |

override virtual

Copy n consecutive tuples starting at srcStart from the source array to this array, starting at the dstStart location.

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

Reimplemented from vtkDataArray.

## InsertTuples() [2/2]

template<class ValueTypeT >

void vtkScaledSOADataArrayTemplate< ValueTypeT >::InsertTuples | ( | vtkIdList * | dstIds,
|  | vtkIdList * | srcIds,
|  | vtkAbstractArray * | source
| ) |  |

inline override virtual

Copy the tuples indexed in srcIds from the source array to the tuple locations indexed by dstIds in this array.

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

Reimplemented from vtkDataArray.

Definition at line 244 of file vtkScaledSOADataArrayTemplate.h.

## AllocateTuples()

template<class ValueTypeT >

bool vtkScaledSOADataArrayTemplate< ValueTypeT >::AllocateTuples | ( | vtkIdType | numTuples | ) |

protected

Allocate space for numTuples.

Old data is not preserved. If numTuples == 0, all data is freed.

## ReallocateTuples()

template<class ValueTypeT >

bool vtkScaledSOADataArrayTemplate< ValueTypeT >::ReallocateTuples | ( | vtkIdType | numTuples | ) |

protected

Allocate space for numTuples.

Old data is preserved. If numTuples == 0, all data is freed.

## Friends And Related Function Documentation

## vtkGenericDataArray< vtkScaledSOADataArrayTemplate< ValueTypeT >, ValueTypeT >

template<class ValueTypeT >

friend class vtkGenericDataArray< vtkScaledSOADataArrayTemplate< ValueTypeT >, ValueTypeT >

friend

Definition at line 278 of file vtkScaledSOADataArrayTemplate.h.

## Member Data Documentation

## Data

template<class ValueTypeT >

std::vector<vtkBuffer<ValueType>*> vtkScaledSOADataArrayTemplate< ValueTypeT >::Data

protected

Definition at line 265 of file vtkScaledSOADataArrayTemplate.h.

## AoSCopy

template<class ValueTypeT >

vtkBuffer<ValueType>* vtkScaledSOADataArrayTemplate< ValueTypeT >::AoSCopy

protected

Definition at line 266 of file vtkScaledSOADataArrayTemplate.h.

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

- Common/Core/vtkScaledSOADataArrayTemplate.h