#include <vtkDataArray.h>
Inheritance diagram for vtkDataArray:
vtkDataArray is an abstract superclass for data array objects. This class defines an API that all array objects must support. Note that the concrete subclasses of this class represent data in native form (char, int, etc.) and often have specialized more efficient methods for operating on this data (for example, getting pointers to data or getting/inserting data in native form).
The logical structure of this class is an array of tuples, where each tuple is made up of n-components (also called a component group), and n is the number of component values in a tuple(n >= 1). Another view of this class is a mxn matrix, where m is the number of tuples, and n is the number of components in a tuple. Thus vtkDataArray can be used to represent scalars (1-4 components), 3D vectors (3 components), texture coordinates (1-3 components), tensors, (9 components) and so on.
Each data array is required to have a character-string name. The naming of the array occurs automatically when it is instantiated, but you are free to name arrays using the SetName() method. (The array name is used for data manipulation.)
Definition at line 70 of file vtkDataArray.h.
[NOHEADER] | |
virtual int | GetDataTypeSize ()=0 |
unsigned long | GetDataTypeSize (int type) |
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual int | Allocate (vtkIdType sz, vtkIdType ext=1000)=0 |
virtual void | Initialize ()=0 |
virtual int | GetDataType ()=0 |
virtual void | SetNumberOfTuples (vtkIdType number)=0 |
virtual double * | GetTuple (vtkIdType i)=0 |
virtual void | GetTuple (vtkIdType i, double *tuple)=0 |
void | GetTuples (vtkIdList *ptIds, vtkDataArray *output) |
void | GetTuples (vtkIdType p1, vtkIdType p2, vtkDataArray *output) |
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 | DeepCopy (vtkDataArray *da) |
virtual void | FillComponent (int j, double c) |
virtual void * | GetVoidPointer (vtkIdType id)=0 |
virtual void | Squeeze ()=0 |
virtual void | Resize (vtkIdType numTuples)=0 |
unsigned long | GetActualMemorySize () |
void | CreateDefaultLookupTable () |
virtual void | ComputeRange (int comp) |
virtual double | GetMaxNorm () |
virtual void | SetNumberOfComponents (int) |
int | GetNumberOfComponents () |
vtkIdType | GetNumberOfTuples () |
double | GetTuple1 (vtkIdType i) |
double * | GetTuple2 (vtkIdType i) |
double * | GetTuple3 (vtkIdType i) |
double * | GetTuple4 (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 | 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 | GetData (vtkIdType tupleMin, vtkIdType tupleMax, int compMin, int compMax, vtkDoubleArray *data) |
virtual void | CopyComponent (int j, vtkDataArray *from, int fromComponent) |
void | Reset () |
vtkIdType | GetSize () |
vtkIdType | GetMaxId () |
virtual void | SetVoidArray (void *vtkNotUsed(array), vtkIdType vtkNotUsed(size), int vtkNotUsed(save)) |
void | SetLookupTable (vtkLookupTable *lut) |
virtual vtkLookupTable * | GetLookupTable () |
void | SetName (const char *name) |
const char * | GetName () |
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 () |
Static Public Member Functions | |
int | IsTypeOf (const char *type) |
vtkDataArray * | SafeDownCast (vtkObject *o) |
vtkDataArray * | CreateDataArray (int dataType) |
Protected Member Functions | |
vtkDataArray (vtkIdType numComp=1) | |
~vtkDataArray () | |
Protected Attributes | |
vtkLookupTable * | LookupTable |
vtkIdType | Size |
vtkIdType | MaxId |
int | NumberOfComponents |
char * | Name |
double | Range [2] |
vtkTimeStamp | ComponentRangeComputeTime [VTK_MAXIMUM_NUMBER_OF_CACHED_COMPONENT_RANGES] |
double | ComponentRange [VTK_MAXIMUM_NUMBER_OF_CACHED_COMPONENT_RANGES][2] |
|
Reimplemented from vtkObject. Reimplemented in vtkBitArray, vtkCharArray, vtkDataArrayTemplate< T >, vtkDoubleArray, vtkFloatArray, vtkIdTypeArray, vtkIntArray, vtkLongArray, vtkShortArray, vtkUnsignedCharArray, vtkUnsignedIntArray, vtkUnsignedLongArray, and vtkUnsignedShortArray. Definition at line 73 of file vtkDataArray.h. |
|
|
|
|
|
Reimplemented from vtkObject. Reimplemented in vtkBitArray, vtkCharArray, vtkDoubleArray, vtkFloatArray, vtkIdTypeArray, vtkIntArray, vtkLongArray, vtkShortArray, vtkUnsignedCharArray, vtkUnsignedIntArray, vtkUnsignedLongArray, and vtkUnsignedShortArray. |
|
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject. Reimplemented in vtkBitArray, vtkCharArray, vtkDoubleArray, vtkFloatArray, vtkIdTypeArray, vtkIntArray, vtkLongArray, vtkShortArray, vtkUnsignedCharArray, vtkUnsignedIntArray, vtkUnsignedLongArray, and vtkUnsignedShortArray. |
|
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject. Reimplemented in vtkBitArray, vtkCharArray, vtkDoubleArray, vtkFloatArray, vtkIdTypeArray, vtkIntArray, vtkLongArray, vtkShortArray, vtkUnsignedCharArray, vtkUnsignedIntArray, vtkUnsignedLongArray, and vtkUnsignedShortArray. |
|
Reimplemented from vtkObject. Reimplemented in vtkBitArray, vtkCharArray, vtkDoubleArray, vtkFloatArray, vtkIdTypeArray, vtkIntArray, vtkLongArray, vtkShortArray, vtkUnsignedCharArray, vtkUnsignedIntArray, vtkUnsignedLongArray, and vtkUnsignedShortArray. |
|
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 vtkObject. Reimplemented in vtkBitArray, vtkCharArray, vtkDataArrayTemplate< T >, vtkDoubleArray, vtkFloatArray, vtkIdTypeArray, vtkIntArray, vtkLongArray, vtkShortArray, vtkUnsignedCharArray, vtkUnsignedIntArray, vtkUnsignedLongArray, and vtkUnsignedShortArray. |
|
Allocate memory for this array. Delete old storage only if necessary. Note that ext is no longer used. Implemented in vtkBitArray, vtkDataArrayTemplate< T >, and vtkIdTypeArray. Referenced by vtkStructuredVisibilityConstraint::Blank(). |
|
Release storage and reset array to initial state. Implemented in vtkBitArray, vtkDataArrayTemplate< T >, and vtkIdTypeArray. |
|
Return the underlying data type. An integer indicating data type is returned as specified in vtkSetGet.h. Implemented in vtkBitArray, vtkCharArray, vtkDoubleArray, vtkFloatArray, vtkIdTypeArray, vtkIntArray, vtkLongArray, vtkShortArray, vtkUnsignedCharArray, vtkUnsignedIntArray, vtkUnsignedLongArray, and vtkUnsignedShortArray. |
|
Return the size of the underlying data type. For a bit, 0 is returned. Implemented in vtkBitArray, vtkDataArrayTemplate< T >, and vtkIdTypeArray. |
|
Return the size of the underlying data type. For a bit, 0 is returned. |
|
Set/Get the dimension (n) of the components. Must be >= 1. Make sure that this is set before allocation. Referenced by vtkPoints::SetNumberOfPoints(). |
|
Set/Get the dimension (n) of the components. Must be >= 1. Make sure that this is set before allocation. Definition at line 98 of file vtkDataArray.h. |
|
Set the number of tuples (a component group) in the array. Note that this may allocate space depending on the number of components. Implemented in vtkBitArray, vtkDataArrayTemplate< T >, and vtkIdTypeArray. Referenced by vtkPoints::SetNumberOfPoints(). |
|
Get the number of tuples (a component group) in the array. Definition at line 107 of file vtkDataArray.h. References vtkIdType. |
|
Get the data tuple at ith location. Return it as a pointer to an array. Note: this method is not thread-safe, and the pointer is only valid as long as another method invocation to a vtk object is not performed. Implemented in vtkBitArray, vtkDataArrayTemplate< T >, and vtkIdTypeArray. |
|
Get the data tuple at ith location by filling in a user-provided array, Make sure that your array is large enough to hold the NumberOfComponents amount of data being returned. Implemented in vtkBitArray, vtkDataArrayTemplate< T >, and vtkIdTypeArray. |
|
These methods are included as convenience for the wrappers. GetTuple() and SetTuple() which return/take arrays can not be used from wrapped languages. These methods can be used instead. |
|
These methods are included as convenience for the wrappers. GetTuple() and SetTuple() which return/take arrays can not be used from wrapped languages. These methods can be used instead. |
|
These methods are included as convenience for the wrappers. GetTuple() and SetTuple() which return/take arrays can not be used from wrapped languages. These methods can be used instead. |
|
These methods are included as convenience for the wrappers. GetTuple() and SetTuple() which return/take arrays can not be used from wrapped languages. These methods can be used instead. |
|
These methods are included as convenience for the wrappers. GetTuple() and SetTuple() which return/take arrays can not be used from wrapped languages. These methods can be used instead. |
|
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. |
|
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. |
|
Set the data tuple at ith location. Note that range checking or memory allocation is not performed; use this method in conjunction with SetNumberOfTuples() to allocate space. Implemented in vtkBitArray, vtkDataArrayTemplate< T >, and vtkIdTypeArray. Referenced by vtkPoints::SetPoint(). |
|
Set the data tuple at ith location. Note that range checking or memory allocation is not performed; use this method in conjunction with SetNumberOfTuples() to allocate space. Implemented in vtkBitArray, vtkDataArrayTemplate< T >, and vtkIdTypeArray. |
|
These methods are included as convenience for the wrappers. GetTuple() and SetTuple() which return/take arrays can not be used from wrapped languages. These methods can be used instead. |
|
These methods are included as convenience for the wrappers. GetTuple() and SetTuple() which return/take arrays can not be used from wrapped languages. These methods can be used instead. |
|
These methods are included as convenience for the wrappers. GetTuple() and SetTuple() which return/take arrays can not be used from wrapped languages. These methods can be used instead. |
|
These methods are included as convenience for the wrappers. GetTuple() and SetTuple() which return/take arrays can not be used from wrapped languages. These methods can be used instead. |
|
These methods are included as convenience for the wrappers. GetTuple() and SetTuple() which return/take arrays can not be used from wrapped languages. These methods can be used instead. |
|
Insert the data tuple at ith location. Note that memory allocation is performed as necessary to hold the data. Implemented in vtkBitArray, vtkDataArrayTemplate< T >, and vtkIdTypeArray. Referenced by vtkPoints::InsertPoint(). |
|
Insert the data tuple at ith location. Note that memory allocation is performed as necessary to hold the data. Implemented in vtkBitArray, vtkDataArrayTemplate< T >, and vtkIdTypeArray. |
|
These methods are included as convenience for the wrappers. InsertTuple() which takes arrays can not be used from wrapped languages. These methods can be used instead. |
|
These methods are included as convenience for the wrappers. InsertTuple() which takes arrays can not be used from wrapped languages. These methods can be used instead. |
|
These methods are included as convenience for the wrappers. InsertTuple() which takes arrays can not be used from wrapped languages. These methods can be used instead. |
|
These methods are included as convenience for the wrappers. InsertTuple() which takes arrays can not be used from wrapped languages. These methods can be used instead. |
|
These methods are included as convenience for the wrappers. InsertTuple() which takes arrays can not be used from wrapped languages. These methods can be used instead. |
|
Insert the data tuple at the end of the array and return the location at which the data was inserted. Memory is allocated as necessary to hold the data. Implemented in vtkBitArray, vtkDataArrayTemplate< T >, and vtkIdTypeArray. Referenced by vtkPoints::InsertNextPoint(). |
|
Insert the data tuple at the end of the array and return the location at which the data was inserted. Memory is allocated as necessary to hold the data. Implemented in vtkBitArray, vtkDataArrayTemplate< T >, and vtkIdTypeArray. |
|
These methods are included as convenience for the wrappers. InsertTuple() which takes arrays can not be used from wrapped languages. These methods can be used instead. |
|
These methods are included as convenience for the wrappers. InsertTuple() which takes arrays can not be used from wrapped languages. These methods can be used instead. |
|
These methods are included as convenience for the wrappers. InsertTuple() which takes arrays can not be used from wrapped languages. These methods can be used instead. |
|
These methods are included as convenience for the wrappers. InsertTuple() which takes arrays can not be used from wrapped languages. These methods can be used instead. |
|
These methods are included as convenience for the wrappers. InsertTuple() which takes arrays can not be used from wrapped languages. These methods can be used instead. |
|
Return the data component at the ith tuple and jth component location. Note that i is less than NumberOfTuples and j is less than NumberOfComponents. Reimplemented in vtkDataArrayTemplate< T >. |
|
Set the data component at the ith tuple and jth component location. Note that i is less than NumberOfTuples and j is less than NumberOfComponents. Make sure enough memory has been allocated (use SetNumberOfTuples() and SetNumberOfComponents()). Reimplemented in vtkBitArray, and vtkDataArrayTemplate< T >. |
|
Insert the data component at ith tuple and jth component location. Note that memory allocation is performed as necessary to hold the data. Reimplemented in vtkBitArray, and vtkDataArrayTemplate< T >. |
|
Get the data as a double array in the range (tupleMin,tupleMax) and (compMin, compMax). The resulting double array consists of all data in the tuple range specified and only the component range specified. This process typically requires casting the data from native form into doubleing point values. This method is provided as a convenience for data exchange, and is not very fast. |
|
Deep copy of data. Copies data from different data arrays even if they are different types (using doubleing-point exchange). Reimplemented in vtkBitArray, vtkDataArrayTemplate< T >, and vtkIdTypeArray. |
|
Fill a component of a data array with a specified value. This method sets the specified component to specified value for all tuples in the data array. This methods can be used to initialize or reinitialize a single component of a multi-component array. |
|
Copy a component from one data array into a component on this data array. This method copies the specified component ("fromComponent") from the specified data array ("from") to the specified component ("j") over all the tuples in this data array. This method can be used to extract a component (column) from one data array and paste that data into a component on this data array. |
|
Return a void pointer. For image pipeline interface and other special pointer manipulation. Implemented in vtkBitArray, vtkDataArrayTemplate< T >, and vtkIdTypeArray. |
|
Free any unnecessary memory. Implemented in vtkBitArray, vtkDataArrayTemplate< T >, and vtkIdTypeArray. |
|
Resize the array while conserving the data. Implemented in vtkBitArray, vtkDataArrayTemplate< T >, and vtkIdTypeArray. |
|
Reset to an empty state, without freeing any memory. Definition at line 268 of file vtkDataArray.h. Referenced by vtkCellArray::Reset(). |
|
Return the size of the data. Definition at line 274 of file vtkDataArray.h. References vtkIdType. |
|
What is the maximum id currently in the array. Definition at line 280 of file vtkDataArray.h. References vtkIdType. Referenced by vtkPriorityQueue::DeleteId(), vtkCellArray::GetNextCell(), vtkPriorityQueue::GetPriority(), and vtkCellArray::InsertNextCell(). |
|
This method lets the user specify data to be held by the array. The array argument is a pointer to the data. size is the size of the array supplied by the user. Set save to 1 to keep the class from deleting the array when it cleans up or reallocates memory. The class uses the actual array provided; it does not copy the data from the supplied array. Definition at line 291 of file vtkDataArray.h. References vtkIdType. |
|
Return the memory in kilobytes consumed by this data array. Used to support streaming and reading/writing data. The value returned is guaranteed to be greater than or equal to the memory required to actually represent the data represented by this object. The information returned is valid only after the pipeline has been updated. |
|
Create default lookup table. Generally used to create one when none is available. |
|
Set/get the lookup table associated with this scalar data, if any. |
|
Set/get the lookup table associated with this scalar data, if any. |
|
Set/get array's name |
|
Set/get array's name Referenced by vtkFieldData::GetArrayName(). |
|
Return the range of the array values for the given component. Range is copied into the array provided. If comp is equal to -1, it returns the range of the magnitude (if the number of components is equal to 1 it still returns the range of component 0). Definition at line 325 of file vtkDataArray.h. |
|
Return the range of the array values for the given component. Range is copied into the array provided. If comp is equal to -1, it returns the range of the magnitude (if the number of components is equal to 1 it still returns the range of component 0). Definition at line 330 of file vtkDataArray.h. |
|
Reimplemented in vtkDataArrayTemplate< T >. |
|
Return the range of the array values for the 0th component. Range is copied into the array provided. Definition at line 341 of file vtkDataArray.h. |
|
Return the range of the array values for the 0th component. Range is copied into the array provided. Definition at line 346 of file vtkDataArray.h. |
|
These methods return the Min and Max possible range of the native data type. For example if a vtkScalars consists of unsigned char data these will return (0,255). |
|
These methods return the Min and Max possible range of the native data type. For example if a vtkScalars consists of unsigned char data these will return (0,255). |
|
These methods return the Min and Max possible range of the native data type. For example if a vtkScalars consists of unsigned char data these will return (0,255). |
|
Return the maximum norm for the tuples. Note that the max. is computed everytime GetMaxNorm is called. |
|
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. Note that the data array returned has be deleted by the user. |
|
Definition at line 377 of file vtkDataArray.h. |
|
Definition at line 379 of file vtkDataArray.h. |
|
Definition at line 380 of file vtkDataArray.h. |
|
Definition at line 381 of file vtkDataArray.h. |
|
Definition at line 383 of file vtkDataArray.h. |
|
Definition at line 385 of file vtkDataArray.h. |
|
Definition at line 394 of file vtkDataArray.h. |
|
Definition at line 395 of file vtkDataArray.h. |