35 #ifndef vtkDataArray_h 36 #define vtkDataArray_h 39 #include "vtkCommonCoreModule.h" 40 #include "vtkVTK_USE_SCALED_SOA_ARRAYS.h" 87 double* weights)
override;
96 virtual double* GetTuple(
vtkIdType tupleIdx)
104 virtual void GetTuple(
vtkIdType tupleIdx,
double* tuple)
116 double* GetTuple3(
vtkIdType tupleIdx)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
118 double* GetTuple4(
vtkIdType tupleIdx)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
120 double* GetTuple6(
vtkIdType tupleIdx)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
122 double* GetTuple9(
vtkIdType tupleIdx)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
134 virtual
void SetTuple(
vtkIdType tupleIdx, const
float* tuple)
135 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
136 virtual
void SetTuple(
vtkIdType tupleIdx, const
double* tuple)
137 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
147 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
148 void SetTuple2(
vtkIdType tupleIdx,
double val0,
double val1)
149 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
150 void SetTuple3(
vtkIdType tupleIdx,
double val0,
double val1,
double val2)
151 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
152 void SetTuple4(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3)
153 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
154 void SetTuple6(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3,
155 double val4,
double val5)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
156 void SetTuple9(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3,
157 double val4,
double val5,
double val6,
double val7,
double val8)
158 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
166 virtual
void InsertTuple(
vtkIdType tupleIdx, const
float* tuple)
VTK_EXPECTS(0 <= tupleIdx) = 0;
167 virtual
void InsertTuple(
vtkIdType tupleIdx, const
double* tuple)
VTK_EXPECTS(0 <= tupleIdx) = 0;
178 void InsertTuple3(
vtkIdType tupleIdx,
double val0,
double val1,
double val2)
180 void InsertTuple4(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3)
182 void InsertTuple6(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3,
183 double val4,
double val5)
VTK_EXPECTS(0 <= tupleIdx);
184 void InsertTuple9(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3,
185 double val4,
double val5,
double val6,
double val7,
double val8)
VTK_EXPECTS(0 <= tupleIdx);
194 virtual
vtkIdType InsertNextTuple(const
float* tuple) = 0;
195 virtual
vtkIdType InsertNextTuple(const
double* tuple) = 0;
204 void InsertNextTuple1(
double value);
205 void InsertNextTuple2(
double val0,
double val1);
206 void InsertNextTuple3(
double val0,
double val1,
double val2);
207 void InsertNextTuple4(
double val0,
double val1,
double val2,
double val3);
208 void InsertNextTuple6(
209 double val0,
double val1,
double val2,
double val3,
double val4,
double val5);
210 void InsertNextTuple9(
double val0,
double val1,
double val2,
double val3,
double val4,
211 double val5,
double val6,
double val7,
double val8);
220 virtual
void RemoveTuple(
vtkIdType tupleIdx)
221 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples()) = 0;
222 virtual
void RemoveFirstTuple() { this->RemoveTuple(0); }
223 virtual void RemoveLastTuple();
240 virtual
void SetComponent(
vtkIdType tupleIdx,
int compIdx,
double value)
241 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
242 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
248 virtual
void InsertComponent(
vtkIdType tupleIdx,
int compIdx,
double value)
259 virtual
void GetData(
288 virtual
void FillComponent(
int compIdx,
double value)
289 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
294 virtual
void Fill(
double value);
304 virtual
void CopyComponent(
int dstComponent,
vtkDataArray* src,
int srcComponent);
321 unsigned long GetActualMemorySize() const override;
327 void CreateDefaultLookupTable();
346 void GetRange(
double range[2],
int comp) { this->ComputeRange(
range, comp); }
359 this->GetRange(this->
Range, comp);
405 this->GetFiniteRange(this->FiniteRange, comp);
406 return this->FiniteRange;
435 void GetDataTypeRange(
double range[2]);
436 double GetDataTypeMin();
437 double GetDataTypeMax();
438 static void GetDataTypeRange(
int type,
double range[2]);
439 static double GetDataTypeMin(
int type);
440 static double GetDataTypeMax(
int type);
447 virtual double GetMaxNorm();
521 virtual void ComputeRange(
double range[2],
int comp);
530 virtual void ComputeFiniteRange(
double range[2],
int comp);
538 virtual bool ComputeScalarRange(
double* ranges);
544 virtual bool ComputeVectorRange(
double range[2]);
552 virtual bool ComputeFiniteScalarRange(
double* ranges);
558 virtual bool ComputeFiniteVectorRange(
double range[2]);
566 double FiniteRange[2];
581 switch (
source->GetArrayType())
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.
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() const
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.
int IsNumeric() const override
This method is here to make backward compatibility easier.
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.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph *>::edge_descriptor e, vtkGraph *)
int GetArrayType() const 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
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.
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.
auto Range(IterablePtr iterable, Options &&... opts) -> typename detail::IterableTraits< typename detail::StripPointers< IterablePtr >::type >::RangeType
Generate an iterable STL proxy object for a VTK container.
vtkArrayDownCast_FastCastMacro(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...
int GetElementComponentSize() const override
Return the size, in bytes, of the lowest-level element of an array.
represent and manipulate 3D points
virtual int GetDataTypeSize() const =0
Return the size of the underlying data type.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.