VTK  9.3.20240329
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkBitArray Class Reference

dynamic, self-adjusting array of bits More...

#include <vtkBitArray.h>

Inheritance diagram for vtkBitArray:
[legend]
Collaboration diagram for vtkBitArray:
[legend]

Public Types

enum  DeleteMethod { VTK_DATA_ARRAY_FREE = vtkAbstractArray::VTK_DATA_ARRAY_FREE , VTK_DATA_ARRAY_DELETE = vtkAbstractArray::VTK_DATA_ARRAY_DELETE , VTK_DATA_ARRAY_ALIGNED_FREE = vtkAbstractArray::VTK_DATA_ARRAY_ALIGNED_FREE , VTK_DATA_ARRAY_USER_DEFINED = vtkAbstractArray::VTK_DATA_ARRAY_USER_DEFINED }
 
typedef vtkDataArray Superclass
 
- Public Types inherited from vtkDataArray
typedef vtkAbstractArray Superclass
 
- Public Types inherited from vtkAbstractArray
enum  DeleteMethod { VTK_DATA_ARRAY_FREE , VTK_DATA_ARRAY_DELETE , VTK_DATA_ARRAY_ALIGNED_FREE , VTK_DATA_ARRAY_USER_DEFINED }
 
enum  { MAX_DISCRETE_VALUES = 32 }
 
enum  {
  AbstractArray = 0 , DataArray , AoSDataArrayTemplate , SoADataArrayTemplate ,
  TypedDataArray , MappedDataArray , ScaleSoADataArrayTemplate , ImplicitArray ,
  DataArrayTemplate = AoSDataArrayTemplate
}
 
typedef vtkObject Superclass
 

Public Member Functions

virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class. More...
 
vtkBitArrayNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
vtkTypeBool Allocate (vtkIdType sz, vtkIdType ext=1000) override
 Allocate memory for this array. More...
 
void Initialize () override
 Release storage and reset array to initial state. More...
 
int GetDataType () const override
 Return the underlying data type. More...
 
int GetDataTypeSize () const override
 Return the size of the underlying data type. More...
 
void SetNumberOfTuples (vtkIdType number) override
 Set the number of n-tuples in the array. More...
 
bool SetNumberOfValues (vtkIdType number) override
 In addition to setting the number of values, this method also sets the unused bits of the last byte of the array. More...
 
void SetTuple (vtkIdType i, vtkIdType j, vtkAbstractArray *source) override
 Set the tuple at the ith location using the jth tuple in the source array. More...
 
void InsertTuple (vtkIdType i, vtkIdType j, vtkAbstractArray *source) override
 Insert the jth tuple in the source array, at ith location in this array. More...
 
void InsertTuples (vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source) override
 Copy the tuples indexed in srcIds from the source array to the tuple locations indexed by dstIds in this array. More...
 
void InsertTuplesStartingAt (vtkIdType dstStart, vtkIdList *srcIds, vtkAbstractArray *source) override
 Copy the tuples indexed in srcIds from the source array to the tuple locations starting at index dstStart. More...
 
void InsertTuples (vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray *source) override
 Copy n consecutive tuples starting at srcStart from the source array to this array, starting at the dstStart location. More...
 
vtkIdType InsertNextTuple (vtkIdType j, vtkAbstractArray *source) override
 Insert the jth tuple in the source array, at the end in this array. More...
 
double * GetTuple (vtkIdType i) override
 Get a pointer to a tuple at the ith location. More...
 
void GetTuple (vtkIdType i, double *tuple) override
 Copy the tuple value into a user-provided array. More...
 
void SetComponent (vtkIdType i, int j, double c) override
 Set the data component at the ith tuple and jth component location. More...
 
void Squeeze () override
 Free any unneeded memory. More...
 
vtkTypeBool Resize (vtkIdType numTuples) override
 Resize the array while conserving the data. More...
 
int GetValue (vtkIdType id) const
 Get the data at a particular index. More...
 
void SetValue (vtkIdType id, int value)
 Set the data at a particular index. More...
 
void InsertValue (vtkIdType id, int i)
 Inserts values and checks to make sure there is enough memory. More...
 
void SetVariantValue (vtkIdType idx, vtkVariant value) override
 Set a value in the array from a variant. More...
 
void InsertVariantValue (vtkIdType idx, vtkVariant value) override
 Inserts values from a variant and checks to ensure there is enough memory. More...
 
vtkIdType InsertNextValue (int i)
 
void InsertComponent (vtkIdType i, int j, double c) override
 Insert the data component at ith tuple and jth component location. More...
 
unsigned char * GetPointer (vtkIdType id)
 Direct manipulation of the underlying data. More...
 
unsigned char * WritePointer (vtkIdType id, vtkIdType number)
 Get the address of a particular data index. More...
 
void * WriteVoidPointer (vtkIdType id, vtkIdType number) override
 Get the address of a particular data index. More...
 
void * GetVoidPointer (vtkIdType id) override
 Return a void pointer. More...
 
void DeepCopy (vtkDataArray *da) override
 Deep copy of another bit array. More...
 
void DeepCopy (vtkAbstractArray *aa) override
 Deep copy of data. More...
 
void SetArrayFreeFunction (void(*callback)(void *)) override
 This method allows the user to specify a custom free function to be called when the array is deallocated. More...
 
vtkArrayIteratorNewIterator () override
 Returns a new vtkBitArrayIterator instance. More...
 
void DataChanged () override
 Tell the array explicitly that the data has changed. More...
 
void ClearLookup () override
 Delete the associated fast lookup data structure on this array, if it exists. More...
 
void SetTuple (vtkIdType i, const float *tuple) override
 Set the tuple value at the ith location in the array. More...
 
void SetTuple (vtkIdType i, const double *tuple) override
 Set the tuple value at the ith location in the array. More...
 
void InsertTuple (vtkIdType i, const float *tuple) override
 Insert (memory allocation performed) the tuple into the ith location in the array. More...
 
void InsertTuple (vtkIdType i, const double *tuple) override
 Insert (memory allocation performed) the tuple into the ith location in the array. More...
 
vtkIdType InsertNextTuple (const float *tuple) override
 Insert (memory allocation performed) the tuple onto the end of the array. More...
 
vtkIdType InsertNextTuple (const double *tuple) override
 Insert (memory allocation performed) the tuple onto the end of the array. More...
 
void RemoveTuple (vtkIdType id) override
 These methods remove tuples from the data array. More...
 
void RemoveFirstTuple () override
 These methods remove tuples from the data array. More...
 
void RemoveLastTuple () override
 These methods remove tuples from the data array. More...
 
void SetArray (unsigned char *array, vtkIdType size, int save, int deleteMethod=VTK_DATA_ARRAY_DELETE)
 This method lets the user specify data to be held by the array. More...
 
void SetVoidArray (void *array, vtkIdType size, int save) override
 This method lets the user specify data to be held by the array. More...
 
void SetVoidArray (void *array, vtkIdType size, int save, int deleteMethod) override
 This method lets the user specify data to be held by the array. More...
 
vtkIdType LookupValue (vtkVariant value) override
 Return the indices where a specific value appears. More...
 
void LookupValue (vtkVariant value, vtkIdList *ids) override
 Return the indices where a specific value appears. More...
 
vtkIdType LookupValue (int value)
 Return the indices where a specific value appears. More...
 
void LookupValue (int value, vtkIdList *ids)
 Return the indices where a specific value appears. More...
 
- Public Member Functions inherited from vtkDataArray
vtkDataArrayNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
int IsNumeric () const override
 This method is here to make backward compatibility easier. More...
 
int GetElementComponentSize () const override
 Return the size, in bytes, of the lowest-level element of an array. More...
 
void GetTuples (vtkIdList *tupleIds, vtkAbstractArray *output) override
 Given a list of tuple ids, return an array of tuples. More...
 
void GetTuples (vtkIdType p1, vtkIdType p2, vtkAbstractArray *output) override
 Get the tuples for the range of tuple ids specified (i.e., p1->p2 inclusive). More...
 
void InterpolateTuple (vtkIdType dstTupleIdx, vtkIdList *ptIndices, vtkAbstractArray *source, double *weights) override
 Set the tuple at dstTupleIdx in this array to the interpolated tuple value, given the ptIndices in the source array and associated interpolation weights. More...
 
void InterpolateTuple (vtkIdType dstTupleIdx, vtkIdType srcTupleIdx1, vtkAbstractArray *source1, vtkIdType srcTupleIdx2, vtkAbstractArray *source2, double t) override
 Insert the tuple at dstTupleIdx in this array to the tuple interpolated from the two tuple indices, srcTupleIdx1 and srcTupleIdx2, and an interpolation factor, t. More...
 
virtual double GetComponent (vtkIdType tupleIdx, int compIdx)
 Return the data component at the location specified by tupleIdx and compIdx. More...
 
virtual void GetData (vtkIdType tupleMin, vtkIdType tupleMax, int compMin, int compMax, vtkDoubleArray *data)
 Get the data as a double array in the range (tupleMin,tupleMax) and (compMin, compMax). More...
 
virtual void ShallowCopy (vtkDataArray *other)
 Create a shallow copy of other into this, if possible. More...
 
virtual void FillComponent (int compIdx, double value)
 Fill a component of a data array with a specified value. More...
 
virtual void Fill (double value)
 Fill all values of a data array with a specified value. More...
 
virtual void CopyComponent (int dstComponent, vtkDataArray *src, int srcComponent)
 Copy a component from one data array into a component on this data array. More...
 
unsigned long GetActualMemorySize () const override
 Return the memory in kibibytes (1024 bytes) consumed by this data array. More...
 
void CreateDefaultLookupTable ()
 Create default lookup table. More...
 
double * GetRange ()
 Return the range of the data array. More...
 
void GetRange (double range[2])
 The range of the data array values will be returned in the provided range array argument. More...
 
double * GetFiniteRange ()
 Return the range of the data array. More...
 
void GetFiniteRange (double range[2])
 The range of the data array values will be returned in the provided range array argument. More...
 
virtual double GetMaxNorm ()
 Return the maximum norm for the tuples. More...
 
void Modified () override
 Removes out-of-date L2_NORM_RANGE() and L2_NORM_FINITE_RANGE() values. More...
 
int CopyInformation (vtkInformation *infoFrom, vtkTypeBool deep=1) override
 Copy information instance. More...
 
int GetArrayType () const override
 Method for type-checking in FastDownCast implementations. More...
 
void InsertTuple (vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source) override
 See documentation from parent class. More...
 
vtkIdType InsertNextTuple (vtkIdType srcTupleIdx, vtkAbstractArray *source) override
 See documentation from parent class. More...
 
void InsertTuples (vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source) override
 See documentation from parent class. More...
 
void InsertTuples (vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray *source) override
 See documentation from parent class. More...
 
void InsertTuplesStartingAt (vtkIdType dstStart, vtkIdList *srcIds, vtkAbstractArray *source) override
 See documentation from parent class. More...
 
void SetTuple (vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source) override
 See documentation from parent class. More...
 
double GetTuple1 (vtkIdType tupleIdx)
 These methods are included as convenience for the wrappers. More...
 
double * GetTuple2 (vtkIdType tupleIdx)
 These methods are included as convenience for the wrappers. More...
 
double * GetTuple3 (vtkIdType tupleIdx)
 These methods are included as convenience for the wrappers. More...
 
double * GetTuple4 (vtkIdType tupleIdx)
 These methods are included as convenience for the wrappers. More...
 
double * GetTuple6 (vtkIdType tupleIdx)
 These methods are included as convenience for the wrappers. More...
 
double * GetTuple9 (vtkIdType tupleIdx)
 These methods are included as convenience for the wrappers. More...
 
void SetTuple1 (vtkIdType tupleIdx, double value)
 These methods are included as convenience for the wrappers. More...
 
void SetTuple2 (vtkIdType tupleIdx, double val0, double val1)
 These methods are included as convenience for the wrappers. More...
 
void SetTuple3 (vtkIdType tupleIdx, double val0, double val1, double val2)
 These methods are included as convenience for the wrappers. More...
 
void SetTuple4 (vtkIdType tupleIdx, double val0, double val1, double val2, double val3)
 These methods are included as convenience for the wrappers. More...
 
void SetTuple6 (vtkIdType tupleIdx, double val0, double val1, double val2, double val3, double val4, double val5)
 These methods are included as convenience for the wrappers. More...
 
void SetTuple9 (vtkIdType tupleIdx, double val0, double val1, double val2, double val3, double val4, double val5, double val6, double val7, double val8)
 These methods are included as convenience for the wrappers. More...
 
void InsertTuple1 (vtkIdType tupleIdx, double value)
 These methods are included as convenience for the wrappers. More...
 
void InsertTuple2 (vtkIdType tupleIdx, double val0, double val1)
 These methods are included as convenience for the wrappers. More...
 
void InsertTuple3 (vtkIdType tupleIdx, double val0, double val1, double val2)
 These methods are included as convenience for the wrappers. More...
 
void InsertTuple4 (vtkIdType tupleIdx, double val0, double val1, double val2, double val3)
 These methods are included as convenience for the wrappers. More...
 
void InsertTuple6 (vtkIdType tupleIdx, double val0, double val1, double val2, double val3, double val4, double val5)
 These methods are included as convenience for the wrappers. More...
 
void InsertTuple9 (vtkIdType tupleIdx, double val0, double val1, double val2, double val3, double val4, double val5, double val6, double val7, double val8)
 These methods are included as convenience for the wrappers. More...
 
void InsertNextTuple1 (double value)
 These methods are included as convenience for the wrappers. More...
 
void InsertNextTuple2 (double val0, double val1)
 These methods are included as convenience for the wrappers. More...
 
void InsertNextTuple3 (double val0, double val1, double val2)
 These methods are included as convenience for the wrappers. More...
 
void InsertNextTuple4 (double val0, double val1, double val2, double val3)
 These methods are included as convenience for the wrappers. More...
 
void InsertNextTuple6 (double val0, double val1, double val2, double val3, double val4, double val5)
 These methods are included as convenience for the wrappers. More...
 
void InsertNextTuple9 (double val0, double val1, double val2, double val3, double val4, double val5, double val6, double val7, double val8)
 These methods are included as convenience for the wrappers. More...
 
void DeepCopy (vtkAbstractArray *aa) override
 Deep copy of data. More...
 
void SetLookupTable (vtkLookupTable *lut)
 Set/get the lookup table associated with this scalar data, if any. More...
 
virtual vtkLookupTableGetLookupTable ()
 Set/get the lookup table associated with this scalar data, if any. More...
 
void GetRange (double range[2], int comp)
 The range of the data array values for the given component will be returned in the provided range array argument. More...
 
void GetRange (double range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip)
 The range of the data array values for the given component will be returned in the provided range array argument. More...
 
double * GetRange (int comp)
 Return the range of the data array values for the given component. More...
 
void GetFiniteRange (double range[2], int comp)
 The range of the data array values for the given component will be returned in the provided range array argument. More...
 
void GetFiniteRange (double range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip)
 The range of the data array values for the given component will be returned in the provided range array argument. More...
 
double * GetFiniteRange (int comp)
 Return the range of the data array values for the given component. More...
 
void GetDataTypeRange (double range[2])
 These methods return the Min and Max possible range of the native data type. More...
 
double GetDataTypeMin ()
 These methods return the Min and Max possible range of the native data type. More...
 
double GetDataTypeMax ()
 These methods return the Min and Max possible range of the native data type. More...
 
- Public Member Functions inherited from vtkAbstractArray
vtkAbstractArrayNewInstance () const
 
void SetComponentName (vtkIdType component, const char *name)
 Set the name for a component. More...
 
const char * GetComponentName (vtkIdType component) const
 Get the component name for a given component. More...
 
bool HasAComponentName () const
 Returns if any component has had a name assigned. More...
 
int CopyComponentNames (vtkAbstractArray *da)
 Copies the component names from the inputted array to the current array make sure that the current array has the same number of components as the input array. More...
 
vtkIdType GetNumberOfTuples () const
 Get the number of complete tuples (a component group) in the array. More...
 
vtkIdType GetNumberOfValues () const
 Get the total number of values in the array. More...
 
virtual bool HasStandardMemoryLayout () const
 Returns true if this array uses the standard memory layout defined in the VTK user guide, e.g. More...
 
vtkIdType GetSize () const
 Return the size of the data. More...
 
vtkIdType GetMaxId () const
 What is the maximum id currently in the array. More...
 
virtual void ExportToVoidPointer (void *out_ptr)
 This method copies the array data to the void pointer specified by the user. More...
 
virtual const char * GetDataTypeAsString () const
 Get the name of a data type as a string. More...
 
virtual bool IsIntegral () const
 This method will return true if and only if an array contains integer-valued data. More...
 
virtual vtkIdType GetDataSize () const
 Returns the size of the data in DataTypeSize units. More...
 
virtual vtkVariant GetVariantValue (vtkIdType valueIdx)
 Retrieve value from the array as a variant. More...
 
virtual void GetProminentComponentValues (int comp, vtkVariantArray *values, double uncertainty=1.e-6, double minimumProminence=1.e-3)
 Populate the given vtkVariantArray with a set of distinct values taken on by the requested component (or, when passed -1, by the tuples as a whole). More...
 
vtkInformationGetInformation ()
 Get an information object that can be used to annotate the array. More...
 
bool HasInformation () const
 Inquire if this array has an instance of vtkInformation already associated with it. More...
 
const char * GetArrayTypeAsString () const
 Get the name for the array type as string. More...
 
virtual void SetNumberOfComponents (int)
 Set/Get the dimension (n) of the components. More...
 
int GetNumberOfComponents () const
 Set/Get the dimension (n) of the components. More...
 
void Reset ()
 Reset to an empty state, without freeing any memory. More...
 
virtual void SetVoidArray (void *vtkNotUsed(array), vtkIdType vtkNotUsed(size), int vtkNotUsed(save))=0
 This method lets the user specify data to be held by the array. More...
 
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. More...
 
virtual void SetName (const char *)
 Set/get array's name. More...
 
virtual char * GetName ()
 Set/get array's name. More...
 
virtual unsigned int GetMaxDiscreteValues ()
 Get/Set the maximum number of prominent values this array may contain before it is considered continuous. More...
 
virtual void SetMaxDiscreteValues (unsigned int)
 Get/Set the maximum number of prominent values this array may contain before it is considered continuous. More...
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 Turn debugging output on. More...
 
virtual void DebugOff ()
 Turn debugging output off. More...
 
bool GetDebug ()
 Get the value of the debug flag. More...
 
void SetDebug (bool debugFlag)
 Set the value of the debug flag. More...
 
virtual vtkMTimeType GetMTime ()
 Return this object's modified time. More...
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
vtkTypeBool HasObserver (unsigned long event)
 
vtkTypeBool HasObserver (const char *event)
 
vtkTypeBool InvokeEvent (unsigned long event)
 
vtkTypeBool InvokeEvent (const char *event)
 
std::string GetObjectDescription () const override
 The object description printed in messages and PrintSelf output. More...
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkCommandGetCommand (unsigned long tag)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObserver (vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkTypeBool HasObserver (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Allow user to set the AbortFlagOn() with the return value of the callback method. More...
 
vtkTypeBool InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
vtkTypeBool InvokeEvent (const char *event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
virtual void SetObjectName (const std::string &objectName)
 Set/get the name of this object for reporting purposes. More...
 
virtual std::string GetObjectName () const
 Set/get the name of this object for reporting purposes. More...
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string. More...
 
virtual vtkIdType GetNumberOfGenerationsFromBase (const char *name)
 Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). More...
 
virtual void Delete ()
 Delete a VTK object. More...
 
virtual void FastDelete ()
 Delete a reference to this object. More...
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream. More...
 
void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object). More...
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object). More...
 
int GetReferenceCount ()
 Return the current reference count of this object. More...
 
void SetReferenceCount (int)
 Sets the reference count. More...
 
bool GetIsInMemkind () const
 A local state flag that remembers whether this object lives in the normal or extended memory space. More...
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual bool UsesGarbageCollector () const
 Indicate whether the class uses vtkGarbageCollector or not. More...
 

Static Public Member Functions

static vtkBitArrayNew ()
 
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkBitArraySafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkDataArray
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkDataArraySafeDownCast (vtkObjectBase *o)
 
static vtkDataArrayFastDownCast (vtkAbstractArray *source)
 Perform a fast, safe cast from a vtkAbstractArray to a vtkDataArray. More...
 
static vtkDataArrayCreateDataArray (int dataType)
 Creates an array for dataType where dataType is one of VTK_BIT, VTK_CHAR, VTK_SIGNED_CHAR, VTK_UNSIGNED_CHAR, VTK_SHORT, VTK_UNSIGNED_SHORT, VTK_INT, VTK_UNSIGNED_INT, VTK_LONG, VTK_UNSIGNED_LONG, VTK_FLOAT, VTK_DOUBLE, VTK_ID_TYPE. More...
 
static vtkInformationDoubleVectorKeyCOMPONENT_RANGE ()
 This key is used to hold tight bounds on the range of one component over all tuples of the array. More...
 
static vtkInformationDoubleVectorKeyL2_NORM_RANGE ()
 This key is used to hold tight bounds on the $L_2$ norm of tuples in the array. More...
 
static vtkInformationDoubleVectorKeyL2_NORM_FINITE_RANGE ()
 This key is used to hold tight bounds on the $L_2$ norm of tuples in the array. More...
 
static vtkInformationStringKeyUNITS_LABEL ()
 A human-readable string indicating the units for the array data. More...
 
static void GetDataTypeRange (int type, double range[2])
 These methods return the Min and Max possible range of the native data type. More...
 
static double GetDataTypeMin (int type)
 These methods return the Min and Max possible range of the native data type. More...
 
static double GetDataTypeMax (int type)
 These methods return the Min and Max possible range of the native data type. More...
 
- Static Public Member Functions inherited from vtkAbstractArray
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkAbstractArraySafeDownCast (vtkObjectBase *o)
 
static vtkAbstractArrayCreateArray (int dataType)
 Creates an array for dataType where dataType is one of VTK_BIT, VTK_CHAR, VTK_UNSIGNED_CHAR, VTK_SHORT, VTK_UNSIGNED_SHORT, VTK_INT, VTK_UNSIGNED_INT, VTK_LONG, VTK_UNSIGNED_LONG, VTK_FLOAT, VTK_DOUBLE, VTK_ID_TYPE, VTK_STRING. More...
 
static vtkInformationIntegerKeyGUI_HIDE ()
 This key is a hint to end user interface that this array is internal and should not be shown to the end user. More...
 
static vtkInformationInformationVectorKeyPER_COMPONENT ()
 This key is used to hold a vector of COMPONENT_VALUES (and, for vtkDataArray subclasses, COMPONENT_RANGE) keys – one for each component of the array. More...
 
static vtkInformationInformationVectorKeyPER_FINITE_COMPONENT ()
 This key is used to hold a vector of COMPONENT_VALUES (and, for vtkDataArray subclasses, COMPONENT_RANGE) keys – one for each component of the array. More...
 
static vtkInformationVariantVectorKeyDISCRETE_VALUES ()
 A key used to hold discrete values taken on either by the tuples of the array (when present in this->GetInformation()) or individual components (when present in one entry of the PER_COMPONENT() information vector). More...
 
static vtkInformationDoubleVectorKeyDISCRETE_VALUE_SAMPLE_PARAMETERS ()
 A key used to hold conditions under which cached discrete values were generated; the value is a 2-vector of doubles. More...
 
static int GetDataTypeSize (int type)
 Return the size of the underlying data type. More...
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes. More...
 
static void SetGlobalWarningDisplay (vtkTypeBool val)
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOn ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOff ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static vtkTypeBool GetGlobalWarningDisplay ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class. More...
 
static vtkIdType GetNumberOfGenerationsFromBaseType (const char *name)
 Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). More...
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 
static void SetMemkindDirectory (const char *directoryname)
 The name of a directory, ideally mounted -o dax, to memory map an extended memory space within. More...
 
static bool GetUsingMemkind ()
 A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space. More...
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkBitArray ()
 
 ~vtkBitArray () override
 
virtual void InitializeUnusedBitsInLastByte ()
 This method should be called whenever MaxId needs to be changed, as this method fills the unused bits of the last byte to zero. More...
 
unsigned char * ResizeAndExtend (vtkIdType sz)
 
- Protected Member Functions inherited from vtkDataArray
 vtkDataArray ()
 
 ~vtkDataArray () override
 
virtual void ComputeRange (double range[2], int comp)
 Compute the range for a specific component. More...
 
virtual void ComputeRange (double range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Compute the range for a specific component. More...
 
virtual void ComputeFiniteRange (double range[2], int comp)
 Compute the range for a specific component. More...
 
virtual void ComputeFiniteRange (double range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Compute the range for a specific component. More...
 
virtual bool ComputeScalarRange (double *ranges)
 Computes the range for each component of an array, the length of ranges must be two times the number of components. More...
 
virtual bool ComputeScalarRange (double *ranges, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Computes the range for each component of an array, the length of ranges must be two times the number of components. More...
 
virtual bool ComputeVectorRange (double range[2])
 Returns true if the range was computed. More...
 
virtual bool ComputeVectorRange (double range[2], const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Returns true if the range was computed. More...
 
virtual bool ComputeFiniteScalarRange (double *ranges)
 Computes the range for each component of an array, the length of ranges must be two times the number of components. More...
 
virtual bool ComputeFiniteScalarRange (double *ranges, const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Computes the range for each component of an array, the length of ranges must be two times the number of components. More...
 
virtual bool ComputeFiniteVectorRange (double range[2])
 Returns true if the range was computed. More...
 
virtual bool ComputeFiniteVectorRange (double range[2], const unsigned char *ghosts, unsigned char ghostsToSkip=0xff)
 Returns true if the range was computed. More...
 
- Protected Member Functions inherited from vtkAbstractArray
 vtkAbstractArray ()
 
 ~vtkAbstractArray () override
 
virtual void SetInformation (vtkInformation *)
 Set an information object that can be used to annotate the array. More...
 
virtual void UpdateDiscreteValueSet (double uncertainty, double minProminence)
 Obtain the set of unique values taken on by each component of the array, as well as by the tuples of the array. More...
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
 ~vtkObject () override
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
 These methods allow a command to exclusively grab all events. More...
 
void InternalReleaseFocus ()
 These methods allow a command to exclusively grab all events. More...
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

unsigned char * Array
 
int TupleSize
 
double * Tuple
 
void(* DeleteFunction )(void *)
 
- Protected Attributes inherited from vtkDataArray
vtkLookupTableLookupTable
 
double Range [2]
 
double FiniteRange [2]
 
- Protected Attributes inherited from vtkAbstractArray
vtkIdType Size
 
vtkIdType MaxId
 
int NumberOfComponents
 
unsigned int MaxDiscreteValues
 
char * Name
 
bool RebuildArray
 
vtkInformationInformation
 
vtkInternalComponentNames * ComponentNames
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
std::string ObjectName
 
- Protected Attributes inherited from vtkObjectBase
std::atomic< int32_t > ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Additional Inherited Members

- Static Protected Member Functions inherited from vtkObjectBase
static vtkMallocingFunction GetCurrentMallocFunction ()
 
static vtkReallocingFunction GetCurrentReallocFunction ()
 
static vtkFreeingFunction GetCurrentFreeFunction ()
 
static vtkFreeingFunction GetAlternateFreeFunction ()
 

Detailed Description

dynamic, self-adjusting array of bits

vtkBitArray is an array of bits (0/1 data value). The array is packed so that each byte stores eight bits. vtkBitArray provides methods for insertion and retrieval of bits, and will automatically resize itself to hold new data.

WARNING This class is not thread-safe during write access

Tests:
vtkBitArray (Tests)

Definition at line 28 of file vtkBitArray.h.

Member Typedef Documentation

◆ Superclass

Definition at line 40 of file vtkBitArray.h.

Member Enumeration Documentation

◆ DeleteMethod

Enumerator
VTK_DATA_ARRAY_FREE 
VTK_DATA_ARRAY_DELETE 
VTK_DATA_ARRAY_ALIGNED_FREE 
VTK_DATA_ARRAY_USER_DEFINED 

Definition at line 31 of file vtkBitArray.h.

Constructor & Destructor Documentation

◆ vtkBitArray()

vtkBitArray::vtkBitArray ( )
protected

◆ ~vtkBitArray()

vtkBitArray::~vtkBitArray ( )
overrideprotected

Member Function Documentation

◆ New()

static vtkBitArray* vtkBitArray::New ( )
static

◆ IsTypeOf()

static vtkTypeBool vtkBitArray::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual vtkTypeBool vtkBitArray::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class.

Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkDataArray.

◆ SafeDownCast()

static vtkBitArray* vtkBitArray::SafeDownCast ( vtkObjectBase o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase* vtkBitArray::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkDataArray.

◆ NewInstance()

vtkBitArray* vtkBitArray::NewInstance ( ) const

◆ PrintSelf()

void vtkBitArray::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

Methods invoked by print to print information about the object including superclasses.

Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkAbstractArray.

◆ Allocate()

vtkTypeBool vtkBitArray::Allocate ( vtkIdType  sz,
vtkIdType  ext = 1000 
)
overridevirtual

Allocate memory for this array.

Delete old storage only if necessary. Note that ext is no longer used.

Implements vtkAbstractArray.

◆ Initialize()

void vtkBitArray::Initialize ( )
overridevirtual

Release storage and reset array to initial state.

Implements vtkAbstractArray.

◆ GetDataType()

int vtkBitArray::GetDataType ( ) const
inlineoverridevirtual

Return the underlying data type.

An integer indicating data type is returned as specified in vtkType.h.

Implements vtkAbstractArray.

Definition at line 55 of file vtkBitArray.h.

◆ GetDataTypeSize()

int vtkBitArray::GetDataTypeSize ( ) const
inlineoverridevirtual

Return the size of the underlying data type.

For a bit, 0 is returned. For string 0 is returned. Arrays with variable length components return 0.

Implements vtkAbstractArray.

Definition at line 56 of file vtkBitArray.h.

◆ SetNumberOfTuples()

void vtkBitArray::SetNumberOfTuples ( vtkIdType  number)
overridevirtual

Set the number of n-tuples in the array.

Implements vtkAbstractArray.

◆ SetNumberOfValues()

bool vtkBitArray::SetNumberOfValues ( vtkIdType  number)
overridevirtual

In addition to setting the number of values, this method also sets the unused bits of the last byte of the array.

Reimplemented from vtkAbstractArray.

◆ SetTuple() [1/3]

void vtkBitArray::SetTuple ( vtkIdType  i,
vtkIdType  j,
vtkAbstractArray source 
)
overridevirtual

Set the tuple at the ith location using the jth tuple in the source array.

This method assumes that the two arrays have the same type and structure. Note that range checking and memory allocation is not performed; use in conjunction with SetNumberOfTuples() to allocate space.

NOT THREAD-SAFE

Implements vtkAbstractArray.

◆ InsertTuple() [1/3]

void vtkBitArray::InsertTuple ( vtkIdType  i,
vtkIdType  j,
vtkAbstractArray source 
)
overridevirtual

Insert the jth tuple in the source array, at ith location in this array.

Note that memory allocation is performed as necessary to hold the data.

NOT THREAD-SAFE

Implements vtkAbstractArray.

◆ InsertTuples() [1/2]

void vtkBitArray::InsertTuples ( vtkIdList dstIds,
vtkIdList srcIds,
vtkAbstractArray source 
)
overridevirtual

Copy the tuples indexed in srcIds from the source array to the tuple locations indexed by dstIds in this array.

Note that memory allocation is performed as necessary to hold the data.

NOT THREAD-SAFE

Implements vtkAbstractArray.

◆ InsertTuplesStartingAt()

void vtkBitArray::InsertTuplesStartingAt ( vtkIdType  dstStart,
vtkIdList srcIds,
vtkAbstractArray source 
)
overridevirtual

Copy the tuples indexed in srcIds from the source array to the tuple locations starting at index dstStart.

Note that memory allocation is performed as necessary to hold the data.

NOT THREAD-SAFE

Implements vtkAbstractArray.

◆ InsertTuples() [2/2]

void vtkBitArray::InsertTuples ( vtkIdType  dstStart,
vtkIdType  n,
vtkIdType  srcStart,
vtkAbstractArray source 
)
overridevirtual

Copy n consecutive tuples starting at srcStart from the source array to this array, starting at the dstStart location.

Note that memory allocation is performed as necessary to hold the data.

NOT THREAD-SAFE

Implements vtkAbstractArray.

◆ InsertNextTuple() [1/3]

vtkIdType vtkBitArray::InsertNextTuple ( vtkIdType  j,
vtkAbstractArray source 
)
overridevirtual

Insert the jth tuple in the source array, at the end in this array.

Note that memory allocation is performed as necessary to hold the data. Returns the location at which the data was inserted.

NOT THREAD-SAFE

Implements vtkAbstractArray.

◆ GetTuple() [1/2]

double* vtkBitArray::GetTuple ( vtkIdType  i)
overridevirtual

Get a pointer to a tuple at the ith location.

This is a dangerous method (it is not thread safe since a pointer is returned).

Implements vtkDataArray.

◆ GetTuple() [2/2]

void vtkBitArray::GetTuple ( vtkIdType  i,
double *  tuple 
)
overridevirtual

Copy the tuple value into a user-provided array.

Implements vtkDataArray.

◆ SetTuple() [2/3]

void vtkBitArray::SetTuple ( vtkIdType  i,
const float *  tuple 
)
overridevirtual

Set the tuple value at the ith location in the array.

NOT THREAD-SAFE

Reimplemented from vtkDataArray.

◆ SetTuple() [3/3]

void vtkBitArray::SetTuple ( vtkIdType  i,
const double *  tuple 
)
overridevirtual

Set the tuple value at the ith location in the array.

NOT THREAD-SAFE

Reimplemented from vtkDataArray.

◆ InsertTuple() [2/3]

void vtkBitArray::InsertTuple ( vtkIdType  i,
const float *  tuple 
)
overridevirtual

Insert (memory allocation performed) the tuple into the ith location in the array.

NOT THREAD-SAFE

Implements vtkDataArray.

◆ InsertTuple() [3/3]

void vtkBitArray::InsertTuple ( vtkIdType  i,
const double *  tuple 
)
overridevirtual

Insert (memory allocation performed) the tuple into the ith location in the array.

NOT THREAD-SAFE

Implements vtkDataArray.

◆ InsertNextTuple() [2/3]

vtkIdType vtkBitArray::InsertNextTuple ( const float *  tuple)
overridevirtual

Insert (memory allocation performed) the tuple onto the end of the array.

NOT THREAD-SAFE

Implements vtkDataArray.

◆ InsertNextTuple() [3/3]

vtkIdType vtkBitArray::InsertNextTuple ( const double *  tuple)
overridevirtual

Insert (memory allocation performed) the tuple onto the end of the array.

NOT THREAD-SAFE

Implements vtkDataArray.

◆ RemoveTuple()

void vtkBitArray::RemoveTuple ( vtkIdType  id)
overridevirtual

These methods remove tuples from the data array.

They shift data and resize array, so the data array is still valid after this operation. Note, this operation is fairly slow.

NOT THREAD-SAFE

Implements vtkDataArray.

◆ RemoveFirstTuple()

void vtkBitArray::RemoveFirstTuple ( )
overridevirtual

These methods remove tuples from the data array.

They shift data and resize array, so the data array is still valid after this operation. Note, this operation is fairly slow.

NOT THREAD-SAFE

Reimplemented from vtkDataArray.

◆ RemoveLastTuple()

void vtkBitArray::RemoveLastTuple ( )
overridevirtual

These methods remove tuples from the data array.

They shift data and resize array, so the data array is still valid after this operation. Note, this operation is fairly slow.

NOT THREAD-SAFE

Reimplemented from vtkDataArray.

◆ SetComponent()

void vtkBitArray::SetComponent ( vtkIdType  i,
int  j,
double  c 
)
overridevirtual

Set the data component at the ith tuple and jth component location.

Note that i is less then NumberOfTuples and j is less then NumberOfComponents. Make sure enough memory has been allocated (use SetNumberOfTuples() and SetNumberOfComponents()).

NOT THREAD-SAFE

Reimplemented from vtkDataArray.

◆ Squeeze()

void vtkBitArray::Squeeze ( )
inlineoverridevirtual

Free any unneeded memory.

Implements vtkAbstractArray.

Definition at line 417 of file vtkBitArray.h.

◆ Resize()

vtkTypeBool vtkBitArray::Resize ( vtkIdType  numTuples)
overridevirtual

Resize the array while conserving the data.

Implements vtkAbstractArray.

◆ GetValue()

int vtkBitArray::GetValue ( vtkIdType  id) const

Get the data at a particular index.

◆ SetValue()

void vtkBitArray::SetValue ( vtkIdType  id,
int  value 
)
inline

Set the data at a particular index.

Does not do range checking. Make sure you use the method SetNumberOfValues() before inserting data.

NOT THREAD-SAFE

Definition at line 372 of file vtkBitArray.h.

◆ InsertValue()

void vtkBitArray::InsertValue ( vtkIdType  id,
int  i 
)
inline

Inserts values and checks to make sure there is enough memory.

NOT THREAD-SAFE

Definition at line 380 of file vtkBitArray.h.

◆ SetVariantValue()

void vtkBitArray::SetVariantValue ( vtkIdType  idx,
vtkVariant  value 
)
inlineoverridevirtual

Set a value in the array from a variant.

NOT THREAD-SAFE

Implements vtkAbstractArray.

Definition at line 400 of file vtkBitArray.h.

◆ InsertVariantValue()

void vtkBitArray::InsertVariantValue ( vtkIdType  idx,
vtkVariant  value 
)
inlineoverridevirtual

Inserts values from a variant and checks to ensure there is enough memory.

NOT THREAD-SAFE

Implements vtkAbstractArray.

Definition at line 405 of file vtkBitArray.h.

◆ InsertNextValue()

vtkIdType vtkBitArray::InsertNextValue ( int  i)
inline

Definition at line 410 of file vtkBitArray.h.

◆ InsertComponent()

void vtkBitArray::InsertComponent ( vtkIdType  i,
int  j,
double  c 
)
overridevirtual

Insert the data component at ith tuple and jth component location.

Note that memory allocation is performed as necessary to hold the data.

NOT THREAD-SAFE

Reimplemented from vtkDataArray.

◆ GetPointer()

unsigned char* vtkBitArray::GetPointer ( vtkIdType  id)
inline

Direct manipulation of the underlying data.

Definition at line 247 of file vtkBitArray.h.

◆ WritePointer()

unsigned char* vtkBitArray::WritePointer ( vtkIdType  id,
vtkIdType  number 
)

Get the address of a particular data index.

Make sure data is allocated for the number of items requested. Set MaxId according to the number of data values requested.

◆ WriteVoidPointer()

void* vtkBitArray::WriteVoidPointer ( vtkIdType  valueIdx,
vtkIdType  numValues 
)
inlineoverridevirtual

Get the address of a particular data index.

Make sure data is allocated for the number of items requested. If needed, increase MaxId to mark any new value ranges as in-use.

Implements vtkDataArray.

Definition at line 256 of file vtkBitArray.h.

◆ GetVoidPointer()

void* vtkBitArray::GetVoidPointer ( vtkIdType  valueIdx)
inlineoverridevirtual

Return a void pointer.

For image pipeline interface and other special pointer manipulation. Use of this method is discouraged, as newer arrays require a deep-copy of the array data in order to return a suitable pointer. See vtkArrayDispatch for a safer alternative for fast data access.

Implements vtkAbstractArray.

Definition at line 261 of file vtkBitArray.h.

◆ DeepCopy() [1/2]

void vtkBitArray::DeepCopy ( vtkDataArray da)
overridevirtual

Deep copy of another bit array.

Reimplemented from vtkDataArray.

◆ DeepCopy() [2/2]

void vtkBitArray::DeepCopy ( vtkAbstractArray da)
inlineoverridevirtual

Deep copy of data.

Implementation left to subclasses, which should support as many type conversions as possible given the data type.

Subclasses should call vtkAbstractArray::DeepCopy() so that the information object (if one exists) is copied from da.

Reimplemented from vtkAbstractArray.

Definition at line 267 of file vtkBitArray.h.

◆ SetArray()

void vtkBitArray::SetArray ( unsigned char *  array,
vtkIdType  size,
int  save,
int  deleteMethod = VTK_DATA_ARRAY_DELETE 
)

This method lets the user specify data to be held by the array.

The array argument is a pointer to the data. size is the size of the array supplied by the user. Set save to 1 to keep the class from deleting the array when it cleans up or reallocates memory. The class uses the actual array provided; it does not copy the data from the supplied array. If the delete method is VTK_DATA_ARRAY_USER_DEFINED a custom free function can be assigned to be called using SetArrayFreeFunction, if no custom function is assigned we will default to delete[].

◆ SetVoidArray() [1/2]

void vtkBitArray::SetVoidArray ( void *  array,
vtkIdType  size,
int  save 
)
inlineoverride

This method lets the user specify data to be held by the array.

The array argument is a pointer to the data. size is the size of the array supplied by the user. Set save to 1 to keep the class from deleting the array when it cleans up or reallocates memory. The class uses the actual array provided; it does not copy the data from the supplied array. If the delete method is VTK_DATA_ARRAY_USER_DEFINED a custom free function can be assigned to be called using SetArrayFreeFunction, if no custom function is assigned we will default to delete[].

Definition at line 285 of file vtkBitArray.h.

◆ SetVoidArray() [2/2]

void vtkBitArray::SetVoidArray ( void *  array,
vtkIdType  size,
int  save,
int  deleteMethod 
)
inlineoverride

This method lets the user specify data to be held by the array.

The array argument is a pointer to the data. size is the size of the array supplied by the user. Set save to 1 to keep the class from deleting the array when it cleans up or reallocates memory. The class uses the actual array provided; it does not copy the data from the supplied array. If the delete method is VTK_DATA_ARRAY_USER_DEFINED a custom free function can be assigned to be called using SetArrayFreeFunction, if no custom function is assigned we will default to delete[].

Definition at line 289 of file vtkBitArray.h.

◆ SetArrayFreeFunction()

void vtkBitArray::SetArrayFreeFunction ( void(*)(void *)  callback)
overridevirtual

This method allows the user to specify a custom free function to be called when the array is deallocated.

Calling this method will implicitly mean that the given free function will be called when the class cleans up or reallocates memory.

Implements vtkAbstractArray.

◆ NewIterator()

vtkArrayIterator* vtkBitArray::NewIterator ( )
overridevirtual

Returns a new vtkBitArrayIterator instance.

Implements vtkAbstractArray.

◆ LookupValue() [1/4]

vtkIdType vtkBitArray::LookupValue ( vtkVariant  value)
overridevirtual

Return the indices where a specific value appears.

Implements vtkAbstractArray.

◆ LookupValue() [2/4]

void vtkBitArray::LookupValue ( vtkVariant  value,
vtkIdList ids 
)
overridevirtual

Return the indices where a specific value appears.

Implements vtkAbstractArray.

◆ LookupValue() [3/4]

vtkIdType vtkBitArray::LookupValue ( int  value)

Return the indices where a specific value appears.

◆ LookupValue() [4/4]

void vtkBitArray::LookupValue ( int  value,
vtkIdList ids 
)

Return the indices where a specific value appears.

◆ DataChanged()

void vtkBitArray::DataChanged ( )
overridevirtual

Tell the array explicitly that the data has changed.

This is only necessary to call when you modify the array contents without using the array's API (i.e. you retrieve a pointer to the data and modify the array contents). You need to call this so that the fast lookup will know to rebuild itself. Otherwise, the lookup functions will give incorrect results.

Implements vtkAbstractArray.

◆ ClearLookup()

void vtkBitArray::ClearLookup ( )
overridevirtual

Delete the associated fast lookup data structure on this array, if it exists.

The lookup will be rebuilt on the next call to a lookup function.

Implements vtkAbstractArray.

◆ InitializeUnusedBitsInLastByte()

virtual void vtkBitArray::InitializeUnusedBitsInLastByte ( )
protectedvirtual

This method should be called whenever MaxId needs to be changed, as this method fills the unused bits of the last byte to zero.

If those bits are kept uninitialized, one can trigger errors when reading the last byte.

Note
This method can be called with this->MaxId < 0. In this instance, nothing happens.
Warning
The buffer this->Array needs to already be allocated prior to calling this method.

◆ ResizeAndExtend()

unsigned char* vtkBitArray::ResizeAndExtend ( vtkIdType  sz)
protected

Member Data Documentation

◆ Array

unsigned char* vtkBitArray::Array
protected

Definition at line 352 of file vtkBitArray.h.

◆ TupleSize

int vtkBitArray::TupleSize
protected

Definition at line 356 of file vtkBitArray.h.

◆ Tuple

double* vtkBitArray::Tuple
protected

Definition at line 357 of file vtkBitArray.h.

◆ DeleteFunction

void(* vtkBitArray::DeleteFunction) (void *)
protected

Definition at line 359 of file vtkBitArray.h.


The documentation for this class was generated from the following file: