29 #ifndef vtkDataArray_h
30 #define vtkDataArray_h
33 #include "vtkCommonCoreModule.h"
34 #include "vtkVTK_USE_SCALED_SOA_ARRAYS.h"
36 VTK_ABI_NAMESPACE_BEGIN
92 double* weights)
override;
101 virtual double* GetTuple(
vtkIdType tupleIdx)
109 virtual void GetTuple(
vtkIdType tupleIdx,
double* tuple)
121 double* GetTuple3(
vtkIdType tupleIdx)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
123 double* GetTuple4(
vtkIdType tupleIdx)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
125 double* GetTuple6(
vtkIdType tupleIdx)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
127 double* GetTuple9(
vtkIdType tupleIdx)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
137 virtual
void SetTuple(
vtkIdType tupleIdx, const
float* tuple)
138 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
139 virtual
void SetTuple(
vtkIdType tupleIdx, const
double* tuple)
140 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
150 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
151 void SetTuple2(
vtkIdType tupleIdx,
double val0,
double val1)
152 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
153 void SetTuple3(
vtkIdType tupleIdx,
double val0,
double val1,
double val2)
154 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
155 void SetTuple4(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3)
156 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
157 void SetTuple6(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3,
158 double val4,
double val5)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
159 void SetTuple9(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3,
160 double val4,
double val5,
double val6,
double val7,
double val8)
161 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
169 virtual
void InsertTuple(
vtkIdType tupleIdx, const
float* tuple)
VTK_EXPECTS(0 <= tupleIdx) = 0;
170 virtual
void InsertTuple(
vtkIdType tupleIdx, const
double* tuple)
VTK_EXPECTS(0 <= tupleIdx) = 0;
181 void InsertTuple3(
vtkIdType tupleIdx,
double val0,
double val1,
double val2)
183 void InsertTuple4(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3)
185 void InsertTuple6(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3,
186 double val4,
double val5)
VTK_EXPECTS(0 <= tupleIdx);
187 void InsertTuple9(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3,
188 double val4,
double val5,
double val6,
double val7,
double val8)
VTK_EXPECTS(0 <= tupleIdx);
197 virtual
vtkIdType InsertNextTuple(const
float* tuple) = 0;
198 virtual
vtkIdType InsertNextTuple(const
double* tuple) = 0;
207 void InsertNextTuple1(
double value);
208 void InsertNextTuple2(
double val0,
double val1);
209 void InsertNextTuple3(
double val0,
double val1,
double val2);
210 void InsertNextTuple4(
double val0,
double val1,
double val2,
double val3);
211 void InsertNextTuple6(
212 double val0,
double val1,
double val2,
double val3,
double val4,
double val5);
213 void InsertNextTuple9(
double val0,
double val1,
double val2,
double val3,
double val4,
214 double val5,
double val6,
double val7,
double val8);
223 virtual
void RemoveTuple(
vtkIdType tupleIdx)
224 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples()) = 0;
225 virtual
void RemoveFirstTuple() { this->RemoveTuple(0); }
226 virtual void RemoveLastTuple();
243 virtual
void SetComponent(
vtkIdType tupleIdx,
int compIdx,
double value)
244 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
245 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
251 virtual
void InsertComponent(
vtkIdType tupleIdx,
int compIdx,
double value)
291 virtual
void FillComponent(
int compIdx,
double value)
292 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
297 virtual
void Fill(
double value);
307 virtual
void CopyComponent(
int dstComponent,
vtkDataArray* src,
int srcComponent);
324 unsigned long GetActualMemorySize() const override;
330 void CreateDefaultLookupTable();
358 void GetRange(
double range[2],
int comp) { this->ComputeRange(range, comp); }
359 void GetRange(
double range[2],
int comp,
const unsigned char* ghosts,
unsigned char ghostsToSkip)
361 this->ComputeRange(range, comp, ghosts, ghostsToSkip);
376 this->GetRange(this->
Range, comp);
421 double range[2],
int comp,
const unsigned char* ghosts,
unsigned char ghostsToSkip)
423 this->ComputeFiniteRange(range, comp, ghosts, ghostsToSkip);
438 this->GetFiniteRange(this->FiniteRange, comp);
439 return this->FiniteRange;
468 void GetDataTypeRange(
double range[2]);
469 double GetDataTypeMin();
470 double GetDataTypeMax();
471 static void GetDataTypeRange(
int type,
double range[2]);
472 static double GetDataTypeMin(
int type);
473 static double GetDataTypeMax(
int type);
480 virtual double GetMaxNorm();
565 virtual void ComputeRange(
double range[2],
int comp);
566 virtual void ComputeRange(
567 double range[2],
int comp,
const unsigned char* ghosts,
unsigned char ghostsToSkip = 0xff);
587 virtual void ComputeFiniteRange(
double range[2],
int comp);
588 virtual void ComputeFiniteRange(
589 double range[2],
int comp,
const unsigned char* ghosts,
unsigned char ghostsToSkip = 0xff);
608 virtual bool ComputeScalarRange(
double* ranges);
609 virtual bool ComputeScalarRange(
610 double* ranges,
const unsigned char* ghosts,
unsigned char ghostsToSkip = 0xff);
626 virtual bool ComputeVectorRange(
double range[2]);
627 virtual bool ComputeVectorRange(
628 double range[2],
const unsigned char* ghosts,
unsigned char ghostsToSkip = 0xff);
646 virtual bool ComputeFiniteScalarRange(
double* ranges);
647 virtual bool ComputeFiniteScalarRange(
648 double* ranges,
const unsigned char* ghosts,
unsigned char ghostsToSkip = 0xff);
664 virtual bool ComputeFiniteVectorRange(
double range[2]);
665 virtual bool ComputeFiniteVectorRange(
666 double range[2],
const unsigned char* ghosts,
unsigned char ghostsToSkip = 0xff);
675 double FiniteRange[2];
706 VTK_ABI_NAMESPACE_END
712 VTK_ABI_NAMESPACE_BEGIN
719 VTK_ABI_NAMESPACE_END
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...
virtual void InsertTuplesStartingAt(vtkIdType dstStart, vtkIdList *srcIds, vtkAbstractArray *source)=0
Copy the tuples indexed in srcIds from the source array to the tuple locations starting at index dstS...
int GetArrayType() const override
Method for type-checking in FastDownCast implementations.
virtual void GetTuples(vtkIdList *tupleIds, vtkAbstractArray *output)
Given a list of tuple ids, return an array of tuples.
Abstract superclass for all arrays.
map scalar values into colors via a lookup table
void GetFiniteRange(double range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip)
The range of the data array values for the given component will be returned in the provided range arr...
void GetRange(double range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip)
The range of the data array values for the given component will be returned in the provided range arr...
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...
int GetElementComponentSize() const override
Return the size, in bytes, of the lowest-level element of an array.
void GetFiniteRange(double range[2])
The range of the data array values will be returned in the provided range array argument.
double * GetFiniteRange(int comp)
Return the range of the data array values for the given component.
dynamic, self-adjusting array of double
double * GetRange(int comp)
Return the range of the data array values for the given component.
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.
virtual int GetDataTypeSize() const =0
Return the size of the underlying data type.
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.
virtual int CopyInformation(vtkInformation *infoFrom, vtkTypeBool deep=1)
Copy information instance.
list of point or cell ids
abstract superclass for arrays of numeric data
vtkLookupTable * LookupTable
vtkIdType GetNumberOfTuples() const
Get the number of complete tuples (a component group) in the array.
#define VTK_SIZEHINT(...)
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
virtual int GetArrayType() const
Method for type-checking in FastDownCast implementations.
vtkSmartPointer< vtkDataArray > GetData(const Ioss::GroupingEntity *entity, const std::string &fieldname, Ioss::Transform *transform=nullptr, Cache *cache=nullptr, const std::string &cachekey=std::string())
Returns a VTK array for a given field (fieldname) on the chosen block (or set) entity.
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() const override
This method is here to make backward compatibility easier.
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 SetTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source)=0
Set the tuple at dstTupleIdx in this array to the tuple at srcTupleIdx in the source array...
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...
represent and manipulate 3D points
represent and manipulate fields of data
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.