VTK
|
Map non-contiguous data structures into the vtkDataArray API. More...
#include <vtkMappedDataArray.h>
Map non-contiguous data structures into the vtkDataArray API.
vtkMappedDataArray is a superclass for vtkDataArrays that do not use the standard memory layout, and allows VTK to interface with simulation codes for in-situ analysis without repacking simulation data.
vtkMappedDataArrayNewInstanceMacro is used by subclasses to implement NewInstanceInternal such that a non-mapped vtkDataArray is returned by NewInstance(). This prevents the mapped array type from propogating through the pipeline.
int GetDataType()
(see Caveat in vtkTypedDataArray). Definition at line 42 of file vtkMappedDataArray.h.
typedef vtkTypedDataArray<Scalar> vtkMappedDataArray< Scalar >::Superclass |
Reimplemented from vtkTypeTemplate< vtkMappedDataArray< Scalar >, vtkTypedDataArray< Scalar > >.
Reimplemented in vtkTypeTemplate< vtkCPExodusIIResultsArrayTemplate< Scalar >, vtkMappedDataArray< Scalar > >, and vtkTypeTemplate< vtkCPExodusIINodalCoordinatesTemplate< Scalar >, vtkMappedDataArray< Scalar > >.
Definition at line 46 of file vtkMappedDataArray.h.
typedef Superclass::ValueType vtkMappedDataArray< Scalar >::ValueType |
Typedef to get the type of value stored in the array.
Reimplemented from vtkTypedDataArray< Scalar >.
Definition at line 47 of file vtkMappedDataArray.h.
vtkMappedDataArray< Scalar >::vtkMappedDataArray | ( | ) | [protected] |
vtkMappedDataArray< Scalar >::~vtkMappedDataArray | ( | ) | [protected] |
static vtkMappedDataArray<Scalar>* vtkMappedDataArray< Scalar >::FastDownCast | ( | vtkAbstractArray * | source | ) | [static] |
Perform a fast, safe cast from a vtkAbstractArray to a vtkMappedDataArray. This method checks if: - source->GetArrayType() is appropriate, and - source->GetDataType() matches the Scalar template argument if these conditions are met, the method performs a static_cast to return source as a vtkMappedDataArray pointer. Otherwise, NULL is returned.
Reimplemented from vtkTypedDataArray< Scalar >.
void vtkMappedDataArray< Scalar >::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkDataArray.
Reimplemented in vtkCPExodusIIResultsArrayTemplate< Scalar >, and vtkCPExodusIINodalCoordinatesTemplate< Scalar >.
void vtkMappedDataArray< Scalar >::DeepCopy | ( | vtkAbstractArray * | aa | ) | [pure virtual] |
Deep copy of data. Copies data from different data arrays even if they are different types (using doubleing-point exchange).
Reimplemented from vtkDataArray.
Implemented in vtkCPExodusIINodalCoordinatesTemplate< Scalar >, and vtkCPExodusIIResultsArrayTemplate< Scalar >.
vtkVariant vtkMappedDataArray< Scalar >::GetVariantValue | ( | vtkIdType | idx | ) | [pure virtual] |
Retrieve value from the array as a variant.
Reimplemented from vtkAbstractArray.
Implemented in vtkCPExodusIINodalCoordinatesTemplate< Scalar >, and vtkCPExodusIIResultsArrayTemplate< Scalar >.
void vtkMappedDataArray< Scalar >::SetVariantValue | ( | vtkIdType | idx, |
vtkVariant | value | ||
) | [pure virtual] |
Set a value in the array from a variant. This method does NOT do bounds checking.
Implements vtkAbstractArray.
Implemented in vtkCPExodusIINodalCoordinatesTemplate< Scalar >, and vtkCPExodusIIResultsArrayTemplate< Scalar >.
void vtkMappedDataArray< Scalar >::GetTuples | ( | vtkIdList * | ptIds, |
vtkAbstractArray * | output | ||
) | [pure virtual] |
Given a list of point ids, return an array of tuples. You must insure that the output array has been previously allocated with enough space to hold the data.
Reimplemented from vtkDataArray.
Implemented in vtkCPExodusIINodalCoordinatesTemplate< Scalar >, and vtkCPExodusIIResultsArrayTemplate< Scalar >.
void vtkMappedDataArray< Scalar >::GetTuples | ( | vtkIdType | p1, |
vtkIdType | p2, | ||
vtkAbstractArray * | output | ||
) | [pure virtual] |
Get the tuples for the range of points ids specified (i.e., p1->p2 inclusive). You must insure that the output array has been previously allocated with enough space to hold the data.
Reimplemented from vtkDataArray.
Implemented in vtkCPExodusIINodalCoordinatesTemplate< Scalar >, and vtkCPExodusIIResultsArrayTemplate< Scalar >.
void vtkMappedDataArray< Scalar >::InterpolateTuple | ( | vtkIdType | i, |
vtkIdList * | ptIndices, | ||
vtkAbstractArray * | source, | ||
double * | weights | ||
) | [pure virtual] |
Set the ith tuple in this array as the interpolated tuple value, given the ptIndices in the source array and associated interpolation weights. This method assumes that the two arrays are of the same type and strcuture.
Reimplemented from vtkDataArray.
Implemented in vtkCPExodusIINodalCoordinatesTemplate< Scalar >, and vtkCPExodusIIResultsArrayTemplate< Scalar >.
void vtkMappedDataArray< Scalar >::InterpolateTuple | ( | vtkIdType | i, |
vtkIdType | id1, | ||
vtkAbstractArray * | source1, | ||
vtkIdType | id2, | ||
vtkAbstractArray * | source2, | ||
double | t | ||
) | [pure virtual] |
Insert the ith tuple in this array as interpolated from the two values, p1 and p2, and an interpolation factor, t. The interpolation factor ranges from (0,1), with t=0 located at p1. This method assumes that the three arrays are of the same type. p1 is value at index id1 in source1, while, p2 is value at index id2 in source2.
Reimplemented from vtkDataArray.
Implemented in vtkCPExodusIINodalCoordinatesTemplate< Scalar >, and vtkCPExodusIIResultsArrayTemplate< Scalar >.
void vtkMappedDataArray< Scalar >::DeepCopy | ( | vtkDataArray * | da | ) | [pure virtual] |
Deep copy of data. Copies data from different data arrays even if they are different types (using doubleing-point exchange).
Reimplemented from vtkDataArray.
Implemented in vtkCPExodusIINodalCoordinatesTemplate< Scalar >, and vtkCPExodusIIResultsArrayTemplate< Scalar >.
void* vtkMappedDataArray< Scalar >::GetVoidPointer | ( | vtkIdType | id | ) | [virtual] |
Print an error and create an internal, long-lived temporary array. This method should not be used on vtkMappedDataArray subclasses. See vtkTypedDataArrayIterator and/or vtkDataArrayIteratorMacro instead.
Implements vtkAbstractArray.
void vtkMappedDataArray< Scalar >::ExportToVoidPointer | ( | void * | ptr | ) |
Copy the internal data to the void pointer. The pointer is cast to this array's Scalar type and vtkTypedDataArrayIterator is used to populate the input array.
void vtkMappedDataArray< Scalar >::DataChanged | ( | ) | [virtual] |
Read the data from the internal temporary array (created by GetVoidPointer) back into the mapped array. If GetVoidPointer has not been called (and the internal array therefore does not exist), print an error and return. The default implementation uses vtkTypedDataArrayIterator to extract the mapped data.
Implements vtkAbstractArray.
void vtkMappedDataArray< Scalar >::SetVoidArray | ( | void * | , |
vtkIdType | , | ||
int | |||
) |
This method doesn't make sense for mapped data array. Prints an error and returns.
void* vtkMappedDataArray< Scalar >::WriteVoidPointer | ( | vtkIdType | , |
vtkIdType | |||
) | [inline, virtual] |
Not implemented. Print error and return NULL.
Implements vtkDataArray.
Definition at line 97 of file vtkMappedDataArray.h.
void vtkMappedDataArray< Scalar >::Modified | ( | ) | [virtual] |
Invalidate the internal temporary array and call superclass method.
Reimplemented from vtkObject.
bool vtkMappedDataArray< Scalar >::HasStandardMemoryLayout | ( | ) | [inline, virtual] |
Returns true if this array uses the standard memory layout defined in the VTK user guide, e.g. a contiguous array: {t1c1, t1c2, t1c3, ... t1cM, t2c1, ... tNcM} where t1c2 is the second component of the first tuple. If the array does not have the standard memory layout GetVoidPointer should not be used, as a deep copy of the data must be made. Instead, use a vtkTypedDataArrayIterator to get pointer-like semantics that can safely access the data values. Subclasses that return false here must derive from vtkMappedDataArray to ensure that they will work safely with the rest of the pipeline.
Reimplemented from vtkAbstractArray.
Definition at line 108 of file vtkMappedDataArray.h.
virtual int vtkMappedDataArray< Scalar >::GetArrayType | ( | ) | [inline, protected, virtual] |
Method for type-checking in FastDownCast implementations.
Reimplemented from vtkTypedDataArray< Scalar >.
Definition at line 114 of file vtkMappedDataArray.h.