ladybug_vtk.polydata module

A VTK Polydata object with additional methods.

class ladybug_vtk.polydata.PolyData[source]

Bases: vtkPolyData

A thin wrapper around vtk.vtkPolyData.

See here for more information: https://vtk.org/doc/nightly/html/classvtkPolyData.html#details

A PolyData object holds the geometry information in addition to several layers of data. All these data are aligned with the geometry. For instance, you can use a PolyData to represent a sensor grid and then add data for irradiance and daylight factor values to it.

A PolyData can be exported to a VTK object directly but in most cases you should use the DisplayPolyData object to group the PolyData and set their display attributes.

class AttributeTypes

Bases: int

as_integer_ratio()

Return a pair of integers, whose ratio is equal to the original int.

The ratio is in lowest terms and has a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)
bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3
bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6
conjugate()

Returns self, the complex conjugate of any int.

from_bytes(byteorder='big', *, signed=False)

Return the integer represented by the given array of bytes.

bytes

Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.

signed

Indicates whether two’s complement is used to represent the integer.

is_integer()

Returns True. Exists for duck type compatibility with float.is_integer.

to_bytes(length=1, byteorder='big', *, signed=False)

Return an array of bytes representing an integer.

length

Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. Default is length 1.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.

signed

Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.

denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

class FieldAssociations

Bases: int

as_integer_ratio()

Return a pair of integers, whose ratio is equal to the original int.

The ratio is in lowest terms and has a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)
bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3
bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6
conjugate()

Returns self, the complex conjugate of any int.

from_bytes(byteorder='big', *, signed=False)

Return the integer represented by the given array of bytes.

bytes

Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.

signed

Indicates whether two’s complement is used to represent the integer.

is_integer()

Returns True. Exists for duck type compatibility with float.is_integer.

to_bytes(length=1, byteorder='big', *, signed=False)

Return an array of bytes representing an integer.

length

Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. Default is length 1.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.

signed

Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.

denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

class FieldDataType

Bases: int

as_integer_ratio()

Return a pair of integers, whose ratio is equal to the original int.

The ratio is in lowest terms and has a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)
bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3
bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6
conjugate()

Returns self, the complex conjugate of any int.

from_bytes(byteorder='big', *, signed=False)

Return the integer represented by the given array of bytes.

bytes

Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.

signed

Indicates whether two’s complement is used to represent the integer.

is_integer()

Returns True. Exists for duck type compatibility with float.is_integer.

to_bytes(length=1, byteorder='big', *, signed=False)

Return an array of bytes representing an integer.

length

Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. Default is length 1.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.

signed

Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.

denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

class FieldOperations

Bases: int

as_integer_ratio()

Return a pair of integers, whose ratio is equal to the original int.

The ratio is in lowest terms and has a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)
bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3
bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6
conjugate()

Returns self, the complex conjugate of any int.

from_bytes(byteorder='big', *, signed=False)

Return the integer represented by the given array of bytes.

bytes

Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.

signed

Indicates whether two’s complement is used to represent the integer.

is_integer()

Returns True. Exists for duck type compatibility with float.is_integer.

to_bytes(length=1, byteorder='big', *, signed=False)

Return an array of bytes representing an integer.

length

Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. Default is length 1.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.

signed

Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.

denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

add_data(data: List, name: str, *, per_face: bool = True, legend_parameters: LegendParameters = None, data_type: DataTypeBase = None, unit: str = None)[source]

Add a list of data to a vtkPolyData.

Data can be added to cells or points. By default the data will be added to cells.

Parameters:
  • data – A list of values. The length of the data should match the length of DataCells or DataPoints in Polydata.

  • name – Name of data (e.g. Useful Daylight Autonomy.)

  • per_face – A Boolean to indicate if the data is per cell or per point. In most cases except for sensor points that are loaded as sensors the data are provided per cell.

  • legend_parameters – An Optional LegendParameters object to override default parameters of the legend. None indicates that default legend parameters will be used. (Default: None).

  • data_type – Optional DataType from the ladybug datatype subpackage (ie. Temperature()) , which will be used to assign default legend properties. If None, the legend associated with this object will contain no units unless a unit below is specified. (Default: None).

  • unit – Optional text string for the units of the values. (ie. “C”). If None or empty, the default units of the data_type will be used. If no data type is specified in this case, this will simply be an empty string. (Default: None).

add_visualization_data(data: VisualizationData, matching_method: str = 'faces')[source]

Add visualization data to this polyData.

Parameters:
  • data – A visualization data object.

  • matching_method – Either faces or vertices. Use faces if one value is assigned per each face and vertices if one value is assigned per each vertex. Default is faces.

override()

This method can be used to override a VTK class with a Python subclass. The class type passed to override will afterwards be instantiated instead of the type override is called on. For example,

class foo(vtk.vtkPoints):

pass

vtk.vtkPoints.override(foo)

will lead to foo being instantied everytime vtkPoints() is called. The main objective of this functionality is to enable developers to extend VTK classes with more pythonic subclasses that contain convenience functionality.

to_folder(target_folder='.')[source]

Write data to a folder with a JSON meta file.

This method generates a folder that includes a JSON meta file along with all the binary arrays written as standalone binary files.

The generated format can be used by vtk.js using the reader below https://kitware.github.io/vtk-js/examples/HttpDataSetReader.html

Parameters:

target_folder – Path to target folder. Default: .

to_vtk(target_folder, name, writer: VTKWriters = VTKWriters.binary)[source]

Write to a VTK file.

The file extension will be set to vtk for ASCII format and vtp for binary format.

ALL_PIECES_EXTENT

static vtkInformationIntegerVectorKey *ALL_PIECES_EXTENT()

Type:

C++

AddCellReference

void AddCellReference(vtkIdType cellId)

Add references to cell in cell structure. This means the links from the cell’s points to the cell are modified. Memory is not extended. Use the method ResizeCellList() to resize the link list from a point to its using cells. (This operator assumes BuildLinks() has been called.) Use this method only when the dataset is set as Editable.

Type:

C++

AddObserver
unsigned long AddObserver(const char* event,

vtkCommand* command, float priority=0.0f)

Add an event callback command(o:vtkObject, event:int) for an event type. Returns a handle that can be used with RemoveEvent(event:int).

Type:

C++

AddReferenceToCell

void AddReferenceToCell(vtkIdType ptId, vtkIdType cellId)

Add a reference to a cell in a particular point’s link list. (You may also consider using AddCellReference() to add the references from all the cell’s points to the cell.) This operator does not realloc memory; use the operator ResizeCellList() to do this if necessary. Use this method only when the dataset is set as Editable.

Type:

C++

Allocate

void Allocate(vtkIdType numCells=1000, int extSize=1000) Allocate(self, inPolyData:vtkPolyData, numCells:int=1000,

extSize:int=1000) -> None

C++: void Allocate(vtkPolyData *inPolyData,

vtkIdType numCells=1000, int extSize=1000)

Method allocates initial storage for vertex, line, polygon, and triangle strip arrays. Use this method before the method PolyData::InsertNextCell(). (Or, provide vertex, line, polygon, and triangle strip cell arrays). extSize is no longer used.

Type:

C++

AllocateCellGhostArray

vtkUnsignedCharArray *AllocateCellGhostArray()

Allocate ghost array for cells.

Type:

C++

AllocateCopy

bool AllocateCopy(vtkPolyData *pd)

Preallocate memory for the internal cell arrays such that they are the same size as those in pd.

Existing data is not preserved and the number of cells is set to zero.

@return True if allocation succeeds.

Type:

C++

AllocateEstimate
bool AllocateEstimate(vtkIdType numCells,

vtkIdType maxCellSize)

AllocateEstimate(self, numVerts:int, maxVertSize:int,

numLines:int, maxLineSize:int, numPolys:int, maxPolySize:int, numStrips:int, maxStripSize:int) -> bool

C++: bool AllocateEstimate(vtkIdType numVerts,

vtkIdType maxVertSize, vtkIdType numLines, vtkIdType maxLineSize, vtkIdType numPolys, vtkIdType maxPolySize, vtkIdType numStrips, vtkIdType maxStripSize)

Preallocate memory for the internal cell arrays. Each of the internal cell arrays (verts, lines, polys, and strips) will be resized to holdnumCells cells of size maxCellSize.

Existing data is not preserved and the number of cells is set to zero.

@return True if allocation succeeds.

Type:

C++

AllocateExact
bool AllocateExact(vtkIdType numCells,

vtkIdType connectivitySize)

AllocateExact(self, numVerts:int, vertConnSize:int, numLines:int,

lineConnSize:int, numPolys:int, polyConnSize:int, numStrips:int, stripConnSize:int) -> bool

C++: bool AllocateExact(vtkIdType numVerts,

vtkIdType vertConnSize, vtkIdType numLines, vtkIdType lineConnSize, vtkIdType numPolys, vtkIdType polyConnSize, vtkIdType numStrips, vtkIdType stripConnSize)

Preallocate memory for the internal cell arrays. Each of the internal cell arrays (verts, lines, polys, and strips) will be resized to holdnumCells cells and connectivitySize pointIds.

Existing data is not preserved and the number of cells is set to zero.

@return True if allocation succeeds.

Type:

C++

AllocatePointGhostArray

vtkUnsignedCharArray *AllocatePointGhostArray()

Allocate ghost array for points.

Type:

C++

AllocateProportional

bool AllocateProportional(vtkPolyData *pd, double ratio)

Preallocate memory for the internal cell arrays such that they are proportional to those in pd by a factor of ratio (for instance,ratio = 2 allocates twice as many cells).

Existing data is not preserved and the number of cells is set to zero.

@return True if allocation succeeds.

Type:

C++

BOUNDING_BOX

static vtkInformationDoubleVectorKey *BOUNDING_BOX()

Type:

C++

BreakOnError

static void BreakOnError()

This method is called when vtkErrorMacro executes. It allows the debugger to break on error.

Type:

C++

BuildCellLocator

void BuildCellLocator()

Build the cell locator. In a multi-threaded environment, call this method in a single thread before using FindCell().

Type:

C++

BuildCells

void BuildCells()

Create data structure that allows random access of cells. BuildCells is expensive but necessary to make use of the faster non-virtual implementations of GetCell/GetCellPoints. One may check if cells need to be built via NeedToBuilds before invoking. Cells always need to be built/re-built after low level direct modifications to verts, lines, polys or strips cell arrays.

Type:

C++

void BuildLinks(int initialSize=0)

Create upward links from points to cells that use each point. Enables topologically complex queries. Normally the links array is allocated based on the number of points in the vtkPolyData. The optional initialSize parameter can be used to allocate a larger size initially.

Type:

C++

BuildLocator

void BuildLocator()

Type:

C++

BuildPointLocator

void BuildPointLocator()

Build the internal point locator . In a multi-threaded environment, call this method in a single thread before using FindCell() or FindPoint().

Type:

C++

CELL = 1
CELL_DATA_FIELD = 2
CELL_DATA_VECTOR

static vtkInformationInformationVectorKey *CELL_DATA_VECTOR()

Type:

C++

CheckAttributes

int CheckAttributes()

This method checks to see if the cell and point attributes match the geometry. Many filters will crash if the number of tuples in an array is less than the number of points/cells. This method returns 1 if there is a mismatch, and 0 if everything is ok. It prints an error if an array is too short, and a warning if an array is too long.

Type:

C++

ComputeBounds

void ComputeBounds() override;

Compute the (X, Y, Z) bounds of the data.

Type:

C++

ComputeCellsBounds

void ComputeCellsBounds()

Compute the (X, Y, Z) bounds of the data. Note that the method only considers points that are used by cells. This is done for usability and historical reasons.

IMPORTANT

Until vtk 9.0.1, vtkPolyData::ComputeBounds() used to ignore points that do not belong to any cell. That was not consistent with other vtkPointSet subclasses and thus was error prone. See this ParaView issue https://gitlab.kitware.com/paraview/paraview/-/issues/20354 Now it defers to vtkPointSet::ComputeBounds() so vtkPolyData::GetBounds() may not return the same bounds as before. This behavior is probably the one you want when using bounds.

The previous behavior is still available through vtkPolyData::ComputeCellsBounds() and vtkPolyData::GetCellsBounds(). This is mainly used for rendering purpose.

Type:

C++

CopyAttributes

virtual void CopyAttributes(vtkDataSet *ds)

Copy the attributes associated with the specified dataset to this instance of vtkDataSet. THIS METHOD IS NOT THREAD SAFE.

Type:

C++

CopyCells
vtkIdList,

locator:vtkIncrementalPointLocator=…) -> None

C++: void CopyCells(vtkPolyData *pd, vtkIdList *idList,

vtkIncrementalPointLocator *locator=nullptr)

Copy cells listed in idList from pd, including points, point data, and cell data. This method assumes that point and cell data have been allocated. If you pass in a point locator, then the points won’t be duplicated in the output. This requires the use of an incremental point locator.

Type:

CopyCells(self, pd

Type:

vtkPolyData, idList

CopyInformationFromPipeline
virtual void CopyInformationFromPipeline(

vtkInformation *info)

Copy from the pipeline information to the data object’s own information. Called right before the main execution pass.

Type:

C++

CopyInformationToPipeline

virtual void CopyInformationToPipeline(vtkInformation *info)

Copy information from this data object to the pipeline information. This is used by the vtkTrivialProducer that is created when someone calls SetInputData() to connect a data object to a pipeline.

Type:

C++

CopyStructure

void CopyStructure(vtkDataSet *ds) override;

Copy the geometric and topological structure of an input poly data object.

Type:

C++

Crop

virtual void Crop(const int *updateExtent)

This method crops the data object (if necessary) so that the extent matches the update extent.

Type:

C++

DATA_EXTENT

static vtkInformationIntegerPointerKey *DATA_EXTENT()

Type:

C++

DATA_EXTENT_TYPE

static vtkInformationIntegerKey *DATA_EXTENT_TYPE()

Type:

C++

DATA_NUMBER_OF_GHOST_LEVELS

static vtkInformationIntegerKey *DATA_NUMBER_OF_GHOST_LEVELS( )

Type:

C++

DATA_NUMBER_OF_PIECES

static vtkInformationIntegerKey *DATA_NUMBER_OF_PIECES()

Type:

C++

DATA_OBJECT

static vtkInformationDataObjectKey *DATA_OBJECT()

Type:

C++

DATA_OBJECT_FIELD = 0
DATA_PIECE_NUMBER

static vtkInformationIntegerKey *DATA_PIECE_NUMBER()

Type:

C++

DATA_TIME_STEP

static vtkInformationDoubleKey *DATA_TIME_STEP()

Type:

C++

DATA_TYPE_NAME

static vtkInformationStringKey *DATA_TYPE_NAME()

Type:

C++

DIRECTION

static vtkInformationDoubleVectorKey *DIRECTION()

Type:

C++

DataHasBeenGenerated

void DataHasBeenGenerated()

This method is called by the source when it executes to generate data. It is sort of the opposite of ReleaseData. It sets the DataReleased flag to 0, and sets a new UpdateTime.

Type:

C++

DebugOff

virtual void DebugOff()

Turn debugging output off.

Type:

C++

DebugOn

virtual void DebugOn()

Turn debugging output on.

Type:

C++

DeepCopy

void DeepCopy(vtkDataObject *src) override;

The goal of the method is to copy the complete data from src into this object. The implementation is delegated to the differenent subclasses. If you want to copy the data up to the array pointers only, @see ShallowCopy.

This method deep copy the field data and copy the internal structure.

Type:

C++

DeleteCell

void DeleteCell(vtkIdType cellId)

Type:

C++

DeleteCells

void DeleteCells()

Release data structure that allows random access of the cells. This must be done before a 2nd call to BuildLinks(). DeleteCells implicitly deletes the links as well since they are no longer valid.

Type:

C++

void DeleteLinks()

Release the upward links from point to cells that use each point.

Type:

C++

DeletePoint

void DeletePoint(vtkIdType ptId)

Mark a point/cell as deleted from this vtkPolyData. Use this method only when the dataset is set as Editable.

Type:

C++

EDGE = 5
EDGE_DATA_VECTOR

static vtkInformationInformationVectorKey *EDGE_DATA_VECTOR()

Type:

C++

ERR_INCORRECT_FIELD = -3
ERR_NON_MANIFOLD_STAR = -2
ERR_NO_SUCH_FIELD = -4
EditableOff

virtual void EditableOff()

Type:

C++

EditableOn

virtual void EditableOn()

Type:

C++

ExtendedNew

static vtkPolyData *ExtendedNew()

Type:

C++

FIELD = 2
FIELD_ACTIVE_ATTRIBUTE

static vtkInformationIntegerKey *FIELD_ACTIVE_ATTRIBUTE()

Type:

C++

FIELD_ARRAY_TYPE

static vtkInformationIntegerKey *FIELD_ARRAY_TYPE()

Type:

C++

FIELD_ASSOCIATION

static vtkInformationIntegerKey *FIELD_ASSOCIATION()

Type:

C++

FIELD_ASSOCIATION_CELLS = 1
FIELD_ASSOCIATION_EDGES = 5
FIELD_ASSOCIATION_NONE = 2
FIELD_ASSOCIATION_POINTS = 0
FIELD_ASSOCIATION_POINTS_THEN_CELLS = 3
FIELD_ASSOCIATION_ROWS = 6
FIELD_ASSOCIATION_VERTICES = 4
FIELD_ATTRIBUTE_TYPE

static vtkInformationIntegerKey *FIELD_ATTRIBUTE_TYPE()

Type:

C++

FIELD_NAME

static vtkInformationStringKey *FIELD_NAME()

Type:

C++

FIELD_NUMBER_OF_COMPONENTS

static vtkInformationIntegerKey *FIELD_NUMBER_OF_COMPONENTS()

Type:

C++

FIELD_NUMBER_OF_TUPLES

static vtkInformationIntegerKey *FIELD_NUMBER_OF_TUPLES()

Type:

C++

FIELD_OPERATION

static vtkInformationIntegerKey *FIELD_OPERATION()

Type:

C++

FIELD_OPERATION_MODIFIED = 2
FIELD_OPERATION_PRESERVED = 0
FIELD_OPERATION_REINTERPOLATED = 1
FIELD_OPERATION_REMOVED = 3
FIELD_RANGE

static vtkInformationDoubleVectorKey *FIELD_RANGE()

Type:

C++

FastDelete

virtual void FastDelete()

Delete a reference to this object. This version will not invoke garbage collection and can potentially leak the object if it is part of a reference loop. Use this method only when it is known that the object has another reference and would not be collected if a full garbage collection check were done.

Type:

C++

FindAndGetCell
vtkCell,

cellId:int, tol2:float, subId:int, pcoords:[float, float, float], weights:[float, …]) -> vtkCell

C++: virtual vtkCell *FindAndGetCell(double x[3], vtkCell *cell,

vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights)

Locate the cell that contains a point and return the cell. Also returns the subcell id, parametric coordinates and weights for subsequent interpolation. This method combines the derived class methods int FindCell and vtkCell *GetCell. Derived classes may provide a more efficient implementation. See for example vtkStructuredPoints. THIS METHOD IS NOT THREAD SAFE.

Type:

FindAndGetCell(self, x

Type:

[float, float, float], cell

FindCell
vtkCell, cellId:int,

tol2:float, subId:int, pcoords:[float, float, float], weights:[float, …]) -> int

C++: vtkIdType FindCell(double x[3], vtkCell *cell,

vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override;

FindCell(self, x:[float, float, float], cell:vtkCell,

gencell:vtkGenericCell, cellId:int, tol2:float, subId:int, pcoords:[float, float, float], weights:[float, …]) -> int

C++: vtkIdType FindCell(double x[3], vtkCell *cell,

vtkGenericCell *gencell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override;

Locate cell based on global coordinate x and tolerance squared. If cell and cellId is non-nullptr, then search starts from this cell and looks at immediate neighbors. Returns cellId >= 0 if inside, < 0 otherwise. The parametric coordinates are provided in pcoords[3]. The interpolation weights are returned in weights[]. (The number of weights is equal to the number of points in the found cell). Tolerance is used to control how close the point is to be considered “in” the cell. THIS METHOD IS NOT THREAD SAFE.

Type:

FindCell(self, x

Type:

[float, float, float], cell

FindPoint

vtkIdType FindPoint(double x[3]) override; FindPoint(self, x:float, y:float, z:float) -> int C++: vtkIdType FindPoint(double x, double y, double z)

Type:

C++

GenerateGhostArray

-> None C++: virtual void GenerateGhostArray(int zeroExt[6]) GenerateGhostArray(self, zeroExt:[int, int, int, int, int, int],

cellOnly:bool) -> None

C++: virtual void GenerateGhostArray(int zeroExt[6],

bool cellOnly)

Normally called by pipeline executives or algorithms only. This method computes the ghost arrays for a given dataset. The zeroExt argument specifies the extent of the region which ghost type = 0.

GetActiveFieldInformation
vtkInformation,

fieldAssociation:int, attributeType:int) -> vtkInformation

C++: static vtkInformation *GetActiveFieldInformation(

vtkInformation *info, int fieldAssociation, int attributeType)

Return the information object within the input information object’s field data corresponding to the specified association (FIELD_ASSOCIATION_POINTS or FIELD_ASSOCIATION_CELLS) and attribute (SCALARS, VECTORS, NORMALS, TCOORDS, or TENSORS)

Type:

GetActiveFieldInformation(info

GetActualMemorySize

unsigned long GetActualMemorySize() override;

Return the actual size of the data in kibibytes (1024 bytes). This number is valid only after the pipeline has updated. The memory size returned is guaranteed to be greater than or equal to the memory required to represent the data (e.g., extra space in arrays, etc. are not included in the return value). THIS METHOD IS THREAD SAFE.

Type:

C++

GetAddressAsString

Get address of C++ object in format ‘Addr=%p’ after casting to the specified type. This method is obsolete, you can get the same information from o.__this__.

GetAssociationTypeAsString
static const char *GetAssociationTypeAsString(

int associationType)

Given an integer association type, this static method returns a string type for the attribute (i.e. associationType = 0: returns “Points”).

Type:

C++

GetAssociationTypeFromString
static int GetAssociationTypeFromString(

const char *associationName)

Given a string association name, this static method returns an integer association type for the attribute (i.e. associationName = “Points”: returns 0).

Type:

C++

GetAttributeTypeForArray

virtual int GetAttributeTypeForArray(vtkAbstractArray *arr)

Retrieves the attribute type that an array came from. This is useful for obtaining which attribute type a input array to an algorithm came from (retrieved from GetInputAbstractArrayToProcesss).

Type:

C++

GetAttributes

virtual vtkDataSetAttributes *GetAttributes(int type)

Returns the attributes of the data object of the specified attribute type. The type may be: POINT - Defined in vtkDataSet subclasses. CELL - Defined in vtkDataSet subclasses. VERTEX - Defined in vtkGraph subclasses. EDGE - Defined in vtkGraph subclasses. ROW - Defined in vtkTable. The other attribute type, FIELD, will return nullptr since field data is stored as a vtkFieldData instance, not a vtkDataSetAttributes instance. To retrieve field data, use GetAttributesAsFieldData.

@warning This method NEEDS to be overridden in subclasses to work as documented. If not, it returns nullptr for any type but FIELD.

Type:

C++

GetAttributesAsFieldData

vtkFieldData *GetAttributesAsFieldData(int type) override;

Returns the attributes of the data object as a vtkFieldData. This returns non-null values in all the same cases as GetAttributes, in addition to the case of FIELD, which will return the field data for any vtkDataObject subclass.

Type:

C++

GetBounds

double *GetBounds() GetBounds(self, bounds:[float, float, float, float, float, float])

-> None

C++: void GetBounds(double bounds[6])

Return a pointer to the geometry bounding box in the form (xmin,xmax, ymin,ymax, zmin,zmax). THIS METHOD IS NOT THREAD SAFE.

Type:

C++

GetCell

vtkCell *GetCell(vtkIdType cellId) override; GetCell(self, cellId:int, cell:vtkGenericCell) -> None C++: void GetCell(vtkIdType cellId, vtkGenericCell *cell)

override;

GetCell(self, cellId:int, pts:(int, …)) -> int C++: unsigned char GetCell(vtkIdType cellId,

const vtkIdType *&pts)

GetCell(self, i:int, j:int, k:int) -> vtkCell C++: virtual vtkCell *GetCell(int i, int j, int k)

This method always return a vtkEmptyCell, as there is no cell in a vtkPointSet.

Type:

C++

GetCellBounds
[float, float, float,

float, float, float]) -> None

C++: void GetCellBounds(vtkIdType cellId, double bounds[6])

override;

Get the bounds of the cell with cellId such that: 0 <= cellId < NumberOfCells. A subclass may be able to determine the bounds of cell without using an expensive GetCell() method. A default implementation is provided that actually uses a GetCell() call. This is to ensure the method is available to all datasets. Subclasses should override this method to provide an efficient implementation. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED

Type:

GetCellBounds(self, cellId

Type:

int, bounds

GetCellData

vtkCellData *GetCellData()

Return a pointer to this dataset’s cell data. THIS METHOD IS THREAD SAFE

Type:

C++

GetCellEdgeNeighbors
int, p2:int,

cellIds:vtkIdList) -> None

C++: void GetCellEdgeNeighbors(vtkIdType cellId, vtkIdType p1,

vtkIdType p2, vtkIdList *cellIds)

Get the neighbors at an edge. More efficient than the general GetCellNeighbors(). Assumes links have been built (with BuildLinks()), and looks specifically for edge neighbors.

Type:

GetCellEdgeNeighbors(self, cellId

Type:

int, p1

GetCellGhostArray

vtkUnsignedCharArray *GetCellGhostArray()

Get the array that defines the ghost type of each cell. We cache the pointer to the array to save a lookup involving string comparisons

Type:

C++

GetCellIdRelativeToCellArray

vtkIdType GetCellIdRelativeToCellArray(vtkIdType cellId)

Maps the cell at position cellId inside the vtkPolyData to its location in the corresponding cell array. For instance, if cell cellId is a line, then this method returns the position of this cell in the Lines cell array.

Type:

C++

GetCellLocator

virtual vtkAbstractCellLocator *GetCellLocator()

Type:

C++

GetCellNeighbors
vtkIdList,

cellIds:vtkIdList) -> None

C++: void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds,

vtkIdList *cellIds) override;

Topological inquiry to get all cells using list of points exclusive of cell specified (e.g., cellId). Note that the list consists of only cells that use ALL the points provided. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED

Type:

GetCellNeighbors(self, cellId

Type:

int, ptIds

GetCellNumberOfFaces
int,

cell:vtkGenericCell) -> int

C++: int GetCellNumberOfFaces(vtkIdType cellId,

unsigned char &cellType, vtkGenericCell *cell)

Get the number of faces of a cell.

Most of the times extracting the number of faces requires only extracting the cell type. However, for some cell types, the number of faces is not constant. For example, a vtkPolyhedron cell can have a different number of faces for each cell. That’s why this method requires the cell id and the dataset.

Type:

GetCellNumberOfFaces(self, cellId

Type:

int, cellType

GetCellPoints
void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds)

override;

GetCellPoints(self, cellId:int, npts:int, pts:(int, …)) -> int C++: unsigned char GetCellPoints(vtkIdType cellId,

vtkIdType &npts, vtkIdType const *&pts)

GetCellPoints(self, cellId:int, npts:int, pts:(int, …),

ptIds:vtkIdList) -> None

C++: void GetCellPoints(vtkIdType cellId, vtkIdType &npts,

vtkIdType const *&pts, vtkIdList *ptIds) override;

Copy a cells point ids into list provided. (Less efficient.)

Type:

C++

GetCellSize

vtkIdType GetCellSize(vtkIdType cellId) override;

This method always returns 1, as all cells are point in a pure vtkPointSet.

Type:

C++

GetCellType

int GetCellType(vtkIdType cellId) override;

This method always returns VTK_EMPTY_CELL, as there is no cell in a vtkPointSet.

Type:

C++

GetCellTypes

virtual void GetCellTypes(vtkCellTypes *types)

Get a list of types of cells in a dataset. The list consists of an array of types (not necessarily in any order), with a single entry per type. For example a dataset 5 triangles, 3 lines, and 100 hexahedra would result a list of three entries, corresponding to the types VTK_TRIANGLE, VTK_LINE, and VTK_HEXAHEDRON. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED

Type:

C++

GetCellsBounds
[float, float, float, float, float,

float]) -> None

C++: void GetCellsBounds(double bounds[6])

Get the cells bounds. Internally calls ComputeCellsBounds(). @sa ComputeCellsBounds()

Type:

GetCellsBounds(self, bounds

GetCenter

double *GetCenter() GetCenter(self, center:[float, float, float]) -> None C++: void GetCenter(double center[3])

Get the center of the bounding box. THIS METHOD IS NOT THREAD SAFE.

Type:

C++

GetClassName

const char *GetClassName()

Return the class name as a string.

Type:

C++

GetCommand

vtkCommand *GetCommand(unsigned long tag)

Type:

C++

GetData

static vtkPolyData *GetData(vtkInformation *info) GetData(v:vtkInformationVector, i:int=0) -> vtkPolyData C++: static vtkPolyData *GetData(vtkInformationVector *v, int i=0)

Retrieve an instance of this class from an information object.

Type:

C++

GetDataObjectType

int GetDataObjectType() override;

Return what type of dataset this is.

Type:

C++

GetDataReleased

virtual vtkTypeBool GetDataReleased()

Get the flag indicating the data has been released.

Type:

C++

GetDebug

bool GetDebug()

Get the value of the debug flag.

Type:

C++

GetEditable

virtual bool GetEditable()

Type:

C++

GetExtentType

virtual int GetExtentType()

The ExtentType will be left as VTK_PIECES_EXTENT for data objects such as vtkPolyData and vtkUnstructuredGrid. The ExtentType will be changed to VTK_3D_EXTENT for data objects with 3D structure such as vtkImageData (and its subclass vtkStructuredPoints), vtkRectilinearGrid, and vtkStructuredGrid. The default is the have an extent in pieces, with only one piece (no streaming possible).

Type:

C++

GetFieldData

virtual vtkFieldData *GetFieldData()

Type:

C++

GetGhostArray

vtkUnsignedCharArray *GetGhostArray(int type) override;

Returns the ghost array for the given type (point or cell). Takes advantage of the cache with the pointer to the array to save a string comparison.

Type:

C++

GetGhostLevel

virtual int GetGhostLevel()

Get the ghost level.

Type:

C++

GetGlobalReleaseDataFlag

static vtkTypeBool GetGlobalReleaseDataFlag()

Type:

C++

GetGlobalWarningDisplay

static vtkTypeBool GetGlobalWarningDisplay()

Type:

C++

GetInformation

virtual vtkInformation *GetInformation()

Set/Get the information object associated with this data object.

Type:

C++

GetIsInMemkind

bool GetIsInMemkind()

A local state flag that remembers whether this object lives in the normal or extended memory space.

Type:

C++

GetLength

double GetLength()

Return the length of the diagonal of the bounding box. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED

Type:

C++

GetLength2

double GetLength2()

Return the squared length of the diagonal of the bounding box. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED

Type:

C++

GetLines

vtkCellArray *GetLines()

Get the cell array defining lines. If there are no lines, an empty array will be returned (convenience to simplify traversal).

Type:

C++

virtual vtkAbstractCellLinks *GetLinks()

Type:

C++

GetMTime

vtkMTimeType GetMTime() override;

Get MTime which also considers its cell array MTime.

Type:

C++

GetMaxCellSize

int GetMaxCellSize() override;

Return the maximum cell size in this poly data.

Type:

C++

GetMeshMTime

virtual vtkMTimeType GetMeshMTime()

Return the mesh (geometry/topology) modification time. This time is different from the usual MTime which also takes into account the modification of data arrays. This function can be used to track the changes on the mesh separately from the data arrays (eg. static mesh over time with transient data).

Type:

C++

GetNamedFieldInformation
vtkInformation,

fieldAssociation:int, name:str) -> vtkInformation

C++: static vtkInformation *GetNamedFieldInformation(

vtkInformation *info, int fieldAssociation, const char *name)

Return the information object within the input information object’s field data corresponding to the specified association (FIELD_ASSOCIATION_POINTS or FIELD_ASSOCIATION_CELLS) and name.

Type:

GetNamedFieldInformation(info

GetNumberOfCells

vtkIdType GetNumberOfCells() override;

Standard vtkDataSet interface.

Type:

C++

GetNumberOfElements

vtkIdType GetNumberOfElements(int type) override;

Get the number of elements for a specific attribute type (POINT, CELL, etc.).

Type:

C++

GetNumberOfGenerationsFromBase
vtkIdType GetNumberOfGenerationsFromBase(const char *type)

override;

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). If the named class is not in this class’s inheritance tree, return a negative value. Valid responses will always be nonnegative. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Type:

C++

GetNumberOfGenerationsFromBaseType
static vtkIdType GetNumberOfGenerationsFromBaseType(

const char *type)

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). If the named class is not in this class’s inheritance tree, return a negative value. Valid responses will always be nonnegative. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Type:

C++

GetNumberOfLines

vtkIdType GetNumberOfLines()

Type:

C++

GetNumberOfPieces

virtual int GetNumberOfPieces()

Type:

C++

GetNumberOfPoints

vtkIdType GetNumberOfPoints() override;

See vtkDataSet for additional information.

Type:

C++

GetNumberOfPolys

vtkIdType GetNumberOfPolys()

Type:

C++

GetNumberOfStrips

vtkIdType GetNumberOfStrips()

Type:

C++

GetNumberOfVerts

vtkIdType GetNumberOfVerts()

Return the number of primitives of a particular type held.

Type:

C++

GetObjectDescription

std::string GetObjectDescription() override;

The object description printed in messages and PrintSelf output. To be used only for reporting purposes.

Type:

C++

GetObjectName

virtual std::string GetObjectName()

Type:

C++

GetPiece

virtual int GetPiece()

Get the piece and the number of pieces. Similar to extent in 3D.

Type:

C++

GetPoint

void GetPoint(vtkIdType ptId, double x[3]) override; GetPoint(self, ptId:int) -> (float, float, float) C++: double *GetPoint(vtkIdType ptId) override;

Copy point coordinates into user provided array x[3] for specified point id. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED

Type:

C++

GetPointCells
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds)

override;

GetPointCells(self, ptId:int, ncells:int, cells:[int, …])

-> None

C++: void GetPointCells(vtkIdType ptId, vtkIdType &ncells,

vtkIdType *&cells)

Efficient method to obtain cells using a particular point. Make sure that routine BuildLinks() has been called.

Type:

C++

GetPointData

vtkPointData *GetPointData()

Return a pointer to this dataset’s point data. THIS METHOD IS THREAD SAFE

Type:

C++

GetPointGhostArray

vtkUnsignedCharArray *GetPointGhostArray()

Gets the array that defines the ghost type of each point. We cache the pointer to the array to save a lookup involving string comparisons

Type:

C++

GetPointLocator

virtual vtkAbstractPointLocator *GetPointLocator()

Type:

C++

GetPoints

virtual vtkPoints *GetPoints()

Type:

C++

GetPolys

vtkCellArray *GetPolys()

Get the cell array defining polygons. If there are no polygons, an empty array will be returned (convenience to simplify traversal).

Type:

C++

GetReferenceCount

int GetReferenceCount()

Return the current reference count of this object.

Type:

C++

GetScalarFieldCriticalIndex
int,

scalarField:vtkDataArray) -> int

C++: int GetScalarFieldCriticalIndex(vtkIdType pointId,

vtkDataArray *scalarField)

GetScalarFieldCriticalIndex(self, pointId:int, fieldId:int) -> int C++: int GetScalarFieldCriticalIndex(vtkIdType pointId,

int fieldId)

GetScalarFieldCriticalIndex(self, pointId:int, fieldName:str)

-> int

C++: int GetScalarFieldCriticalIndex(vtkIdType pointId,

const char *fieldName)

Type:

GetScalarFieldCriticalIndex(self, pointId

GetScalarRange

virtual void GetScalarRange(double range[2]) GetScalarRange(self) -> (float, float) C++: double *GetScalarRange()

Convenience method to get the range of the first component (and only the first component) of any scalars in the data set. If the data has both point data and cell data, it returns the (min/max) range of combined point and cell data. If there are no point or cell scalars the method will return (0,1). Note: It might be necessary to call Update to create or refresh the scalars before calling this method. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED

Type:

C++

GetStrips

vtkCellArray *GetStrips()

Get the cell array defining triangle strips. If there are no triangle strips, an empty array will be returned (convenience to simplify traversal).

Type:

C++

GetUpdateTime

vtkMTimeType GetUpdateTime()

Used by Threaded ports to determine if they should initiate an asynchronous update (still in development).

Type:

C++

GetUsingMemkind

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.

Type:

C++

GetVerts

vtkCellArray *GetVerts()

Get the cell array defining vertices. If there are no vertices, an empty array will be returned (convenience to simplify traversal).

Type:

C++

GlobalReleaseDataFlagOff

void GlobalReleaseDataFlagOff()

Type:

C++

GlobalReleaseDataFlagOn

void GlobalReleaseDataFlagOn()

Type:

C++

GlobalWarningDisplayOff

static void GlobalWarningDisplayOff()

Type:

C++

GlobalWarningDisplayOn

static void GlobalWarningDisplayOn()

Type:

C++

HasAnyBlankCells

virtual bool HasAnyBlankCells()

Returns 1 if there are any blanking cells 0 otherwise. Blanking is supported only for vtkStructuredGrid and vtkUniformGrid

Type:

C++

HasAnyBlankPoints

virtual bool HasAnyBlankPoints()

Returns 1 if there are any blanking points 0 otherwise. Blanking is supported only for vtkStructuredGrid and vtkUniformGrid

Type:

C++

HasAnyGhostCells

bool HasAnyGhostCells()

Returns 1 if there are any ghost cells 0 otherwise.

Type:

C++

HasAnyGhostPoints

bool HasAnyGhostPoints()

Returns 1 if there are any ghost points 0 otherwise.

Type:

C++

HasObserver

vtkTypeBool HasObserver(unsigned long event, vtkCommand *) HasObserver(self, event:str, __b:vtkCommand) -> int C++: vtkTypeBool HasObserver(const char *event, vtkCommand *) HasObserver(self, event:int) -> int C++: vtkTypeBool HasObserver(unsigned long event) HasObserver(self, event:str) -> int C++: vtkTypeBool HasObserver(const char *event)

Type:

C++

Initialize

void Initialize() override;

Restore object to initial state. Release memory back to system.

Type:

C++

InitializeObjectBase

void InitializeObjectBase()

Type:

C++

InsertNextCell
vtkIdType InsertNextCell(int type, int npts,

const vtkIdType pts[])

InsertNextCell(self, type:int, pts:vtkIdList) -> int C++: vtkIdType InsertNextCell(int type, vtkIdList *pts)

Insert a cell of type VTK_VERTEX, VTK_POLY_VERTEX, VTK_LINE, VTK_POLY_LINE, VTK_TRIANGLE, VTK_QUAD, VTK_POLYGON, or VTK_TRIANGLE_STRIP. Make sure that the PolyData::Allocate() function has been called first or that vertex, line, polygon, and triangle strip arrays have been supplied. Note: will also insert VTK_PIXEL, but converts it to VTK_QUAD.

Type:

C++

InsertNextLinkedCell

-> int C++: vtkIdType InsertNextLinkedCell(int type, int npts,

const vtkIdType pts[])

Add a new cell to the cell data structure (after cell pointers have been built). This method adds the cell and then updates the links from the points to the cells. (Memory is allocated as necessary.) Use this method only when the dataset is set as Editable.

InsertNextLinkedPoint

vtkIdType InsertNextLinkedPoint(int numLinks) InsertNextLinkedPoint(self, x:[float, float, float], numLinks:int)

-> int

C++: vtkIdType InsertNextLinkedPoint(double x[3], int numLinks)

Add a point to the cell data structure (after cell pointers have been built). This method adds the point and then allocates memory for the links to the cells. (To use this method, make sure points are available and BuildLinks() has been invoked.) Of the two methods below, one inserts a point coordinate and the other just makes room for cell links. Use this method only when the dataset is set as Editable.

Type:

C++

InvokeEvent

int InvokeEvent(unsigned long event, void* callData) InvokeEvent(self, event:str, callData:Any) -> int C++: int InvokeEvent(const char* event, void* callData) InvokeEvent(self, event:int) -> int C++: int InvokeEvent(unsigned long event) InvokeEvent(self, event:str) -> int C++: int InvokeEvent(const char* event)

This method invokes an event and returns whether the event was aborted or not. If the event was aborted, the return value is 1, otherwise it is 0.

Type:

C++

IsA

vtkTypeBool IsA(const char *type) override;

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.

Type:

C++

IsEdge

int IsEdge(vtkIdType p1, vtkIdType p2)

Determine whether two points form an edge. If they do, return non-zero. By definition PolyVertex and PolyLine have no edges since 1-dimensional edges are only found on cells 2D and higher. Edges are defined as 1-D boundary entities to cells. Make sure BuildLinks() has been called first.

Type:

C++

IsPointUsedByCell

int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId)

Determine whether a point is used by a particular cell. If it is, return non-zero. Make sure BuildCells() has been called first.

Type:

C++

IsTriangle

int IsTriangle(int v1, int v2, int v3)

Given three vertices, determine whether it’s a triangle. Make sure BuildLinks() has been called first.

Type:

C++

IsTypeOf

static vtkTypeBool IsTypeOf(const char *type)

Return 1 if this class type 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.

Type:

C++

MAXIMUM = 2
MINIMUM = 0
Modified

virtual void Modified()

Update the modification time for this object. Many filters rely on the modification time to determine if they need to recompute their data. The modification time is a unique monotonically increasing unsigned long integer.

Type:

C++

NUMBER_OF_ASSOCIATIONS = 7
NUMBER_OF_ATTRIBUTE_TYPES = 7
NeedToBuildCells

bool NeedToBuildCells()

Check if BuildCells is needed.

Type:

C++

NewCellIterator

vtkCellIterator *NewCellIterator() override;

Return an iterator that traverses the cells in this data set.

Type:

C++

NewInstance

vtkPolyData *NewInstance()

Type:

C++

ORIGIN

static vtkInformationDoubleVectorKey *ORIGIN()

Type:

C++

PIECE_EXTENT

static vtkInformationIntegerVectorKey *PIECE_EXTENT()

Type:

C++

POINT = 0
POINT_DATA_FIELD = 1
POINT_DATA_VECTOR

static vtkInformationInformationVectorKey *POINT_DATA_VECTOR( )

Type:

C++

POINT_THEN_CELL = 3
PrepareForNewData

virtual void PrepareForNewData()

make the output data ready for new data to be inserted. For most objects we just call Initialize. But for vtkImageData we leave the old data in case the memory can be reused.

Type:

C++

REGULAR_POINT = -1
ROW = 6
Register

virtual void Register(vtkObjectBase *o)

Increase the reference count by 1.

Type:

C++

ReleaseData

void ReleaseData()

Release data back to system to conserve memory resource. Used during visualization network execution. Releasing this data does not make down-stream data invalid.

Type:

C++

RemoveAllObservers

void RemoveAllObservers()

Type:

C++

RemoveCellReference

void RemoveCellReference(vtkIdType cellId)

Remove all references to cell in cell structure. This means the links from the cell’s points to the cell are deleted. Memory is not reclaimed. Use the method ResizeCellList() to resize the link list from a point to its using cells. (This operator assumes BuildLinks() has been called.) Use this method only when the dataset is set as Editable.

Type:

C++

RemoveDeletedCells

void RemoveDeletedCells()

The cells marked by calls to DeleteCell are stored in the Cell Array VTK_EMPTY_CELL, but they still exist in the cell arrays. Calling RemoveDeletedCells will traverse the cell arrays and remove/compact the cell arrays as well as any cell data thus truly removing the cells from the polydata object. Use this method only when the dataset is set as Editable.

Type:

C++

RemoveGhostCells

void RemoveGhostCells()

This method will remove any cell that is marked as ghost (has the vtkDataSetAttributes::DUPLICATECELL or the vtkDataSetAttributes::HIDDENCELL bit set). It does not remove unused points.

Type:

C++

RemoveNamedFieldInformation
vtkInformation,

fieldAssociation:int, name:str) -> None

C++: static void RemoveNamedFieldInformation(vtkInformation *info,

int fieldAssociation, const char *name)

Remove the info associated with an array

Type:

RemoveNamedFieldInformation(info

RemoveObserver

void RemoveObserver(vtkCommand *) RemoveObserver(self, tag:int) -> None C++: void RemoveObserver(unsigned long tag)

Type:

C++

RemoveObservers

void RemoveObservers(unsigned long event, vtkCommand *) RemoveObservers(self, event:str, __b:vtkCommand) -> None C++: void RemoveObservers(const char *event, vtkCommand *) RemoveObservers(self, event:int) -> None C++: void RemoveObservers(unsigned long event) RemoveObservers(self, event:str) -> None C++: void RemoveObservers(const char *event)

Type:

C++

RemoveReferenceToCell

void RemoveReferenceToCell(vtkIdType ptId, vtkIdType cellId)

Remove a reference to a cell in a particular point’s link list. You may also consider using RemoveCellReference() to remove the references from all the cell’s points to the cell. This operator does not reallocate memory; use the operator ResizeCellList() to do this if necessary. Use this method only when the dataset is set as Editable.

Type:

C++

ReplaceCell

void ReplaceCell(vtkIdType cellId, vtkIdList *ids) ReplaceCell(self, cellId:int, npts:int, pts:(int, …)) -> None C++: void ReplaceCell(vtkIdType cellId, int npts,

const vtkIdType pts[])

Type:

C++

ReplaceCellPoint

-> None C++: void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId,

vtkIdType newPtId)

ReplaceCellPoint(self, cellId:int, oldPtId:int, newPtId:int,

cellPointIds:vtkIdList) -> None

C++: void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId,

vtkIdType newPtId, vtkIdList *cellPointIds)

Replace a point in the cell connectivity list with a different point. Use this method only when the dataset is set as Editable.

The version with cellPointIds avoids allocating/deallocating a vtkIdList at each call internally.

THIS METHOD IS THREAD SAFE IF BuildCells() IS FIRST CALLED FROM A SINGLE THREAD.

ReplaceLinkedCell

-> None C++: void ReplaceLinkedCell(vtkIdType cellId, int npts,

const vtkIdType pts[])

Replace one cell with another in cell structure. This operator updates the connectivity list and the point’s link list. It does not delete references to the old cell in the point’s link list. Use the operator RemoveCellReference() to delete all references from points to (old) cell. You may also want to consider using the operator ResizeCellList() if the link list is changing size. Use this method only when the dataset is set as Editable.

Reset

void Reset()

Begin inserting data all over again. Memory is not freed but otherwise objects are returned to their initial state.

Type:

C++

ResizeCellList

void ResizeCellList(vtkIdType ptId, int size)

Resize the list of cells using a particular point. (This operator assumes that BuildLinks() has been called.) Use this method only when the dataset is set as Editable.

Type:

C++

ReverseCell

void ReverseCell(vtkIdType cellId)

Reverse the order of point ids defining the cell. Use this method only when the dataset is set as Editable.

Type:

C++

SADDLE = 1
SIL

static vtkInformationDataObjectKey *SIL()

Type:

C++

SPACING

static vtkInformationDoubleVectorKey *SPACING()

Type:

C++

SafeDownCast

static vtkPolyData *SafeDownCast(vtkObjectBase *o)

Type:

C++

SetActiveAttribute
int,

attributeName:str, attributeType:int) -> vtkInformation

C++: static vtkInformation *SetActiveAttribute(

vtkInformation *info, int fieldAssociation, const char *attributeName, int attributeType)

Set the named array to be the active field for the specified type (SCALARS, VECTORS, NORMALS, TCOORDS, or TENSORS) and association (FIELD_ASSOCIATION_POINTS or FIELD_ASSOCIATION_CELLS). Returns the active field information object and creates on entry if one not found.

Type:

SetActiveAttribute(info

Type:

vtkInformation, fieldAssociation

SetActiveAttributeInfo
int,
attributeType:int, name:str, arrayType:int, numComponents:int,

numTuples:int) -> None

C++: static void SetActiveAttributeInfo(vtkInformation *info,

int fieldAssociation, int attributeType, const char *name, int arrayType, int numComponents, int numTuples)

Set the name, array type, number of components, and number of tuples within the passed information object for the active attribute of type attributeType (in specified association, FIELD_ASSOCIATION_POINTS or FIELD_ASSOCIATION_CELLS). If there is not an active attribute of the specified type, an entry in the information object is created. If arrayType, numComponents, or numTuples equal to -1, or name=nullptr the value is not changed.

Type:

SetActiveAttributeInfo(info

Type:

vtkInformation, fieldAssociation

SetCellLocator

virtual void SetCellLocator(vtkAbstractCellLocator *)

Set / get an instance of vtkAbstractCellLocator which may be used when a vtkCellLocatorStrategy is used during a FindCell() operation.

Type:

C++

SetCellOrderAndRationalWeights
int,

cell:vtkGenericCell) -> None

C++: void SetCellOrderAndRationalWeights(vtkIdType cellId,

vtkGenericCell *cell)

Type:

SetCellOrderAndRationalWeights(self, cellId

SetDebug

void SetDebug(bool debugFlag)

Set the value of the debug flag. A true value turns debugging on.

Type:

C++

SetEditable

virtual void SetEditable(bool _arg)

Specify whether this dataset is editable after creation. Meaning, once the points and cells are defined, can the dataset be incrementally modified. By default, this dataset is non-editable (i.e., “static”) after construction. The reason for this is performance: cell links and locators can be built (and destroyed) much faster is it is known that the data is static (see vtkStaticCellLinks, vtkStaticPointLocator, vtkStaticCellLocator).

Type:

C++

SetFieldData

virtual void SetFieldData(vtkFieldData *)

Assign or retrieve a general field data to this data object.

Type:

C++

SetGlobalReleaseDataFlag

static void SetGlobalReleaseDataFlag(vtkTypeBool val)

Turn on/off flag to control whether every object releases its data after being used by a filter.

Type:

C++

SetGlobalWarningDisplay

static void SetGlobalWarningDisplay(vtkTypeBool val)

This is a global flag that controls whether any debug, warning or error messages are displayed.

Type:

C++

SetInformation

virtual void SetInformation(vtkInformation *)

Type:

C++

SetLines

void SetLines(vtkCellArray *l)

Set the cell array defining lines.

Type:

C++

virtual void SetLinks(vtkAbstractCellLinks *links)

Set/Get the links that you created possibly without using BuildLinks.

Note: Only vtkCellLinks are currently supported.

Type:

C++

SetMemkindDirectory

static void SetMemkindDirectory(const char *directoryname)

The name of a directory, ideally mounted -o dax, to memory map an extended memory space within. This must be called before any objects are constructed in the extended space. It can not be changed once setup.

Type:

C++

SetObjectName

virtual void SetObjectName(const std::string &objectName)

Set/get the name of this object for reporting purposes. The name appears in warning and debug messages and in the Print output. Setting the object name does not change the MTime and does not invoke a ModifiedEvent. Derived classes implementing copying methods are expected not to copy the ObjectName.

Type:

C++

SetPointDataActiveScalarInfo
int,

numComponents:int) -> None

C++: static void SetPointDataActiveScalarInfo(

vtkInformation *info, int arrayType, int numComponents)

Convenience version of previous method for use (primarily) by the Imaging filters. If arrayType or numComponents == -1, the value is not changed.

Type:

SetPointDataActiveScalarInfo(info

Type:

vtkInformation, arrayType

SetPointLocator

virtual void SetPointLocator(vtkAbstractPointLocator *)

Set / get an instance of vtkAbstractPointLocator which is used to support the FindPoint() and FindCell() methods. By default a vtkStaticPointLocator is used, unless the class is set as Editable, in which case a vtkPointLocator is used.

Type:

C++

SetPoints

virtual void SetPoints(vtkPoints *)

Specify point array to define point coordinates.

Type:

C++

SetPolys

void SetPolys(vtkCellArray *p)

Set the cell array defining polygons.

Type:

C++

SetReferenceCount

void SetReferenceCount(int)

Sets the reference count. (This is very dangerous, use with care.)

Type:

C++

SetStrips

void SetStrips(vtkCellArray *s)

Set the cell array defining triangle strips.

Type:

C++

SetVerts

void SetVerts(vtkCellArray *v)

Set the cell array defining vertices.

Type:

C++

ShallowCopy

void ShallowCopy(vtkDataObject *src) override;

Shallow and Deep copy.

Type:

C++

Squeeze

void Squeeze() override;

Recover extra allocated memory when creating data whose initial size is unknown. Examples include using the InsertNextCell() method, or when using the CellArray::EstimateSize() method to create vertices, lines, polygons, or triangle strips.

Type:

C++

UnRegister

virtual void UnRegister(vtkObjectBase* o)

Decrease the reference count (release by another object). This has the same effect as invoking Delete() (i.e., it reduces the reference count by 1).

Type:

C++

UpdateCellGhostArrayCache

void UpdateCellGhostArrayCache()

Updates the pointer to the cell ghost array.

Type:

C++

UpdatePointGhostArrayCache

void UpdatePointGhostArrayCache()

Updates the pointer to the point ghost array.

Type:

C++

UsesGarbageCollector

bool UsesGarbageCollector() override;

Overwritten to handle the data/locator loop

Type:

C++

VERTEX = 4
VERTEX_DATA_VECTOR

static vtkInformationInformationVectorKey *VERTEX_DATA_VECTOR( )

Type:

C++

property color_by: str
property data: Dict[str, PolyDataMetaData]

Get data for this Polydata.

The keys are the name for each data and the values are the visualization metadata.