VTK
|
Map non-contiguous data structures into the vtkDataArray API. More...
#include <vtkMappedDataArray.h>
Public Types | |
typedef vtkTypedDataArray< Scalar > | Superclass |
typedef Superclass::ValueType | ValueType |
Public Types inherited from vtkTypeTemplate< vtkMappedDataArray< Scalar >, vtkTypedDataArray< Scalar > > | |
typedef vtkTypedDataArray< Scalar > | Superclass |
Public Types inherited from vtkTypedDataArray< Scalar > | |
enum | { VTK_DATA_TYPE = vtkTypeTraits<ValueType>::VTK_TYPE_ID } |
typedef Scalar | ValueType |
typedef vtkTypedDataArrayIterator< ValueType > | Iterator |
Public Types inherited from vtkTypeTemplate< vtkTypedDataArray< Scalar >, vtkDataArray > | |
typedef vtkDataArray | Superclass |
Public Types inherited from vtkDataArray | |
typedef vtkAbstractArray | Superclass |
Public Types inherited from vtkAbstractArray | |
enum | { MAX_DISCRETE_VALUES = 32 } |
enum | { AbstractArray = 0, DataArray, TypedDataArray, DataArrayTemplate, MappedDataArray } |
typedef vtkObject | Superclass |
Public Types inherited from vtkObject | |
typedef vtkObjectBase | Superclass |
Public Member Functions | |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | DeepCopy (vtkAbstractArray *aa)=0 |
vtkVariant | GetVariantValue (vtkIdType idx)=0 |
void | SetVariantValue (vtkIdType idx, vtkVariant value)=0 |
void | GetTuples (vtkIdList *ptIds, vtkAbstractArray *output)=0 |
void | GetTuples (vtkIdType p1, vtkIdType p2, vtkAbstractArray *output)=0 |
void | InterpolateTuple (vtkIdType i, vtkIdList *ptIndices, vtkAbstractArray *source, double *weights)=0 |
void | InterpolateTuple (vtkIdType i, vtkIdType id1, vtkAbstractArray *source1, vtkIdType id2, vtkAbstractArray *source2, double t)=0 |
void | DeepCopy (vtkDataArray *da)=0 |
void * | GetVoidPointer (vtkIdType id) |
void | ExportToVoidPointer (void *ptr) |
void | DataChanged () |
void | SetVoidArray (void *, vtkIdType, int) |
void | Modified () |
bool | HasStandardMemoryLayout () |
void * | WriteVoidPointer (vtkIdType, vtkIdType) |
Public Member Functions inherited from vtkTypeTemplate< vtkMappedDataArray< Scalar >, vtkTypedDataArray< Scalar > > | |
vtkMappedDataArray< Scalar > * | NewInstance () const |
Public Member Functions inherited from vtkTypedDataArray< Scalar > | |
Iterator | Begin () |
Iterator | End () |
int | GetDataType () |
int | GetDataTypeSize () |
virtual void | SetNumberOfValues (vtkIdType num) |
virtual void | SetTupleValue (vtkIdType i, const ValueType *t)=0 |
virtual void | InsertTupleValue (vtkIdType i, const ValueType *t)=0 |
virtual vtkIdType | InsertNextTupleValue (const ValueType *t)=0 |
virtual ValueType | GetValue (vtkIdType idx)=0 |
virtual ValueType & | GetValueReference (vtkIdType idx)=0 |
virtual void | SetValue (vtkIdType idx, ValueType value)=0 |
virtual void | GetTupleValue (vtkIdType idx, ValueType *t)=0 |
virtual vtkIdType | InsertNextValue (ValueType v)=0 |
virtual void | InsertValue (vtkIdType idx, ValueType v)=0 |
virtual vtkIdType | LookupTypedValue (ValueType value)=0 |
virtual void | LookupTypedValue (ValueType value, vtkIdList *ids)=0 |
Public Member Functions inherited from vtkTypeTemplate< vtkTypedDataArray< Scalar >, vtkDataArray > | |
vtkTypedDataArray< Scalar > * | NewInstance () const |
Public Member Functions inherited from vtkDataArray | |
vtkDataArray * | NewInstance () const |
virtual void | SetTuple (vtkIdType i, vtkIdType j, vtkAbstractArray *source)=0 |
virtual void | InsertTuple (vtkIdType i, vtkIdType j, vtkAbstractArray *source)=0 |
virtual vtkIdType | InsertNextTuple (vtkIdType j, vtkAbstractArray *source)=0 |
virtual double * | GetTuple (vtkIdType i)=0 |
virtual void | GetTuple (vtkIdType i, double *tuple)=0 |
virtual double | GetComponent (vtkIdType i, int j) |
virtual void | SetComponent (vtkIdType i, int j, double c) |
virtual void | InsertComponent (vtkIdType i, int j, double c) |
virtual void | FillComponent (int j, double c) |
virtual unsigned long | GetActualMemorySize () |
void | CreateDefaultLookupTable () |
virtual double | GetMaxNorm () |
virtual int | CopyInformation (vtkInformation *infoFrom, int deep=1) |
virtual int | IsNumeric () |
virtual int | GetElementComponentSize () |
double | GetTuple1 (vtkIdType i) |
double * | GetTuple2 (vtkIdType i) |
double * | GetTuple3 (vtkIdType i) |
double * | GetTuple4 (vtkIdType i) |
double * | GetTuple6 (vtkIdType i) |
double * | GetTuple9 (vtkIdType i) |
virtual void | SetTuple (vtkIdType i, const float *tuple)=0 |
virtual void | SetTuple (vtkIdType i, const double *tuple)=0 |
void | SetTuple1 (vtkIdType i, double value) |
void | SetTuple2 (vtkIdType i, double val0, double val1) |
void | SetTuple3 (vtkIdType i, double val0, double val1, double val2) |
void | SetTuple4 (vtkIdType i, double val0, double val1, double val2, double val3) |
void | SetTuple6 (vtkIdType i, double val0, double val1, double val2, double val3, double val4, double val5) |
void | SetTuple9 (vtkIdType i, double val0, double val1, double val2, double val3, double val4, double val5, double val6, double val7, double val8) |
virtual void | InsertTuple (vtkIdType i, const float *tuple)=0 |
virtual void | InsertTuple (vtkIdType i, const double *tuple)=0 |
void | InsertTuple1 (vtkIdType i, double value) |
void | InsertTuple2 (vtkIdType i, double val0, double val1) |
void | InsertTuple3 (vtkIdType i, double val0, double val1, double val2) |
void | InsertTuple4 (vtkIdType i, double val0, double val1, double val2, double val3) |
void | InsertTuple9 (vtkIdType i, double val0, double val1, double val2, double val3, double val4, double val5, double val6, double val7, double val8) |
virtual vtkIdType | InsertNextTuple (const float *tuple)=0 |
virtual vtkIdType | InsertNextTuple (const double *tuple)=0 |
void | InsertNextTuple1 (double value) |
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 | InsertNextTuple9 (double val0, double val1, double val2, double val3, double val4, double val5, double val6, double val7, double val8) |
virtual void | RemoveTuple (vtkIdType id)=0 |
virtual void | RemoveFirstTuple ()=0 |
virtual void | RemoveLastTuple ()=0 |
virtual void | GetData (vtkIdType tupleMin, vtkIdType tupleMax, int compMin, int compMax, vtkDoubleArray *data) |
virtual void | CopyComponent (int j, vtkDataArray *from, int fromComponent) |
void | SetLookupTable (vtkLookupTable *lut) |
virtual vtkLookupTable * | GetLookupTable () |
void | GetRange (double range[2], int comp) |
double * | GetRange (int comp) |
double * | GetRange () |
void | GetRange (double range[2]) |
void | GetDataTypeRange (double range[2]) |
double | GetDataTypeMin () |
double | GetDataTypeMax () |
Public Member Functions inherited from vtkAbstractArray | |
vtkAbstractArray * | NewInstance () const |
virtual int | Allocate (vtkIdType sz, vtkIdType ext=1000)=0 |
virtual void | Initialize ()=0 |
void | SetComponentName (vtkIdType component, const char *name) |
const char * | GetComponentName (vtkIdType component) |
bool | HasAComponentName () |
int | CopyComponentNames (vtkAbstractArray *da) |
virtual void | SetNumberOfTuples (vtkIdType number)=0 |
virtual void | Squeeze ()=0 |
virtual int | Resize (vtkIdType numTuples)=0 |
virtual void | ExportToVoidPointer (void *vtkNotUsed(out_ptr)) |
virtual vtkArrayIterator * | NewIterator ()=0 |
virtual void | InsertVariantValue (vtkIdType idx, vtkVariant value) |
virtual void | ClearLookup ()=0 |
vtkInformation * | GetInformation () |
virtual void | SetNumberOfComponents (int) |
int | GetNumberOfComponents () |
vtkIdType | GetNumberOfTuples () |
virtual void | InsertTuples (vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source)=0 |
virtual void | InsertTuples (vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray *source)=0 |
void | Reset () |
vtkIdType | GetSize () |
vtkIdType | GetMaxId () |
virtual void | SetVoidArray (void *vtkNotUsed(array), vtkIdType vtkNotUsed(size), int vtkNotUsed(save))=0 |
virtual void | SetName (const char *) |
virtual char * | GetName () |
virtual const char * | GetDataTypeAsString (void) |
virtual vtkIdType | GetDataSize () |
virtual vtkIdType | LookupValue (vtkVariant value)=0 |
virtual void | LookupValue (vtkVariant value, vtkIdList *ids)=0 |
virtual void | GetProminentComponentValues (int comp, vtkVariantArray *values, double uncertainty=1.e-6, double minimumProminence=1.e-3) |
bool | HasInformation () |
virtual unsigned int | GetMaxDiscreteValues () |
virtual void | SetMaxDiscreteValues (unsigned int) |
Public Member Functions inherited from vtkObject | |
vtkObject * | NewInstance () const |
virtual void | DebugOn () |
virtual void | DebugOff () |
bool | GetDebug () |
void | SetDebug (bool debugFlag) |
virtual unsigned long | GetMTime () |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
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 *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
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) |
int | InvokeEvent (unsigned long event, void *callData) |
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 |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
void | PrintRevisions (ostream &) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
Additional Inherited Members | |
Static Protected Member Functions inherited from vtkTypeTemplate< vtkMappedDataArray< Scalar >, vtkTypedDataArray< Scalar > > | |
static int | IsTypeOf (const char *type) |
Static Protected Member Functions inherited from vtkTypeTemplate< vtkTypedDataArray< Scalar >, vtkDataArray > | |
static int | IsTypeOf (const char *type) |
Protected Attributes inherited from vtkDataArray | |
vtkLookupTable * | LookupTable |
double | Range [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 | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
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 |
Definition at line 46 of file vtkMappedDataArray.h.
typedef Superclass::ValueType vtkMappedDataArray< Scalar >::ValueType |
Definition at line 47 of file vtkMappedDataArray.h.
|
protected |
|
protected |
|
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.
|
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 >, vtkCPExodusIINodalCoordinatesTemplate< Scalar >, and vtkPeriodicDataArray< Scalar >.
|
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 vtkPeriodicDataArray< Scalar >, vtkCPExodusIIResultsArrayTemplate< Scalar >, and vtkCPExodusIINodalCoordinatesTemplate< Scalar >.
|
pure virtual |
Retrieve value from the array as a variant.
Reimplemented from vtkAbstractArray.
Implemented in vtkPeriodicDataArray< Scalar >, vtkCPExodusIIResultsArrayTemplate< Scalar >, and vtkCPExodusIINodalCoordinatesTemplate< Scalar >.
|
pure virtual |
Set a value in the array from a variant. This method does NOT do bounds checking.
Implements vtkAbstractArray.
Implemented in vtkPeriodicDataArray< Scalar >, vtkCPExodusIIResultsArrayTemplate< Scalar >, and vtkCPExodusIINodalCoordinatesTemplate< Scalar >.
|
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 vtkCPExodusIIResultsArrayTemplate< Scalar >, vtkCPExodusIINodalCoordinatesTemplate< Scalar >, and vtkPeriodicDataArray< Scalar >.
|
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 vtkCPExodusIIResultsArrayTemplate< Scalar >, vtkCPExodusIINodalCoordinatesTemplate< Scalar >, and vtkPeriodicDataArray< Scalar >.
|
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 vtkPeriodicDataArray< Scalar >, vtkCPExodusIIResultsArrayTemplate< Scalar >, and vtkCPExodusIINodalCoordinatesTemplate< Scalar >.
|
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 vtkPeriodicDataArray< Scalar >, vtkCPExodusIIResultsArrayTemplate< Scalar >, and vtkCPExodusIINodalCoordinatesTemplate< Scalar >.
|
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 vtkPeriodicDataArray< Scalar >, vtkCPExodusIIResultsArrayTemplate< Scalar >, and vtkCPExodusIINodalCoordinatesTemplate< Scalar >.
|
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.
|
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.
|
inlinevirtual |
Not implemented. Print error and return NULL.
Implements vtkDataArray.
Definition at line 97 of file vtkMappedDataArray.h.
|
virtual |
Invalidate the internal temporary array and call superclass method.
Reimplemented from vtkObject.
|
inlinevirtual |
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.
|
inlineprotectedvirtual |
Method for type-checking in FastDownCast implementations.
Reimplemented from vtkTypedDataArray< Scalar >.
Definition at line 114 of file vtkMappedDataArray.h.