35 #ifndef vtkDataArray_h 36 #define vtkDataArray_h 38 #include "vtkCommonCoreModule.h" 101 virtual double *GetTuple(
vtkIdType tupleIdx)
109 virtual void GetTuple(
vtkIdType tupleIdx,
double * tuple)
124 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
127 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
130 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
133 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
146 virtual
void SetTuple(
vtkIdType tupleIdx, const
float * tuple)
147 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
148 virtual
void SetTuple(
vtkIdType tupleIdx, const
double * tuple)
149 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
159 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
160 void SetTuple2(
vtkIdType tupleIdx,
double val0,
double val1)
161 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
162 void SetTuple3(
vtkIdType tupleIdx,
double val0,
double val1,
double val2)
163 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
164 void SetTuple4(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
166 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
167 void SetTuple6(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
168 double val3,
double val4,
double val5)
169 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
170 void SetTuple9(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
171 double val3,
double val4,
double val5,
double val6,
172 double val7,
double val8)
173 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
181 virtual
void InsertTuple(
vtkIdType tupleIdx, const
float * tuple)
183 virtual
void InsertTuple(
vtkIdType tupleIdx, const
double * tuple)
195 void InsertTuple2(
vtkIdType tupleIdx,
double val0,
double val1)
197 void InsertTuple3(
vtkIdType tupleIdx,
double val0,
double val1,
double val2)
199 void InsertTuple4(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
202 void InsertTuple6(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
203 double val3,
double val4,
double val5)
205 void InsertTuple9(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
206 double val3,
double val4,
double val5,
double val6,
207 double val7,
double val8)
217 virtual
vtkIdType InsertNextTuple(const
float * tuple) = 0;
218 virtual
vtkIdType InsertNextTuple(const
double * tuple) = 0;
227 void InsertNextTuple1(
double value);
228 void InsertNextTuple2(
double val0,
double val1);
229 void InsertNextTuple3(
double val0,
double val1,
double val2);
230 void InsertNextTuple4(
double val0,
double val1,
double val2,
232 void InsertNextTuple6(
double val0,
double val1,
double val2,
233 double val3,
double val4,
double val5);
234 void InsertNextTuple9(
double val0,
double val1,
double val2,
235 double val3,
double val4,
double val5,
double val6,
236 double val7,
double val8);
245 virtual
void RemoveTuple(
vtkIdType tupleIdx)
246 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples()) = 0;
247 virtual
void RemoveFirstTuple() { this->RemoveTuple(0); }
248 virtual void RemoveLastTuple();
255 virtual double GetComponent(
vtkIdType tupleIdx,
int compIdx)
257 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
266 virtual
void SetComponent(
vtkIdType tupleIdx,
int compIdx,
double value)
267 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
268 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
274 virtual
void InsertComponent(
vtkIdType tupleIdx,
int compIdx,
double value)
276 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
315 virtual
void FillComponent(
int compIdx,
double value)
316 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
321 virtual
void Fill(
double value);
331 virtual
void CopyComponent(
int dstComponent,
vtkDataArray *src,
349 unsigned long GetActualMemorySize() override;
355 void CreateDefaultLookupTable();
374 void GetRange(
double range[2],
int comp)
376 this->ComputeRange(
range, comp);
390 this->GetRange(this->Range, comp);
404 return this->GetRange(0);
417 this->GetRange(
range,0);
431 this->ComputeFiniteRange(
range, comp);
445 this->GetFiniteRange(this->FiniteRange, comp);
446 return this->FiniteRange;
459 return this->GetFiniteRange(0);
472 this->GetFiniteRange(
range, 0);
481 void GetDataTypeRange(
double range[2]);
482 double GetDataTypeMin();
483 double GetDataTypeMax();
484 static void GetDataTypeRange(
int type,
double range[2]);
485 static double GetDataTypeMin(
int type);
486 static double GetDataTypeMax(
int type);
493 virtual double GetMaxNorm();
568 virtual void ComputeRange(
double range[2],
int comp);
577 virtual void ComputeFiniteRange(
double range[2],
int comp);
585 virtual bool ComputeScalarRange(
double* ranges);
589 virtual bool ComputeVectorRange(
double range[2]);
597 virtual bool ComputeFiniteScalarRange(
double* ranges);
601 virtual bool ComputeFiniteVectorRange(
double range[2]);
609 double FiniteRange[2];
624 switch (
source->GetArrayType())
631 return static_cast<vtkDataArray*>(
source);
void Modified() override
Removes out-of-date PER_COMPONENT() and PER_FINITE_COMPONENT() values.
void GetRange(double range[2])
The range of the data array values will be returned in the provided range array argument.
#define vtkArrayDownCast_FastCastMacro(ArrayT)
This macro is used to tell vtkArrayDownCast to use FastDownCast instead of SafeDownCast.
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...
vtkIdType GetNumberOfTuples()
Get the number of complete tuples (a component group) in the array.
virtual void GetTuples(vtkIdList *tupleIds, vtkAbstractArray *output)
Given a list of tuple ids, return an array of tuples.
Abstract superclass for all arrays.
virtual int GetDataTypeSize()=0
Return the size of the underlying data type.
map scalar values into colors via a lookup table
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...
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.
double * GetFiniteRange(int comp)
Return the range of the data array values for the given component.
virtual int CopyInformation(vtkInformation *infoFrom, int deep=1)
Copy information instance.
dynamic, self-adjusting array of double
double * GetRange(int comp)
Return the range of the data array values for the given component.
double * GetFiniteRange()
Return the range of the data array.
a simple class to control print indentation
double * GetRange()
Return the range of the data array.
list of point or cell ids
abstract superclass for arrays of numeric data
int GetElementComponentSize() override
Return the size, in bytes, of the lowest-level element of an array.
vtkLookupTable * LookupTable
#define VTK_SIZEHINT(...)
virtual void InsertTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source)=0
Insert the tuple at srcTupleIdx in the source array into this array at dstTupleIdx.
int IsNumeric() override
This method is here to make backward compatibility easier.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
virtual vtkIdType InsertNextTuple(vtkIdType srcTupleIdx, vtkAbstractArray *source)=0
Insert the tuple from srcTupleIdx in the source array at the end of this array.
static vtkDataArray * FastDownCast(vtkAbstractArray *source)
Perform a fast, safe cast from a vtkAbstractArray to a vtkDataArray.
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...
represent and manipulate 3D points
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.