Transform

Reverse Image Data Axii

class PVGeo.grids.transform.ReverseImageDataAxii(axes=(True, True, True))[source]

Bases: FilterBase

This filter will flip vtkImageData on any of the three cartesian axii. A checkbox is provided for each axis on which you may desire to flip the data.

RequestData(request, inInfo, outInfo)[source]

Used by pipeline to generate output.

_reverse_grid_axes(idi, ido)[source]

Internal helper to reverse data along specified axii

set_flip_x(flag)[source]

Set the filter to flip th input data along the X-axis

set_flip_y(flag)[source]

Set the filter to flip th input data along the Y-axis

set_flip_z(flag)[source]

Set the filter to flip th input data along the Z-axis

Table To Time Grid

class PVGeo.grids.transform.TableToTimeGrid(extent=(10, 10, 10, 1), order='C', spacing=(1.0, 1.0, 1.0), origin=(0.0, 0.0, 0.0), dims=(0, 1, 2, 3), dt=1.0, points=False, **kwargs)[source]

Bases: FilterBase

A filter to convert a static (no time variance) table to a time varying grid. This effectively reashapes a table full of data arrays as a 4D array that is placed onto the CellData of a vtkImageData object.

Modified(run_again=True)[source]

Call modified if the filter needs to run again

RequestData(request, inInfo, outInfo)[source]

Used by pipeline to generate output

RequestInformation(request, inInfo, outInfo)[source]

Used by pipeline to set whole output extent.

_build_image_data(img)[source]

Internal helper to construct the output

_set_data(table)[source]

Internal helper to restructure the input table arrays

_update_time_steps()[source]

For internal use only: appropriately sets the timesteps.

get_time_step_values()[source]

Use this in ParaView decorator to register timesteps on the pipeline.

modified(run_again=True)[source]

Call modified if the filter needs to run again

set_dimensions(x, y, z, t)[source]

Set the dimensions of the output grid

set_extent(nx, ny, nz, nt)[source]

Set the extent of the output grid

set_order(order)[source]

Set the reshape order (‘C’ or ‘F’)

set_origin(x0, y0, z0)[source]

Set the origin of the output vtkImageData

set_spacing(dx, dy, dz)[source]

Set the spacing for the points along each axial direction

set_time_delta(dt)[source]

An advanced property to set the time step in seconds.

set_use_points(flag)[source]

Set whether or not to place the data on the nodes/cells of the grid. True places data on nodes, false places data at cell centers (CellData). In ParaView, switching can be a bit buggy: be sure to turn the visibility of this data object OFF on the pipeline when changing between nodes/cells.

Translate Grid Origin

class PVGeo.grids.transform.TranslateGridOrigin(corner=1)[source]

Bases: FilterBase

This filter will translate the origin of vtkImageData to any specified Corner of the data set assuming it is currently in the South West Bottom Corner (will not work if Corner was moved prior).

RequestData(request, inInfo, outInfo)[source]

Used by pipeline to generate output.

_translate(pdi, pdo)[source]

Internal helper to translate the inputs origin

set_corner(corner)[source]

Set the corner to use

Parameters:

corner (int) – corner location; see note.

Note

  • 1: South East Bottom

  • 2: North West Bottom

  • 3: North East Bottom

  • 4: South West Top

  • 5: South East Top

  • 6: North West Top

  • 7: North East Top