Flip/rotate dialog

The FlipRotate module provides a dialog box providing essential GUI elements for rotating (arbitrary angle) and cropping an image:

Reference

class plotpy.widgets.fliprotate.FlipRotateDialog(parent: QWidget, title: str | None = None, options: PlotOptions | dict[str, Any] | None = None, resize_to: tuple[int, int] | None = None, edit: bool = True, toolbar: bool = False)[source]

Flip & Rotate Dialog

Flip and rotate a TrImageItem plot item

Parameters:
  • parent – Parent widget

  • title – Window title

  • options – Options

  • resize_to – Resize to (width, height)

  • edit – Edit mode

  • toolbar – Show toolbar

add_buttons_to_layout(layout: QBoxLayout, edit: bool) None[source]

Add buttons to layout

Parameters:
  • layout – Layout

  • edit – Edit mode

class plotpy.widgets.fliprotate.FlipRotateWidget(parent: QWidget, toolbar: bool = False, options: PlotOptions | dict[str, Any] | None = None)[source]

Flip & Rotate Widget

Flip and rotate a TrImageItem plot item

Parameters:
  • parent – Parent widget

  • toolbar – Show toolbar

  • options – Plot options

add_buttons_to_layout(layout: QBoxLayout) None[source]

Add tool buttons to layout

Parameters:

layout – Layout

apply_transformation() None[source]

Apply transformation

reset() None[source]

Reset transformation

set_parameters(angle: float, hflip: bool, vflip: bool) None[source]

Set transform parameters

Parameters:
  • angle – Angle

  • hflip – Horizontal flip

  • vflip – Vertical flip

get_parameters() tuple[float, bool, bool][source]

Return transform parameters

Returns:

Tuple of angle, horizontal flip, vertical flip