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); \
abstract base class for most VTK objects
vtkIdType GetNumberOfValues() const
Get the total number of values in the array.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual const char * GetDataTypeAsString(void) const
Get the name of a data type as a string.
vtkIdType GetNumberOfTuples() const
Get the number of complete tuples (a component group) in the array.
An array holding vtkVariants.
int GetNumberOfComponents() const
Set/Get the dimension (n) of the components.
Abstract superclass for all arrays.
Implementation of vtkArrayDownCast.
dynamic, self-adjusting array of vtkIdType
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph *>::edge_descriptor e, vtkGraph *)
vtkIdType GetMaxId() const
What is the maximum id currently in the array.
A atomic type representing the union of many types.
virtual void SetVoidArray(void *array, vtkIdType size, int save, int vtkNotUsed(deleteMethod))
This method lets the user specify data to be held by the array.
vtkInformation * Information
a simple class to control print indentation
list of point or cell ids
ArrayT * operator()(vtkAbstractArray *array)
abstract superclass for arrays of numeric data
vtkIdType GetSize() const
Return the size of the data.
virtual void Modified()
Update the modification time for this object.
Abstract superclass to iterate over elements in an vtkAbstractArray.
void Reset()
Reset to an empty state, without freeing any memory.
void save(Archiver &ar, const vtkUnicodeString &str, const unsigned int vtkNotUsed(version))
vtkInternalComponentNames * ComponentNames
bool HasInformation() const
Inquire if this array has an instance of vtkInformation already associated with it.
ArrayT * vtkArrayDownCast(vtkAbstractArray *array)
vtkArrayDownCast is to be used by generic (e.g.
virtual vtkIdType GetDataSize() const
Returns the size of the data in DataTypeSize units.
virtual int GetArrayType() const
Method for type-checking in FastDownCast implementations.
unsigned int MaxDiscreteValues