 |
VTK
9.0.1
|
Go to the documentation of this file.
57 #ifndef vtkAbstractArray_h
58 #define vtkAbstractArray_h
60 #include "vtkCommonCoreModule.h"
94 virtual void Initialize() = 0;
100 virtual int GetDataType()
const = 0;
108 virtual int GetDataTypeSize()
const = 0;
109 static int GetDataTypeSize(
int type);
119 virtual int GetElementComponentSize()
const = 0;
126 vtkSetClampMacro(NumberOfComponents,
int, 1,
VTK_INT_MAX);
144 bool HasAComponentName()
const;
159 virtual void SetNumberOfTuples(
vtkIdType numTuples) = 0;
167 virtual bool SetNumberOfValues(
vtkIdType numValues);
195 virtual void InsertTuple(
210 virtual void InsertTuples(
240 virtual bool HasStandardMemoryLayout()
const;
249 virtual void* GetVoidPointer(
vtkIdType valueIdx) = 0;
268 virtual void InterpolateTuple(
287 virtual void Squeeze() = 0;
326 VTK_DATA_ARRAY_USER_DEFINED
347 virtual void SetVoidArray(
351 this->SetVoidArray(array,
size,
save);
361 virtual void SetArrayFreeFunction(
void (*callback)(
void*)) = 0;
368 virtual void ExportToVoidPointer(
void* out_ptr);
378 virtual unsigned long GetActualMemorySize()
const = 0;
384 vtkSetStringMacro(Name);
385 vtkGetStringMacro(Name);
393 return vtkImageScalarTypeNameMacro(this->GetDataType());
412 virtual int IsNumeric()
const = 0;
429 return this->GetNumberOfComponents() * this->GetNumberOfTuples();
444 VTK_EXPECTS(0 <= valueIdx && valueIdx < GetNumberOfValues());
458 VTK_EXPECTS(0 <= valueIdx && valueIdx < GetNumberOfValues()) = 0;
468 virtual void DataChanged() = 0;
475 virtual void ClearLookup() = 0;
529 virtual void GetProminentComponentValues(
int comp,
vtkVariantArray* values,
530 double uncertainty = 1.e-6,
double minimumProminence = 1.e-3);
561 virtual int CopyInformation(
vtkInformation* infoFrom,
int deep = 1);
621 MAX_DISCRETE_VALUES = 32
629 vtkGetMacro(MaxDiscreteValues,
unsigned int);
630 vtkSetMacro(MaxDiscreteValues,
unsigned int);
643 DataArrayTemplate = AoSDataArrayTemplate
675 virtual void UpdateDiscreteValueSet(
double uncertainty,
double minProminence);
690 class vtkInternalComponentNames;
704 template <
typename ArrayT>
728 template <
typename ArrayT>
741 #define vtkArrayDownCast_FastCastMacro(ArrayT) \
743 struct vtkArrayDownCast_impl<ArrayT> \
745 inline ArrayT* operator()(vtkAbstractArray* array) { return ArrayT::FastDownCast(array); } \
756 #define vtkArrayDownCast_TemplateFastCastMacro(ArrayT) \
757 template <typename ValueT> \
758 struct vtkArrayDownCast_impl<ArrayT<ValueT> > \
760 inline ArrayT<ValueT>* operator()(vtkAbstractArray* array) \
762 return ArrayT<ValueT>::FastDownCast(array); \
@ ScaleSoADataArrayTemplate
@ VTK_DATA_ARRAY_ALIGNED_FREE
void save(Archiver &ar, const vtkUnicodeString &str, const unsigned int vtkNotUsed(version))
virtual void Modified()
Update the modification time for this object.
vtkInformation * Information
virtual void SetVoidArray(void *array, vtkIdType size, int save, int vtkNotUsed(deleteMethod))
abstract base class for most VTK objects
An array holding vtkVariants.
abstract superclass for arrays of numeric data
vtkInternalComponentNames * ComponentNames
vtkIdType GetNumberOfTuples() const
Get the number of complete tuples (a component group) in the array.
virtual int GetArrayType() const
Method for type-checking in FastDownCast implementations.
vtkIdType GetNumberOfValues() const
Get the total number of values in the array.
void Reset()
Reset to an empty state, without freeing any memory.
int GetNumberOfComponents() const
virtual vtkIdType GetDataSize() const
Returns the size of the data in DataTypeSize units.
a simple class to control print indentation
A atomic type representing the union of many types.
list of point or cell ids
ArrayT * operator()(vtkAbstractArray *array)
Implementation of vtkArrayDownCast.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
ArrayT * vtkArrayDownCast(vtkAbstractArray *array)
vtkArrayDownCast is to be used by generic (e.g.
Abstract superclass for all arrays.
vtkIdType GetMaxId() const
What is the maximum id currently in the array.
unsigned int MaxDiscreteValues
dynamic, self-adjusting array of vtkIdType
Abstract superclass to iterate over elements in an vtkAbstractArray.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
virtual const char * GetDataTypeAsString(void) const
Get the name of a data type as a string.
bool HasInformation() const
Inquire if this array has an instance of vtkInformation already associated with it.
vtkIdType GetSize() const
Return the size of the data.