Plot3DWidget: OpenGL scene widget

This module provides a Qt widget embedding an OpenGL scene.

Plot3DWidget

class silx.gui.plot3d.Plot3DWidget.Plot3DWidget(parent=None)[source]

Bases: PyQt4.QtOpenGL.QGLWidget

QGLWidget with a 3D viewport and an overview.

setProjection(projection)[source]

Change the projection in use.

Parameters:projection (str) – In ‘perspective’, ‘orthographic’.
getProjection()[source]

Return the current camera projection mode as a str.

See setProjection()

setBackgroundColor(color)[source]

Set the background color of the OpenGL view.

Parameters:color (QColor, str or array-like of 3 or 4 float in [0., 1.] or uint8) – RGB color of the isosurface: name, #RRGGBB or RGB values
getBackgroundColor()[source]

Returns the RGBA background color (QColor).

centerScene()[source]

Position the center of the scene at the center of rotation.

resetZoom(face='front')[source]

Reset the camera position to a default.

Parameters:face (str) – The direction the camera is looking at: side, front, back, top, bottom, right, left. Default: front.
grabGL()[source]

Renders the OpenGL scene into a numpy array

Returns:OpenGL scene RGB rasterization
Return type:QImage

Table Of Contents

Previous topic

plot3d: 3D Visualisation widgets

Next topic

Plot3DWindow: OpenGL scene and toolbar

This Page