Go to the documentation of this file.
60 #ifndef vtkAbstractArray_h
61 #define vtkAbstractArray_h
63 #include "vtkCommonCoreModule.h"
97 virtual void Initialize() = 0;
103 virtual int GetDataType() =0;
111 virtual int GetDataTypeSize() = 0;
112 static int GetDataTypeSize(
int type);
122 virtual int GetElementComponentSize() = 0;
129 vtkSetClampMacro(NumberOfComponents,
int, 1,
VTK_INT_MAX);
147 bool HasAComponentName();
162 virtual void SetNumberOfTuples(
vtkIdType numTuples) = 0;
169 virtual void SetNumberOfValues(
vtkIdType numValues);
175 {
return (this->MaxId + 1)/this->NumberOfComponents;}
185 return (this->MaxId + 1);
249 virtual bool HasStandardMemoryLayout();
258 virtual void *GetVoidPointer(
vtkIdType valueIdx) = 0;
288 virtual void InterpolateTuple(
vtkIdType dstTupleIdx,
297 virtual void Squeeze() = 0;
308 virtual int Resize(
vtkIdType numTuples) = 0;
331 {
return this->MaxId;}
336 VTK_DATA_ARRAY_DELETE
351 virtual void SetVoidArray(
void *vtkNotUsed(array),
353 int vtkNotUsed(
save)) =0;
355 int vtkNotUsed(deleteMethod))
356 {this->SetVoidArray(array,
size,
save);};
364 virtual void ExportToVoidPointer(
void *out_ptr);
374 virtual unsigned long GetActualMemorySize() = 0;
380 vtkSetStringMacro(Name);
388 {
return vtkImageScalarTypeNameMacro( this->GetDataType() ); }
406 virtual int IsNumeric() = 0;
423 return this->GetNumberOfComponents() * this->GetNumberOfTuples();
459 virtual void DataChanged() = 0;
466 virtual void ClearLookup() = 0;
520 virtual void GetProminentComponentValues(
int comp,
vtkVariantArray* values,
521 double uncertainty = 1.e-6,
double minimumProminence = 1.e-3);
552 virtual int CopyInformation(
vtkInformation *infoFrom,
int deep=1);
594 MAX_DISCRETE_VALUES = 32
602 vtkGetMacro(MaxDiscreteValues,
unsigned int);
614 DataArrayTemplate = AoSDataArrayTemplate
623 return AbstractArray;
649 virtual
void UpdateDiscreteValueSet(
double uncertainty,
double minProminence);
653 int NumberOfComponents;
656 unsigned int MaxDiscreteValues;
664 class vtkInternalComponentNames;
665 vtkInternalComponentNames* ComponentNames;
678 template <typename ArrayT>
683 return ArrayT::SafeDownCast(array);
705 template <
typename ArrayT>
718 #define vtkArrayDownCast_FastCastMacro(ArrayT) \
719 template <> struct vtkArrayDownCast_impl<ArrayT> \
721 inline ArrayT* operator()(vtkAbstractArray *array) \
723 return ArrayT::FastDownCast(array); \
735 #define vtkArrayDownCast_TemplateFastCastMacro(ArrayT) \
736 template <typename ValueT> struct vtkArrayDownCast_impl<ArrayT<ValueT> > \
738 inline ArrayT<ValueT>* operator()(vtkAbstractArray *array) \
740 return ArrayT<ValueT>::FastDownCast(array); \
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
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 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
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.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
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.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
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.