Go to the documentation of this file.
41 #ifndef vtkDataArray_h
42 #define vtkDataArray_h
44 #include "vtkCommonCoreModule.h"
130 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
133 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
136 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
139 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
152 virtual
void SetTuple(
vtkIdType tupleIdx, const
float * tuple)
153 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
154 virtual
void SetTuple(
vtkIdType tupleIdx, const
double * tuple)
155 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
165 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
166 void SetTuple2(
vtkIdType tupleIdx,
double val0,
double val1)
167 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
168 void SetTuple3(
vtkIdType tupleIdx,
double val0,
double val1,
double val2)
169 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
170 void SetTuple4(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
172 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
173 void SetTuple6(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
174 double val3,
double val4,
double val5)
175 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
176 void SetTuple9(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
177 double val3,
double val4,
double val5,
double val6,
178 double val7,
double val8)
179 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
187 virtual
void InsertTuple(
vtkIdType tupleIdx, const
float * tuple)
189 virtual
void InsertTuple(
vtkIdType tupleIdx, const
double * tuple)
201 void InsertTuple2(
vtkIdType tupleIdx,
double val0,
double val1)
203 void InsertTuple3(
vtkIdType tupleIdx,
double val0,
double val1,
double val2)
205 void InsertTuple4(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
208 void InsertTuple6(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
209 double val3,
double val4,
double val5)
211 void InsertTuple9(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
212 double val3,
double val4,
double val5,
double val6,
213 double val7,
double val8)
223 virtual
vtkIdType InsertNextTuple(const
float * tuple) = 0;
224 virtual
vtkIdType InsertNextTuple(const
double * tuple) = 0;
233 void InsertNextTuple1(
double value);
234 void InsertNextTuple2(
double val0,
double val1);
235 void InsertNextTuple3(
double val0,
double val1,
double val2);
236 void InsertNextTuple4(
double val0,
double val1,
double val2,
238 void InsertNextTuple6(
double val0,
double val1,
double val2,
239 double val3,
double val4,
double val5);
240 void InsertNextTuple9(
double val0,
double val1,
double val2,
241 double val3,
double val4,
double val5,
double val6,
242 double val7,
double val8);
252 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples()) = 0;
253 virtual
void RemoveFirstTuple() { this->RemoveTuple(0); }
263 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
273 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
274 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
282 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
321 virtual
void FillComponent(
int compIdx,
double value)
322 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
355 unsigned long GetActualMemorySize() override;
361 void CreateDefaultLookupTable();
380 void GetRange(
double range[2],
int comp)
382 this->ComputeRange(
range, comp);
396 this->GetRange(this->Range, comp);
410 return this->GetRange(0);
423 this->GetRange(
range,0);
437 this->ComputeFiniteRange(
range, comp);
451 this->GetFiniteRange(this->FiniteRange, comp);
452 return this->FiniteRange;
465 return this->GetFiniteRange(0);
478 this->GetFiniteRange(
range, 0);
615 double FiniteRange[2];
630 switch (
source->GetArrayType())
represent and manipulate 3D points
vtkLookupTable * LookupTable
static vtkInformationDoubleVectorKey * COMPONENT_RANGE()
This key is used to hold tight bounds on the range of one component over all tuples of the array.
void GetTuples(vtkIdType p1, vtkIdType p2, vtkAbstractArray *output) override
Get the tuples for the range of tuple ids specified (i.e., p1->p2 inclusive).
void InsertTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source) override
Insert the tuple at srcTupleIdx in the source array into this array at dstTupleIdx.
virtual void RemoveLastTuple()
double * GetFiniteRange(int comp)
Return the range of the data array values for the given component.
int CopyInformation(vtkInformation *infoFrom, int deep=1) override
Copy information instance.
virtual double GetComponent(vtkIdType tupleIdx, int compIdx)
Return the data component at the location specified by tupleIdx and compIdx.
void GetTuples(vtkIdList *tupleIds, vtkAbstractArray *output) override
Given a list of tuple ids, return an array of tuples.
static void GetDataTypeRange(int type, double range[2])
abstract superclass for arrays of numeric data
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 t...
virtual double * GetTuple(vtkIdType tupleIdx)=0
Get the data tuple at tupleIdx.
int GetElementComponentSize() override
Return the size, in bytes, of the lowest-level element of an array.
virtual bool ComputeFiniteScalarRange(double *ranges)
Computes the range for each component of an array, the length of ranges must be two times the number ...
void Modified() override
Removes out-of-date L2_NORM_RANGE() and L2_NORM_FINITE_RANGE() values.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkIdType GetNumberOfTuples()
Get the number of complete tuples (a component group) in the array.
virtual bool ComputeVectorRange(double range[2])
virtual double GetMaxNorm()
Return the maximum norm for the tuples.
int IsNumeric() override
This method is here to make backward compatibility easier.
#define VTK_SIZEHINT(...)
virtual void ComputeRange(double range[2], int comp)
Compute the range for a specific component.
void GetFiniteRange(double range[2])
The range of the data array values will be returned in the provided range array argument.
int GetArrayType() override
Method for type-checking in FastDownCast implementations.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkInformationDoubleVectorKey * L2_NORM_RANGE()
This key is used to hold tight bounds on the $L_2$ norm of tuples in the array.
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 arr...
virtual int GetDataTypeSize()=0
Return the size of the underlying data type.
void GetRange(double range[2])
The range of the data array values will be returned in the provided range array argument.
a simple class to control print indentation
static double GetDataTypeMax(int type)
double * GetTuple2(vtkIdType tupleIdx)
void GetDataTypeRange(double range[2])
These methods return the Min and Max possible range of the native data type.
list of point or cell ids
double * GetRange(int comp)
Return the range of the data array values for the given component.
virtual void GetTuple(vtkIdType tupleIdx, double *tuple)=0
Get the data tuple at tupleIdx by filling in a user-provided array, Make sure that your array is larg...
static vtkInformationDoubleVectorKey * L2_NORM_FINITE_RANGE()
This key is used to hold tight bounds on the $L_2$ norm of tuples in the array.
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 th...
virtual bool ComputeFiniteVectorRange(double range[2])
static double GetDataTypeMin(int type)
virtual void ComputeFiniteRange(double range[2], int comp)
Compute the range for a specific component.
Abstract superclass for all arrays.
map scalar values into colors via a lookup table
double * GetRange()
Return the range of the data array.
static vtkInformationStringKey * UNITS_LABEL()
A human-readable string indicating the units for the array data.
virtual bool ComputeScalarRange(double *ranges)
Computes the range for each component of an array, the length of ranges must be two times the number ...
vtkIdType InsertNextTuple(vtkIdType srcTupleIdx, vtkAbstractArray *source) override
Insert the tuple from srcTupleIdx in the source array at the end of this array.
#define vtkArrayDownCast_FastCastMacro(ArrayT)
This macro is used to tell vtkArrayDownCast to use FastDownCast instead of SafeDownCast.
dynamic, self-adjusting array of double
static vtkDataArray * FastDownCast(vtkAbstractArray *source)
Perform a fast, safe cast from a vtkAbstractArray to a vtkDataArray.
static vtkDataArray * CreateDataArray(int dataType)
Creates an array for dataType where dataType is one of VTK_BIT, VTK_CHAR, VTK_SIGNED_CHAR,...
double * GetFiniteRange()
Return the range of the data array.
double GetTuple1(vtkIdType tupleIdx)
These methods are included as convenience for the wrappers.
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,...
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,...