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() = 0;
108 virtual int GetDataTypeSize() = 0;
109 static int GetDataTypeSize(
int type);
119 virtual int GetElementComponentSize() = 0;
126 vtkSetClampMacro(NumberOfComponents,
int, 1,
VTK_INT_MAX);
144 bool HasAComponentName();
159 virtual void SetNumberOfTuples(
vtkIdType numTuples) = 0;
166 virtual void SetNumberOfValues(
vtkIdType numValues);
172 {
return (this->MaxId + 1)/this->NumberOfComponents;}
182 return (this->MaxId + 1);
246 virtual bool HasStandardMemoryLayout();
255 virtual void *GetVoidPointer(
vtkIdType valueIdx) = 0;
285 virtual void InterpolateTuple(
vtkIdType dstTupleIdx,
294 virtual void Squeeze() = 0;
305 virtual int Resize(
vtkIdType numTuples) = 0;
328 {
return this->MaxId;}
335 VTK_DATA_ARRAY_USER_DEFINED
356 virtual void SetVoidArray(
void *vtkNotUsed(array),
358 int vtkNotUsed(
save)) =0;
360 int vtkNotUsed(deleteMethod))
361 {this->SetVoidArray(array,
size,
save);};
370 virtual void SetArrayFreeFunction(
void (*callback)(
void *)) = 0;
377 virtual void ExportToVoidPointer(
void *out_ptr);
387 virtual unsigned long GetActualMemorySize() = 0;
393 vtkSetStringMacro(Name);
394 vtkGetStringMacro(Name);
401 {
return vtkImageScalarTypeNameMacro( this->GetDataType() ); }
419 virtual int IsNumeric() = 0;
436 return this->GetNumberOfComponents() * this->GetNumberOfTuples();
451 VTK_EXPECTS(0 <= valueIdx && valueIdx < GetNumberOfValues());
465 VTK_EXPECTS(0 <= valueIdx && valueIdx < GetNumberOfValues()) = 0;
475 virtual void DataChanged() = 0;
482 virtual void ClearLookup() = 0;
536 virtual void GetProminentComponentValues(
int comp,
vtkVariantArray* values,
537 double uncertainty = 1.e-6,
double minimumProminence = 1.e-3);
568 virtual int CopyInformation(
vtkInformation *infoFrom,
int deep=1);
627 MAX_DISCRETE_VALUES = 32
635 vtkGetMacro(MaxDiscreteValues,
unsigned int);
636 vtkSetMacro(MaxDiscreteValues,
unsigned int);
647 DataArrayTemplate = AoSDataArrayTemplate
656 return AbstractArray;
682 virtual void UpdateDiscreteValueSet(
double uncertainty,
double minProminence);
697 class vtkInternalComponentNames;
711 template <
typename ArrayT>
716 return ArrayT::SafeDownCast(array);
738 template <
typename ArrayT>
751 #define vtkArrayDownCast_FastCastMacro(ArrayT) \
752 template <> struct vtkArrayDownCast_impl<ArrayT> \
754 inline ArrayT* operator()(vtkAbstractArray *array) \
756 return ArrayT::FastDownCast(array); \
768 #define vtkArrayDownCast_TemplateFastCastMacro(ArrayT) \
769 template <typename ValueT> struct vtkArrayDownCast_impl<ArrayT<ValueT> > \
771 inline ArrayT<ValueT>* operator()(vtkAbstractArray *array) \
773 return ArrayT<ValueT>::FastDownCast(array); \
virtual vtkIdType GetDataSize()
Returns the size of the data in DataTypeSize units.
int GetNumberOfComponents()
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
bool HasInformation()
Inquire if this array has an instance of vtkInformation already associated with it.
vtkIdType GetSize()
Return the size of the data.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkIdType GetNumberOfTuples()
Get the number of complete tuples (a component group) in the array.
vtkIdType GetNumberOfValues() const
Get the total number of values in the array.
vtkIdType GetMaxId()
What is the maximum id currently in the array.
void Reset()
Reset to an empty state, without freeing any memory.
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.
virtual int GetArrayType()
Method for type-checking in FastDownCast implementations.
ArrayT * vtkArrayDownCast(vtkAbstractArray *array)
vtkArrayDownCast is to be used by generic (e.g.
Abstract superclass for all arrays.
unsigned int MaxDiscreteValues
dynamic, self-adjusting array of vtkIdType
Abstract superclass to iterate over elements in an vtkAbstractArray.
virtual const char * GetDataTypeAsString(void)
Get the name of a data type as a string.