fsleyes.displaycontext.canvasopts
¶
This module provides the following classes:
SliceCanvasOpts
(for theSliceCanvas
)
LightBoxCanvasOpts
(for theLightBoxCanvas
)
Scene3DCanvasOpts
(for theScene3DCanvas
)
These classes contain the definitions of properties which are available on the corresponding canvas class.
These classes are defined independently of the SliceCanvas
(and
other) classes so they can be inspected without having to import the
slicecanvas
(and other) modules, e.g. during command line argument
parsing.
-
class
fsleyes.displaycontext.canvasopts.
SliceCanvasOpts
[source]¶ Bases:
__main__.docbuilder.run.<locals>.MockClass
The
SliceCanvasOpts
class defines all of the display settings for aSliceCanvas
.-
pos
= <MagicMock name='mock.Point()' id='139656528818816'>¶ The currently displayed position.
The
pos.x
andpos.y
positions denote the position of a cursor, which is highlighted with crosshairs (see theshowCursor
property). Thepos.z
position specifies the currently displayed slice.
-
zoom
= <MagicMock name='mock.Percentage()' id='139656529194096'>¶ The
DisplayContext.bounds
are divided by this zoom factor to produce the canvas display bounds.
-
displayBounds
= <MagicMock name='mock.Bounds()' id='139656530358912'>¶ The display bound x/y values specify the horizontal/vertical display range of the canvas, in display coordinates. This may be a larger area than the size of the displayed overlays, as it is adjusted to preserve the aspect ratio.
-
showCursor
= <MagicMock name='mock.Boolean()' id='139656535298112'>¶ If
False
, the crosshairs which show the current cursor location will not be drawn.
-
cursorGap
= <MagicMock name='mock.Boolean()' id='139656535298112'>¶ If
True
, and the currently selected overlay is aNifti
instance, a gap will be shown at the cursor centre (i.e. the current voxel).
-
zax
= <MagicMock name='mock.Choice()' id='139656530956688'>¶ The display coordinate system axis to be used as the screen depth axis. The
xax()
andyax()
attributes are derived from this property:If
zax == 0
,xax, yax == 1, 2
If
zax == 1
,xax, yax == 0, 2
If
zax == 2
,xax, yax == 0, 1
-
invertX
= <MagicMock name='mock.Boolean()' id='139656535298112'>¶ If
True
, the display is inverted along the X (horizontal screen) axis.
-
invertY
= <MagicMock name='mock.Boolean()' id='139656535298112'>¶ If
True
, the display is inverted along the Y (vertical screen) axis.
-
cursorColour
= <MagicMock name='mock.Colour()' id='139656530836304'>¶ Canvas cursor colour.
-
bgColour
= <MagicMock name='mock.Colour()' id='139656530836304'>¶ Canvas background colour.
-
renderMode
= <MagicMock name='mock.Choice()' id='139656530956688'>¶ How the
GLObject
instances are rendered to the canvas.See the
SliceCanvas
for more details.
-
highDpi
= <MagicMock name='mock.Boolean()' id='139656535298112'>¶ If FSLeyes is being displayed on a high-DPI screen, try to display the scene at full resolution.
-
property
xax
¶ The display coordinate system axis which maps to the X (horizontal) canvas axis.
-
property
yax
¶ The display coordinate system axis which maps to the Y (vertical) canvas axis.
-
__module__
= 'fsleyes.displaycontext.canvasopts'¶
-
-
class
fsleyes.displaycontext.canvasopts.
LightBoxCanvasOpts
[source]¶ Bases:
fsleyes.displaycontext.canvasopts.SliceCanvasOpts
The
LightBoxCanvasOpts
class defines the display settings available onLightBoxCanvas
instances.-
sliceSpacing
= <MagicMock name='mock.Real()' id='139656530885120'>¶ This property controls the spacing between slices in the display coordinate system.
-
ncols
= <MagicMock name='mock.Int()' id='139656530412256'>¶ This property controls the number of slices to be displayed on a single row.
-
nrows
= <MagicMock name='mock.Int()' id='139656530412256'>¶ This property controls the number of rows to be displayed on the canvas.
-
topRow
= <MagicMock name='mock.Int()' id='139656530412256'>¶ This property controls the (0-indexed) row to be displayed at the top of the canvas, thus providing the ability to scroll through the slices.
-
__module__
= 'fsleyes.displaycontext.canvasopts'¶
-
zrange
= <MagicMock name='mock.Bounds()' id='139656530358912'>¶ This property controls the range, in display coordinates, of the slices to be displayed.
-
showGridLines
= <MagicMock name='mock.Boolean()' id='139656535298112'>¶ If
True
, grid lines are drawn between the displayed slices.
-
highlightSlice
= <MagicMock name='mock.Boolean()' id='139656535298112'>¶ If
True
, a box will be drawn around the slice containing the current location.
-
-
class
fsleyes.displaycontext.canvasopts.
Scene3DCanvasOpts
(*args, **kwargs)[source]¶ Bases:
__main__.docbuilder.run.<locals>.MockClass
The
Scene3DCanvasOpts
class defines the display settings available onScene3DCanvas
instances.-
__module__
= 'fsleyes.displaycontext.canvasopts'¶
-
pos
= <MagicMock name='mock.Point()' id='139656528776304'>¶ Current cursor position in the display coordinate system. The dimensions are in the same ordering as the display coordinate system, in contrast to the
SliceCanvasOpts.pos
property.
-
showCursor
= <MagicMock name='mock.Boolean()' id='139656528776400'>¶
-
cursorColour
= <MagicMock name='mock.Colour()' id='139656528776448'>¶
-
bgColour
= <MagicMock name='mock.Colour()' id='139656528776496'>¶
-
zoom
= <MagicMock name='mock.Percentage()' id='139656528776544'>¶
-
highDpi
= <MagicMock name='mock.Boolean()' id='139656528776592'>¶
-
showLegend
= <MagicMock name='mock.Boolean()' id='139656535298112'>¶ If
True
, an orientation guide will be shown on the canvas.
-
legendColour
= <MagicMock name='mock.Colour()' id='139656530836304'>¶ Colour to use for the legend text.
-
occlusion
= <MagicMock name='mock.Boolean()' id='139656535298112'>¶ If
True
, objects closer to the camera will occlude objects further away. Togglesgl.DEPTH_TEST
.
-
light
= <MagicMock name='mock.Boolean()' id='139656535298112'>¶ If
True
, a lighting effect is applied to compatible overlays in the scene.
-
lightPos
= <MagicMock name='mock.Point()' id='139656528818816'>¶ Light position in the display coordinate system.
-
offset
= <MagicMock name='mock.Point()' id='139656528818816'>¶ An offset, in X/Y pixels normalised to the range
[-1, 1]
, from the centre of theScene3DCanvas
.
-
rotation
= <MagicMock name='mock.Array()' id='139656528693232'>¶ A rotation matrix which defines the current
Scene3DCanvas
view orientation. This rotation is defined in terms of the display coordinate system (defined by theDisplayContext.bounds
), and applied to the scene that is being displayed.
-