apps Package

A package regrouping some graphical utilities to help working with

synchrotron data.

View Module

class pymicro.apps.View.View(arg)

Bases: object

Quick visualisation of various instances at use in pymicro.

This class provides a way to quickly visualise an instance of a particular class. A 3D scene is then created with default settings and the actor added to the scene. The following types are supported:

  • str: the load_STL_actor method is called to create the actor;

  • Grain: the grain_3d method is called to create the actor;

  • Orientation: A cube is created and rotated according to the passive orientation matrix;

  • Lattice: the lattice_3d method is called to create the actor;

  • numpy array: the show_array method is called to create the actor;

  • vtk actor: the actor is directly added to the scene.

The key_pressed_callback is activated so it is possible to save an image using the ‘s’ key.

ImageViewer Module

class pymicro.apps.ImageViewer.PlotWidget(parent=None, image=None, toolbar=True)

Bases: QWidget

create_main_widget()
set_image(image)
set_fliplr(state)
set_flipud(state)
on_key_press(event)
on_draw()
class pymicro.apps.ImageViewer.ImageViewerForm(parent=None, images=None, image_type='path')

Bases: QMainWindow

get_image_number()
create_main_frame(image)
on_cmap_selected(text)
on_prev_image()
on_next_image()
get_image_data()
load_image(image_path)
class pymicro.apps.ImageViewer.ImageViewer(args)

Bases: QApplication