opentps.gui.viewer package

Subpackages

Submodules

opentps.gui.viewer.dataExplorer module

class DataExplorer(viewController, parent=None)

Bases: QMainWindow

opentps.gui.viewer.dataViewer module

class DataViewer(viewController)

Bases: QWidget

This class displays the type of viewer specified as input and a toolbar to switch between them. All viewers are cached for responsiveness. Example:

dataViewer = DataViewer(viewController)
dataViewer.viewerMode = dataViewer.ViewerModes.STATIC # Static mode (for data which are not time series)
dataViewer.displayType = dataViewer.ViewerTypes.VIEWER_IMAGE # Show an image viewer
dataViewe.displayMode = dataViewer.ViewerTypes.VIEWER_DVH # Switch to a DVH viewer

Currently the DataViewer has its own logic based on events in viewController. Should we have a controller to specifically handle the logical part?

class DisplayModes(value)

Bases: Enum

viewer modes

DEFAULT = 'STATIC'
DYNAMIC = 'DYNAMIC'
STATIC = 'STATIC'
class DisplayTypes(value)

Bases: Enum

viewer types

DEFAULT = 'DISPLAY_IMAGE3D'
DISPLAY_DVH = 'DISPLAY_DVH'
DISPLAY_IMAGE2D = 'DISPLAY_IMAGE2D'
DISPLAY_IMAGE3D = 'DISPLAY_IMAGE3D'
DISPLAY_IMAGE3D_3D = 'DISPLAY_IMAGE3D_3D'
DISPLAY_PROFILE = 'DISPLAY_PROFILE'
NONE = None
class DropModes(value)

Bases: Enum

An enumeration.

AUTO = 'auto'
DEFAULT = 'auto'
PRIMARY = 'primary'
SECONDARY = 'secondary'
property cachedDynamicImage2DViewer: DynamicImage2DViewer

The dynamic 2D image viewer currently in cache (read-only)

Type:

Dynamic2DImageViewer

property cachedDynamicImage3DViewer: DynamicImage3DViewer

The dynamic 3D image viewer currently in cache (read-only)

Type:

Dynamic3DImageViewer

property cachedStaticDVHViewer: DVHViewer

The DVH viewer currently in cache

property cachedStaticImage2DViewer: Image2DViewer

The static image 2D viewer currently in cache (read-only)

Type:

Image2DViewer

property cachedStaticImage3DViewer: Image3DViewer

The static image 3D viewer currently in cache (read-only)

Type:

Image3DViewer

property cachedStaticImage3DViewer_3D: Image3DViewer_3D
property cachedStaticProfileViewer: ProfileViewer

The profile viewer currently in cache (read-only)

Type:

ProfilePlot

closeEvent(self, QCloseEvent)
property currentViewer: DVHViewer | ProfileViewer | Image3DViewer | None

The viewer currently displayed (read-only)viewerTypes

Type:

Optional[Union[DVHViewer, ProfilePlot, ImageViewer]]

property displayMode

The mode of the viewer can be dynamic for dynamic data (time series) or static for static data

property displayType

The display type of the data viewer tells whether a image viewer, a dvh viewer, … is displayed

Type:

DataViewer.viewerTypes

property dropEnabled: bool

Drag and drop enabled

Type:

bool

property dropMode
enableDrop(enabled)
setDisplayTypeAndMode(args)

This should be used instead of the displayType and displayMode setters when the type and mode change simultaneously, for example when passing from a 3D dynamic image to a 2D static image or DVH plot

Parameters:

args

class DroppedObject(dropType, droppedData)

Bases: object

This class aims to standardized object dropping TODO: we might want to move this to another file

class DropTypes

Bases: object

IMAGE = 'IMAGE'
PLAN = 'PLAN'

opentps.gui.viewer.doseComparisonDataViewer module

class DoseComparisonDataViewer(viewController)

Bases: DataViewer

property comparisonMetric

opentps.gui.viewer.dynamicDisplayController module

class DynamicDisplayController(viewController)

Bases: object

addDynamicViewer(viewer)
checkIfUpdate()

This function checks if an update must occur at this time. It only works for dynamic3DSequences for now.

connectToolBar()
lookForClosestIndex(time, curIndex, timingsList, dataViewer)

This function return the index of the last position in timingList lower than time, meaning the time has passed this event and an update must occur. If the curIndex has reached the end of the timingsList, it returns 0

playFaster()
playOrPause(playPauseBool)
playSlower()
removeDynamicViewer(viewer)
setRefreshRate(refreshRate)
setToolBar(viewerPanelToolBar)
switchDynamicMode()

This function switches the mode from dynamic to static and inversely. It starts or stops the timer accordingly.

opentps.gui.viewer.exportWindow module

class ExportTable(parent=None)

Bases: QWidget

property exportConfig: ExportConfig
class ExportWindow(viewController)

Bases: QMainWindow

opentps.gui.viewer.grid module

class Grid(viewController, parent)

Bases: QWidget

appendGridElement(gridElement)
property gridElements
removeGridElement(gridElement)

opentps.gui.viewer.gridFourElements module

class GridFourElements(viewController, parent)

Bases: Grid

closeEvent(self, QCloseEvent)
resizeEvent(self, QResizeEvent)
setEqualSize()
class VerticalSplitter(parent)

Bases: QSplitter

resizeEvent(self, QResizeEvent)
setEqualSize()

opentps.gui.viewer.viewerPanel module

class ViewerPanel(viewController, parent)

Bases: QWidget

class LayoutTypes(value)

Bases: Enum

An enumeration.

DEFAULT = 'GRID_2BY2'
GRID_2BY2 = 'GRID_2BY2'
closeEvent(self, QCloseEvent)
property dropEnabled: bool

Drag and drop enabled

Type:

bool

property layoutType: LayoutTypes

Layout type defined in ViewerPanel.LayoutTypes

property onDropEvent

Function to execute on drop event

opentps.gui.viewer.viewerToolbar module

class RefreshRateDialog(refreshRateValue)

Bases: QDialog

sliderval()
class ViewerToolbar(viewController, parent=None)

Bases: QToolBar

PAUSE_STATUS = 0
PLAY_STATUS = 1
addDynamicButtons()
removeDynamicButtons()

Module contents