Table Operations

Combine Tables

class PVGeo.filters.tables.CombineTables[source]

Bases: PVGeo.base.FilterBase

Takes two tables and combines them if they have the same number of rows.

Apply(table0, table1)[source]

Update the algorithm and get the output data object

FillInputPortInformation(port, info)[source]

Used by pipeline. Necessary when dealing with multiple input ports

RequestData(request, inInfo, outInfo)[source]

Used by pipeline to generate output

Extract Array

class PVGeo.filters.tables.ExtractArray[source]

Bases: PVGeo.base.FilterBase

Extract an array from a vtkDataSet and make a vtkTable of it.

Apply(inputDataObject, arrayName)[source]

Update the algorithm and get the output data object

RequestData(request, inInfo, outInfo)[source]

Used by pipeline to generate output

SetInputArrayToProcess(idx, port, connection, field, name)[source]

Used to set the input array(s)

Parameters:
  • idx (int) – the index of the array to process
  • port (int) – input port (use 0 if unsure)
  • connection (int) – the connection on the port (use 0 if unsure)
  • field (int) – the array field (0 for points, 1 for cells, 2 for field, and 6 for row)
  • name (int) – the name of the array

Reshape Table

class PVGeo.filters.tables.ReshapeTable(**kwargs)[source]

Bases: PVGeo.base.FilterBase

This filter will take a vtkTable object and reshape it. This filter essentially treats vtkTable``s as 2D matrices and reshapes them using ``numpy.reshape in a C contiguous manner. Unfortunately, data fields will be renamed arbitrarily because VTK data arrays require a name.

AddName(name)[source]

Use to append a name to the list of data array names for the output table

GetNames()[source]
RequestData(request, inInfo, outInfo)[source]

Used by pipeline

SetNames(names)[source]

Set names using a semicolon (;) seperated string or a list of strings

Parameters:names (string) – a string of data array names for the reshaped table using a semicolon (;) to spearate
SetNumberOfColumns(ncols)[source]

Set the number of columns for the output vtkTable

SetNumberOfRows(nrows)[source]

Set the number of rows for the output vtkTable

SetOrder(order)[source]

Set the reshape order ('C' of 'F')

_Reshape(pdi, pdo)[source]

Internal helper to perfrom the reshape

Split Table On Array

class PVGeo.filters.tables.SplitTableOnArray[source]

Bases: PVGeo.base.FilterBase

A filter to seperate table data based on the unique values of a given data array into a vtkMultiBlockDataSet.

Apply(inputDataObject, arrayName)[source]

Update the algorithm and get the output data object

RequestData(request, inInfo, outInfo)[source]

Overwritten by subclass to execute the algorithm.

SetInputArrayToProcess(idx, port, connection, field, name)[source]

Used to set the input array(s)

Parameters:
  • idx (int) – the index of the array to process
  • port (int) – input port (use 0 if unsure)
  • connection (int) – the connection on the port (use 0 if unsure)
  • field (int) – the array field (0 for points, 1 for cells, 2 for field, and 6 for row)
  • name (int) – the name of the array