Go to the documentation of this file.
41 #ifndef vtkDataArray_h
42 #define vtkDataArray_h
44 #include "vtkCommonCoreModule.h"
107 virtual double *GetTuple(
vtkIdType tupleIdx)
115 virtual void GetTuple(
vtkIdType tupleIdx,
double * tuple)
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);
251 virtual
void RemoveTuple(
vtkIdType tupleIdx)
252 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples()) = 0;
253 virtual
void RemoveFirstTuple() { this->RemoveTuple(0); }
254 virtual void RemoveLastTuple();
261 virtual double GetComponent(
vtkIdType tupleIdx,
int compIdx)
263 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
272 virtual
void SetComponent(
vtkIdType tupleIdx,
int compIdx,
double value)
273 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
274 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
280 virtual
void InsertComponent(
vtkIdType tupleIdx,
int compIdx,
double value)
282 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
321 virtual
void FillComponent(
int compIdx,
double value)
322 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
327 virtual
void Fill(
double value);
337 virtual
void CopyComponent(
int dstComponent,
vtkDataArray *src,
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);
487 void GetDataTypeRange(
double range[2]);
488 double GetDataTypeMin();
489 double GetDataTypeMax();
490 static void GetDataTypeRange(
int type,
double range[2]);
491 static double GetDataTypeMin(
int type);
492 static double GetDataTypeMax(
int type);
499 virtual double GetMaxNorm();
574 virtual void ComputeRange(
double range[2],
int comp);
583 virtual void ComputeFiniteRange(
double range[2],
int comp);
591 virtual bool ComputeScalarRange(
double* ranges);
595 virtual bool ComputeVectorRange(
double range[2]);
603 virtual bool ComputeFiniteScalarRange(
double* ranges);
607 virtual bool ComputeFiniteVectorRange(
double range[2]);
615 double FiniteRange[2];
630 switch (
source->GetArrayType())
637 return static_cast<vtkDataArray*>(
source);
represent and manipulate 3D points
virtual int CopyInformation(vtkInformation *infoFrom, int deep=1)
Copy information instance.
virtual void InterpolateTuple(vtkIdType dstTupleIdx, vtkIdList *ptIndices, vtkAbstractArray *source, double *weights)=0
Set the tuple at dstTupleIdx in this array to the interpolated tuple value, given the ptIndices in th...
vtkLookupTable * LookupTable
virtual void InsertTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source)=0
Insert the tuple at srcTupleIdx in the source array into this array at dstTupleIdx.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
double * GetFiniteRange(int comp)
Return the range of the data array values for the given component.
virtual vtkIdType InsertNextTuple(vtkIdType srcTupleIdx, vtkAbstractArray *source)=0
Insert the tuple from srcTupleIdx in the source array at the end of this array.
void Modified() override
Removes out-of-date PER_COMPONENT() and PER_FINITE_COMPONENT() values.
virtual void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source)=0
Copy the tuples indexed in srcIds from the source array to the tuple locations indexed by dstIds in t...
abstract superclass for arrays of numeric data
int GetElementComponentSize() override
Return the size, in bytes, of the lowest-level element of an array.
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.
int IsNumeric() override
This method is here to make backward compatibility easier.
#define VTK_SIZEHINT(...)
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 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
list of point or cell ids
double * GetRange(int comp)
Return the range of the data array values for the given component.
Abstract superclass for all arrays.
map scalar values into colors via a lookup table
double * GetRange()
Return the range of the data array.
#define vtkArrayDownCast_FastCastMacro(ArrayT)
This macro is used to tell vtkArrayDownCast to use FastDownCast instead of SafeDownCast.
virtual void GetTuples(vtkIdList *tupleIds, vtkAbstractArray *output)
Given a list of tuple ids, return an array of tuples.
dynamic, self-adjusting array of double
static vtkDataArray * FastDownCast(vtkAbstractArray *source)
Perform a fast, safe cast from a vtkAbstractArray to a vtkDataArray.
double * GetFiniteRange()
Return the range of the data array.