OpenPivGui

A simple GUI for OpenPIV.

class openpivgui.OpenPivGui.OpenPivGui

Simple OpenPIV GUI

Usage:

  1. Press »File« and then »Import files« or »Import directory«. Either select some image pairs (Ctrl + Shift) or a directory that contains image files.
  2. Click on the links in the file-list on the right to inspect the images.
  3. Walk through the drop-down-menues »General«, »Preprocessing«, and »Analysis« and edit the parameters.
  4. Press the »start processing« butten (bottom left), to start the processing chain.
  5. Inspect the results by clicking on the links in the file-list. Use the »Plot« drop-down menu for changing the plot parameters.
  6. Use the »back« and »forward« buttons to go back to the images, in case you want to repeat the evaluation.
  7. For post-processing, use the »back« and »forward« buttons« to list the vector files. Modify the Post-Processing parameters and hit the »start post-processing« button.

See also:

https://github.com/OpenPIV/openpiv_tk_gui

delete_files()

Delete files currently listed in the file list.

destroy()

Destroy the OpenPIV GUI.

Settings are automatically saved.

destroy_for_new_addins() → None

used to destroy the active object of the GUI and reinitialize it for inserting the addin methods and buttons

Returns:None
file_filter(files, pattern)

Filter a list of files to match a pattern.

Parameters:
  • files (str[]) – A list of pathnames.
  • pattern (str) – A regular expression for filtering the list.
Returns:

List items that match the pattern.

Return type:

str[]

get_filelistbox()

Return a handle to the file list widget.

Returns:A handle to the listbox widget holding the filenames
Return type:tkinter.Listbox
get_settings()

Copy widget variables to the parameter object.

load_pandas(fname)

Load files in a pandas data frame.

On the rider named General, the parameters for loading the data frames can be specified. No parameters have to be set for image processing.

Parameters:fname – A filename.
Returns:In case of an error, the errormessage is returned (str).
Return type:pandas.DataFrame
load_settings()

Load settings from a JSON file.

log(columninformation=None, timestamp=False, text=None, group=None)

Add an entry to the lab-book.

The first initialized text-area is assumed to be the lab-book. It is internally accessible by self.ta[0].

Parameters:
  • timestamp (bool) – Print current time. Pattern: yyyy-mm-dd hh:mm:ss. (default: False)
  • text (str) – Print a text, a linebreak is appended. (default None)
  • group (int) – Print group of parameters. (e.g. OpenPivParams.PIVPROC)
  • columninformation (list) – Print column information of the selected file.

Example

log(text=’processing parameters:’,
group=OpenPivParams.POSTPROC)
move_files()

Move files to a new place.

navigate(direction)

Navigate through processing steps.

Display a filtered list of files of the current directory. This function cycles through the filters specified by the key ‘navi_pattern’ in the settings object.

Parameters:direction (str) – ‘back’ or ‘forward’.
open_directory()

Show a dialog for opening a directory.

readme()

Opens https://github.com/OpenPIV/openpiv_tk_gui.

reset_params()

Reset parameters to default values.

select_image_files()

Show a file dialog to select one or more filenames.

set_settings()

Copy values of the parameter object to widget variables.

show(fname)

Display a file.

This method distinguishes vector data (file extensions txt, dat, jvc,vec and csv) and images (all other file extensions).

Parameters:fname (str) – A filename.
show_img(fname)

Display an image.

Parameters:
  • fname (str) –
  • of an image file. (Pathname) –
show_informations(fname)

Shows the column names of the chosen file in the labbook.

Parameters:fname (str) – A filename.
start_postprocessing()

Wrapper function to start processing in a separate thread.

start_processing()

Wrapper function to start processing in a separate thread.

class openpivgui.OpenPivGui.ToggledFrame(parent, text='', *args, **options)