VTK  9.6.1
vtkDataArray.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
28
29#ifndef vtkDataArray_h
30#define vtkDataArray_h
31
32#include "vtkAbstractArray.h"
33#include "vtkCommonCoreModule.h" // For export macro
34#include "vtkWrappingHints.h" // For VTK_MARSHALMANUAL
35
36VTK_ABI_NAMESPACE_BEGIN
37class vtkDoubleArray;
38class vtkIdList;
41class vtkLookupTable;
42class vtkPoints;
43
44class VTKCOMMONCORE_EXPORT VTK_MARSHALMANUAL vtkDataArray : public vtkAbstractArray
45{
46public:
48 void PrintSelf(ostream& os, vtkIndent indent) override;
49 using ArrayTypeTag = std::integral_constant<int, vtkArrayTypes::VTK_DATA_ARRAY>;
50 using typename vtkAbstractArray::DataTypeTag;
51
59
66 int IsNumeric() const override { return 1; }
67
73 int GetElementComponentSize() const override { return this->GetDataTypeSize(); }
74
75 // Reimplemented virtuals (doc strings are inherited from superclass):
77
82 void InsertTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray* source) override;
84 void InsertTuples(vtkIdList* dstIds, vtkIdList* srcIds, vtkAbstractArray* source) override;
86 vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray* source) override;
88 vtkIdType dstStart, vtkIdList* srcIds, vtkAbstractArray* source) override;
89 void SetTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray* source) override;
91 void GetTuples(vtkIdList* tupleIds, vtkAbstractArray* output) override;
92 void GetTuples(vtkIdType p1, vtkIdType p2, vtkAbstractArray* output) override;
94 double* weights) override;
95 void InterpolateTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx1, vtkAbstractArray* source1,
96 vtkIdType srcTupleIdx2, vtkAbstractArray* source2, double t) override;
97
103 virtual double* GetTuple(vtkIdType tupleIdx)
104 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples()) = 0;
105
111 virtual void GetTuple(vtkIdType tupleIdx, double* tuple)
112 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples()) = 0;
113
115
124 virtual void GetIntegerTuple(vtkIdType tupleIdx, vtkTypeInt64* tuple)
125 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
126 virtual void SetIntegerTuple(vtkIdType tupleIdx, vtkTypeInt64* tuple)
127 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
129
131
140 virtual void GetUnsignedTuple(vtkIdType tupleIdx, vtkTypeUInt64* tuple)
141 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
142 virtual void SetUnsignedTuple(vtkIdType tupleIdx, vtkTypeUInt64* tuple)
143 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
145
147
152 double GetTuple1(vtkIdType tupleIdx) VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
153 double* GetTuple2(vtkIdType tupleIdx) VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
154 VTK_SIZEHINT(2);
155 double* GetTuple3(vtkIdType tupleIdx) VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
156 VTK_SIZEHINT(3);
157 double* GetTuple4(vtkIdType tupleIdx) VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
158 VTK_SIZEHINT(4);
159 double* GetTuple6(vtkIdType tupleIdx) VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
160 VTK_SIZEHINT(6);
161 double* GetTuple9(vtkIdType tupleIdx) VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
162 VTK_SIZEHINT(9);
164
166
171 virtual void SetTuple(vtkIdType tupleIdx, const float* tuple)
172 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
173 virtual void SetTuple(vtkIdType tupleIdx, const double* tuple)
174 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
176
178
183 void SetTuple1(vtkIdType tupleIdx, double value)
184 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
185 void SetTuple2(vtkIdType tupleIdx, double val0, double val1)
186 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
187 void SetTuple3(vtkIdType tupleIdx, double val0, double val1, double val2)
188 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
189 void SetTuple4(vtkIdType tupleIdx, double val0, double val1, double val2, double val3)
190 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
191 void SetTuple6(vtkIdType tupleIdx, double val0, double val1, double val2, double val3,
192 double val4, double val5) VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
193 void SetTuple9(vtkIdType tupleIdx, double val0, double val1, double val2, double val3,
194 double val4, double val5, double val6, double val7, double val8)
195 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
197
199
203 virtual void InsertTuple(vtkIdType tupleIdx, const float* tuple) VTK_EXPECTS(0 <= tupleIdx) = 0;
204 virtual void InsertTuple(vtkIdType tupleIdx, const double* tuple) VTK_EXPECTS(0 <= tupleIdx) = 0;
206
208
213 void InsertTuple1(vtkIdType tupleIdx, double value) VTK_EXPECTS(0 <= tupleIdx);
214 void InsertTuple2(vtkIdType tupleIdx, double val0, double val1) VTK_EXPECTS(0 <= tupleIdx);
215 void InsertTuple3(vtkIdType tupleIdx, double val0, double val1, double val2)
216 VTK_EXPECTS(0 <= tupleIdx);
217 void InsertTuple4(vtkIdType tupleIdx, double val0, double val1, double val2, double val3)
218 VTK_EXPECTS(0 <= tupleIdx);
219 void InsertTuple6(vtkIdType tupleIdx, double val0, double val1, double val2, double val3,
220 double val4, double val5) VTK_EXPECTS(0 <= tupleIdx);
221 void InsertTuple9(vtkIdType tupleIdx, double val0, double val1, double val2, double val3,
222 double val4, double val5, double val6, double val7, double val8) VTK_EXPECTS(0 <= tupleIdx);
224
226
231 virtual vtkIdType InsertNextTuple(const float* tuple) = 0;
232 virtual vtkIdType InsertNextTuple(const double* tuple) = 0;
234
236
241 void InsertNextTuple1(double value);
242 void InsertNextTuple2(double val0, double val1);
243 void InsertNextTuple3(double val0, double val1, double val2);
244 void InsertNextTuple4(double val0, double val1, double val2, double val3);
246 double val0, double val1, double val2, double val3, double val4, double val5);
247 void InsertNextTuple9(double val0, double val1, double val2, double val3, double val4,
248 double val5, double val6, double val7, double val8);
250
252
257 virtual void RemoveTuple(vtkIdType tupleIdx)
258 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples()) = 0;
259 virtual void RemoveFirstTuple() { this->RemoveTuple(0); }
260 virtual void RemoveLastTuple();
262
267 virtual double GetComponent(vtkIdType tupleIdx, int compIdx)
268 VTK_EXPECTS(0 <= tupleIdx && GetNumberOfComponents() * tupleIdx + compIdx < GetNumberOfValues())
269 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
270
278 virtual void SetComponent(vtkIdType tupleIdx, int compIdx, double value)
279 VTK_EXPECTS(0 <= tupleIdx && GetNumberOfComponents() * tupleIdx + compIdx < GetNumberOfValues())
280 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
281
286 virtual void InsertComponent(vtkIdType tupleIdx, int compIdx, double value)
287 VTK_EXPECTS(0 <= tupleIdx) VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
288
297 virtual void GetData(
298 vtkIdType tupleMin, vtkIdType tupleMax, int compMin, int compMax, vtkDoubleArray* data);
299
301
305 void DeepCopy(vtkAbstractArray* aa) override;
306 virtual void DeepCopy(vtkDataArray* da);
308
318 virtual void ShallowCopy(vtkDataArray* other);
319
326 virtual void FillComponent(int compIdx, double value)
327 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
328
332 virtual void Fill(double value);
333
335
346 bool CopyComponent(int dstComponent, vtkAbstractArray* src, int srcComponent) override;
347 virtual bool CopyComponent(int dstComponent, vtkDataArray* src, int srcComponent);
349
355 virtual void* WriteVoidPointer(vtkIdType valueIdx, vtkIdType numValues) = 0;
356
365 unsigned long GetActualMemorySize() const override;
366
372
374
378 vtkGetObjectMacro(LookupTable, vtkLookupTable);
380
382
399 void GetRange(double range[2], int comp) { this->ComputeRange(range, comp); }
400 void GetRange(double range[2], int comp, const unsigned char* ghosts, unsigned char ghostsToSkip)
401 {
402 this->ComputeRange(range, comp, ghosts, ghostsToSkip);
403 }
404
405
407
415 double* GetRange(int comp) VTK_SIZEHINT(2)
416 {
417 this->GetRange(this->Range, comp);
418 return this->Range;
419 }
420
421
429 double* GetRange() VTK_SIZEHINT(2) { return this->GetRange(0); }
430
439 void GetRange(double range[2]) { this->GetRange(range, 0); }
440
442
460 void GetFiniteRange(double range[2], int comp) { this->ComputeFiniteRange(range, comp); }
462 double range[2], int comp, const unsigned char* ghosts, unsigned char ghostsToSkip)
463 {
464 this->ComputeFiniteRange(range, comp, ghosts, ghostsToSkip);
465 }
466
467
469
477 double* GetFiniteRange(int comp) VTK_SIZEHINT(2)
478 {
479 this->GetFiniteRange(this->FiniteRange, comp);
480 return this->FiniteRange;
481 }
482
483
491 double* GetFiniteRange() VTK_SIZEHINT(2) { return this->GetFiniteRange(0); }
492
501 void GetFiniteRange(double range[2]) { this->GetFiniteRange(range, 0); }
502
504
509 void GetDataTypeRange(double range[2]);
512 static void GetDataTypeRange(int type, double range[2]);
513 static double GetDataTypeMin(int type);
514 static double GetDataTypeMax(int type);
516
521 virtual double GetMaxNorm();
522
532 static vtkDataArray* CreateDataArray(int dataType);
533
540
550
560
570
574 void Modified() override;
575
581
589 int CopyInformation(vtkInformation* infoFrom, vtkTypeBool deep = 1) override;
590
594 int GetArrayType() const override { return vtkDataArray::ArrayTypeTag::value; }
595
597 {
598 HostMemory, // CPU memory
599 CudaDeviceMemory, // NVIDIA GPU via CUDA
600 HipDeviceMemory, // AMD GPU via HIP
601 };
602
607
612 virtual void* GetDeviceVoidPointer(vtkIdType vtkNotUsed(valueIdx)) { return nullptr; }
613
614protected:
615 friend class vtkPoints;
616 friend class vtkFieldData;
617
619
635 virtual void ComputeRange(double range[2], int comp);
636 virtual void ComputeRange(
637 double range[2], int comp, const unsigned char* ghosts, unsigned char ghostsToSkip = 0xff);
639
641
657 virtual void ComputeFiniteRange(double range[2], int comp);
658 virtual void ComputeFiniteRange(
659 double range[2], int comp, const unsigned char* ghosts, unsigned char ghostsToSkip = 0xff);
661
663
678 virtual bool ComputeScalarRange(double* ranges);
679 virtual bool ComputeScalarRange(
680 double* ranges, const unsigned char* ghosts, unsigned char ghostsToSkip = 0xff);
682
684
696 virtual bool ComputeVectorRange(double range[2]);
697 virtual bool ComputeVectorRange(
698 double range[2], const unsigned char* ghosts, unsigned char ghostsToSkip = 0xff);
700
702
716 virtual bool ComputeFiniteScalarRange(double* ranges);
718 double* ranges, const unsigned char* ghosts, unsigned char ghostsToSkip = 0xff);
720
722
734 virtual bool ComputeFiniteVectorRange(double range[2]);
736 double range[2], const unsigned char* ghosts, unsigned char ghostsToSkip = 0xff);
738
739 // Construct object with default tuple dimension (number of components) of 1.
741 ~vtkDataArray() override;
742
744 double Range[2];
745 double FiniteRange[2];
746
747private:
748 double* GetTupleN(vtkIdType i, int n);
749
750 vtkDataArray(const vtkDataArray&) = delete;
751 void operator=(const vtkDataArray&) = delete;
752};
753
755VTK_ABI_NAMESPACE_END
756
757// These are used by vtkDataArrayPrivate.txx, but need to be available to
758// vtkGenericDataArray.h as well.
759namespace vtkDataArrayPrivate
760{
761VTK_ABI_NAMESPACE_BEGIN
763{
764};
766{
767};
768VTK_ABI_NAMESPACE_END
769}
770
771#endif
int GetNumberOfComponents() const
Set/Get the dimension (n) of the components.
vtkIdType GetNumberOfTuples() const
Get the number of complete tuples (a component group) in the array.
virtual int GetDataTypeSize() const =0
Return the size of the underlying data type.
std::integral_constant< int, VTK_OPAQUE > DataTypeTag
vtkIdType GetNumberOfValues() const
Get the total number of values in the array.
virtual double * GetTuple(vtkIdType tupleIdx)=0
Get the data tuple at tupleIdx.
void InsertNextTuple1(double value)
These methods are included as convenience for the wrappers.
double * GetTuple4(vtkIdType tupleIdx)
These methods are included as convenience for the wrappers.
double * GetRange()
Return the range of the data array.
virtual void ComputeRange(double range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
Compute the range for a specific component.
static double GetDataTypeMin(int type)
These methods return the Min and Max possible range of the native data type.
virtual void FillComponent(int compIdx, double value)
Fill a component of a data array with a specified value.
double * GetTuple2(vtkIdType tupleIdx)
These methods are included as convenience for the wrappers.
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...
double Range[2]
virtual bool ComputeScalarRange(double *ranges, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
Computes the range for each component of an array, the length of ranges must be two times the number ...
virtual bool ComputeVectorRange(double range[2])
Returns true if the range was computed.
void InsertTuple9(vtkIdType tupleIdx, double val0, double val1, double val2, double val3, double val4, double val5, double val6, double val7, double val8)
These methods are included as convenience for the wrappers.
void SetTuple4(vtkIdType tupleIdx, double val0, double val1, double val2, double val3)
These methods are included as convenience for the wrappers.
int IsNumeric() const override
This method is here to make backward compatibility easier.
void CreateDefaultLookupTable()
Create default lookup table.
void DeepCopy(vtkAbstractArray *aa) override
Deep copy of data.
void SetTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source) override
See documentation from parent class.
void GetDataTypeRange(double range[2])
These methods return the Min and Max possible range of the native data type.
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,...
double * GetTuple9(vtkIdType tupleIdx)
These methods are included as convenience for the wrappers.
virtual void ComputeRange(double range[2], int comp)
Compute the range for a specific component.
double * GetFiniteRange()
Return the range of the data array.
virtual bool ComputeScalarRange(double *ranges)
Computes the range for each component of an array, the length of ranges must be two times the number ...
void SetTuple9(vtkIdType tupleIdx, double val0, double val1, double val2, double val3, double val4, double val5, double val6, double val7, double val8)
These methods are included as convenience for the wrappers.
unsigned long GetActualMemorySize() const override
Return the memory in kibibytes (1024 bytes) consumed by this data array.
void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source) override
See documentation from parent class.
virtual bool ComputeFiniteVectorRange(double range[2], const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
Returns true if the range was computed.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void GetIntegerTuple(vtkIdType tupleIdx, vtkTypeInt64 *tuple)
Get/set the data at tupleIdx by filling in a user-provided array of integers.
virtual void SetIntegerTuple(vtkIdType tupleIdx, vtkTypeInt64 *tuple)
Get/set the data at tupleIdx by filling in a user-provided array of integers.
void InsertNextTuple3(double val0, double val1, double val2)
These methods are included as convenience for the wrappers.
void InsertTuple2(vtkIdType tupleIdx, double val0, double val1)
These methods are included as convenience for the wrappers.
void InsertNextTuple4(double val0, double val1, double val2, double val3)
These methods are included as convenience for the wrappers.
virtual bool ComputeVectorRange(double range[2], const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
Returns true if the range was computed.
double * GetTuple6(vtkIdType tupleIdx)
These methods are included as convenience for the wrappers.
~vtkDataArray() override
int GetArrayType() const override
Method for type-checking in FastDownCast implementations.
int GetElementComponentSize() const override
Return the size, in bytes, of the lowest-level element of an array.
virtual bool ComputeFiniteVectorRange(double range[2])
Returns true if the range was computed.
void SetTuple1(vtkIdType tupleIdx, double value)
These methods are included as convenience for the wrappers.
virtual void RemoveTuple(vtkIdType tupleIdx)=0
These methods remove tuples from the data array.
virtual void SetUnsignedTuple(vtkIdType tupleIdx, vtkTypeUInt64 *tuple)
Get/set the data at tupleIdx by filling in a user-provided array of unsigned integers.
virtual void GetUnsignedTuple(vtkIdType tupleIdx, vtkTypeUInt64 *tuple)
Get/set the data at tupleIdx by filling in a user-provided array of unsigned integers.
void GetRange(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 RemoveLastTuple()
These methods remove tuples from the data array.
double * GetRange(int comp)
Return the range of the data array values for the given component.
static vtkDataArray * FastDownCast(vtkAbstractArray *source)
Perform a fast, safe cast from a vtkAbstractArray to a vtkDataArray.
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...
void InsertNextTuple6(double val0, double val1, double val2, double val3, double val4, double val5)
These methods are included as convenience for the wrappers.
void GetTuples(vtkIdType p1, vtkIdType p2, vtkAbstractArray *output) override
Get the tuples for the range of tuple ids specified (i.e., p1->p2 inclusive).
double GetDataTypeMin()
These methods return the Min and Max possible range of the native data type.
double FiniteRange[2]
void InsertTuple6(vtkIdType tupleIdx, double val0, double val1, double val2, double val3, double val4, double val5)
These methods are included as convenience for the wrappers.
friend class vtkPoints
vtkSmartPointer< vtkDataArray > ToAOSDataArray()
If the array is not already in AOS format, return a new array that is with the same data.
virtual void SetComponent(vtkIdType tupleIdx, int compIdx, double value)
Set the data component at the location specified by tupleIdx and compIdx to value.
void InsertTuplesStartingAt(vtkIdType dstStart, vtkIdList *srcIds, vtkAbstractArray *source) override
See documentation from parent class.
virtual void ShallowCopy(vtkDataArray *other)
Create a shallow copy of other into this, if possible.
virtual void InsertComponent(vtkIdType tupleIdx, int compIdx, double value)
Insert value 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.
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...
double GetTuple1(vtkIdType tupleIdx)
These methods are included as convenience for the wrappers.
double GetDataTypeMax()
These methods return the Min and Max possible range of the native data type.
virtual void GetData(vtkIdType tupleMin, vtkIdType tupleMax, int compMin, int compMax, vtkDoubleArray *data)
Get the data as a double array in the range (tupleMin,tupleMax) and (compMin, compMax).
void SetLookupTable(vtkLookupTable *lut)
Set/get the lookup table associated with this scalar data, if any.
void GetRange(double range[2])
The range of the data array values will be returned in the provided range array argument.
void SetTuple6(vtkIdType tupleIdx, double val0, double val1, double val2, double val3, double val4, double val5)
These methods are included as convenience for the wrappers.
virtual double GetComponent(vtkIdType tupleIdx, int compIdx)
Return the data component at the location specified by tupleIdx and compIdx.
int CopyInformation(vtkInformation *infoFrom, vtkTypeBool deep=1) override
Copy information instance.
vtkIdType InsertNextTuple(vtkIdType srcTupleIdx, vtkAbstractArray *source) override
See documentation from parent class.
virtual void ComputeFiniteRange(double range[2], int comp)
Compute the range for a specific component.
void InsertNextTuple2(double val0, double val1)
These methods are included as convenience for the wrappers.
virtual void RemoveFirstTuple()
These methods remove tuples from the data array.
virtual void * GetDeviceVoidPointer(vtkIdType valueIdx)
Return a pointer to the data that live on a device (CUDA or HIP).
bool CopyComponent(int dstComponent, vtkAbstractArray *src, int srcComponent) override
Copy a component from one data array into a component on this data array.
virtual double GetMaxNorm()
Return the maximum norm for the tuples.
std::integral_constant< int, vtkArrayTypes::VTK_DATA_ARRAY > ArrayTypeTag
virtual MemorySpace GetMemorySpace()
Return the MemorySpace of where the data is stored.
void InsertTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source) override
See documentation from parent class.
void InsertTuple4(vtkIdType tupleIdx, double val0, double val1, double val2, double val3)
These methods are included as convenience for the wrappers.
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...
static void GetDataTypeRange(int type, double range[2])
These methods return the Min and Max possible range of the native data type.
virtual void * WriteVoidPointer(vtkIdType valueIdx, vtkIdType numValues)=0
Get the address of a particular data index.
virtual bool ComputeFiniteScalarRange(double *ranges, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
Computes the range for each component of an array, the length of ranges must be two times the number ...
virtual void Fill(double value)
Fill all values of a data array with a specified value.
virtual void ComputeFiniteRange(double range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
Compute the range for a specific component.
static vtkDataArray * CreateDataArray(int dataType)
Creates an array for dataType where dataType is one of VTK_BIT, VTK_CHAR, VTK_SIGNED_CHAR,...
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 InsertTuple3(vtkIdType tupleIdx, double val0, double val1, double val2)
These methods are included as convenience for the wrappers.
void InsertNextTuple9(double val0, double val1, double val2, double val3, double val4, double val5, double val6, double val7, double val8)
These methods are included as convenience for the wrappers.
void SetTuple3(vtkIdType tupleIdx, double val0, double val1, double val2)
These methods are included as convenience for the wrappers.
void GetFiniteRange(double range[2])
The range of the data array values will be returned in the provided range array argument.
friend class vtkFieldData
double * GetFiniteRange(int comp)
Return the range of the data array values for the given component.
double * GetTuple3(vtkIdType tupleIdx)
These methods are included as convenience for the wrappers.
void InsertTuples(vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray *source) override
See documentation from parent class.
void SetTuple2(vtkIdType tupleIdx, double val0, double val1)
These methods are included as convenience for the wrappers.
void InsertTuple1(vtkIdType tupleIdx, double value)
These methods are included as convenience for the wrappers.
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.
static double GetDataTypeMax(int type)
These methods return the Min and Max possible range of the native data type.
vtkLookupTable * LookupTable
dynamic, self-adjusting array of double
list of point or cell ids
Definition vtkIdList.h:24
a simple class to control print indentation
Definition vtkIndent.h:29
Key for string values in vtkInformation.
Store vtkAlgorithm input/output information.
map scalar values into colors via a lookup table
represent and manipulate 3D points
Definition vtkPoints.h:30
Hold a reference to a vtkObjectBase instance.
static vtkInformationDoubleVectorKey * COMPONENT_RANGE()
This key is used to hold tight bounds on the range of one component over all tuples of the array.
static vtkInformationDoubleVectorKey * L2_NORM_RANGE()
This key is used to hold tight bounds on the $L_2$ norm of tuples in the array.
static vtkInformationDoubleVectorKey * L2_NORM_FINITE_RANGE()
This key is used to hold tight bounds on the $L_2$ norm of tuples in the array.
static vtkInformationStringKey * UNITS_LABEL()
A human-readable string indicating the units for the array data.
int vtkTypeBool
Definition vtkABI.h:64
#define vtkArrayDownCast_FastCastMacro(ArrayT)
This macro is used to tell vtkArrayDownCast to use FastDownCast instead of SafeDownCast.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define vtkDataArray
int vtkIdType
Definition vtkType.h:368
#define VTK_SIZEHINT(...)
#define VTK_EXPECTS(x)
#define VTK_MARSHALMANUAL
#define VTK_NEWINSTANCE