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;}
334 VTK_DATA_ARRAY_ALIGNED_FREE
352 virtual void SetVoidArray(
void *vtkNotUsed(array),
354 int vtkNotUsed(
save)) =0;
356 int vtkNotUsed(deleteMethod))
357 {this->SetVoidArray(array,
size,
save);};
365 virtual void ExportToVoidPointer(
void *out_ptr);
375 virtual unsigned long GetActualMemorySize() = 0;
381 vtkSetStringMacro(Name);
382 vtkGetStringMacro(Name);
389 {
return vtkImageScalarTypeNameMacro( this->GetDataType() ); }
407 virtual int IsNumeric() = 0;
424 return this->GetNumberOfComponents() * this->GetNumberOfTuples();
439 VTK_EXPECTS(0 <= valueIdx && valueIdx < GetNumberOfValues());
453 VTK_EXPECTS(0 <= valueIdx && valueIdx < GetNumberOfValues()) = 0;
463 virtual void DataChanged() = 0;
470 virtual void ClearLookup() = 0;
524 virtual void GetProminentComponentValues(
int comp,
vtkVariantArray* values,
525 double uncertainty = 1.e-6,
double minimumProminence = 1.e-3);
556 virtual int CopyInformation(
vtkInformation *infoFrom,
int deep=1);
615 MAX_DISCRETE_VALUES = 32
623 vtkGetMacro(MaxDiscreteValues,
unsigned int);
624 vtkSetMacro(MaxDiscreteValues,
unsigned int);
635 DataArrayTemplate = AoSDataArrayTemplate
644 return AbstractArray;
670 virtual void UpdateDiscreteValueSet(
double uncertainty,
double minProminence);
685 class vtkInternalComponentNames;
699 template <
typename ArrayT>
704 return ArrayT::SafeDownCast(array);
726 template <
typename ArrayT>
739 #define vtkArrayDownCast_FastCastMacro(ArrayT) \ 740 template <> struct vtkArrayDownCast_impl<ArrayT> \ 742 inline ArrayT* operator()(vtkAbstractArray *array) \ 744 return ArrayT::FastDownCast(array); \ 756 #define vtkArrayDownCast_TemplateFastCastMacro(ArrayT) \ 757 template <typename ValueT> struct vtkArrayDownCast_impl<ArrayT<ValueT> > \ 759 inline ArrayT<ValueT>* operator()(vtkAbstractArray *array) \ 761 return ArrayT<ValueT>::FastDownCast(array); \ vtkIdType GetMaxId()
What is the maximum id currently in the 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.
An array holding vtkVariants.
vtkIdType GetNumberOfTuples()
Get the number of complete tuples (a component group) in the array.
Abstract superclass for all arrays.
Implementation of vtkArrayDownCast.
virtual int GetArrayType()
Method for type-checking in FastDownCast implementations.
dynamic, self-adjusting array of vtkIdType
int GetNumberOfComponents()
Set/Get the dimension (n) of the components.
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.
virtual vtkIdType GetDataSize()
Returns the size of the data in DataTypeSize units.
vtkInformation * Information
a simple class to control print indentation
list of point or cell ids
virtual const char * GetDataTypeAsString(void)
Get the name of a data type as a string.
ArrayT * operator()(vtkAbstractArray *array)
abstract superclass for arrays of numeric data
bool HasInformation()
Inquire if this array has an instance of vtkInformation already associated with it.
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))
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkIdType GetSize()
Return the size of the data.
vtkInternalComponentNames * ComponentNames
ArrayT * vtkArrayDownCast(vtkAbstractArray *array)
vtkArrayDownCast is to be used by generic (e.g.
unsigned int MaxDiscreteValues