fsleyes.displaycontext.maskopts
This module provides the MaskOpts
class, which defines settings
for displaying an Image
overlay as a binary mask.
- class fsleyes.displaycontext.maskopts.MaskOpts(overlay, *args, **kwargs)[source]
Bases:
fsleyes.displaycontext.niftiopts.NiftiOpts
The
MaskOpts
class defines settings for displaying anImage
overlay as a binary mask.- threshold = <MagicMock name='mock.Bounds()' id='4118014680'>
The mask threshold range - values outside of this range are not displayed.
- invert = <MagicMock name='mock.Boolean()' id='4118803744'>
If
True
, thethreshold
range is inverted - values inside the range are not shown, and values outside of the range are shown.
- colour = <MagicMock name='mock.Colour()' id='4118213728'>
The mask colour.
- outline = <MagicMock name='mock.Boolean()' id='4118803744'>
If
True
only the outline of the mask will be shown. IfFalse
, the filled mask will be displayed.
- outlineWidth = <MagicMock name='mock.Int()' id='4117859440'>
Width of mask outline, if :attr:
outline` is ``True
. This value is in terms of pixels.
- interpolation = <MagicMock name='mock.Choice()' id='4117767408'>
- __init__(overlay, *args, **kwargs)[source]
Create a
MaskOpts
instance for the given overlay. All arguments are passed through to theNiftiOpts
constructor.
- __annotations__ = {}
- __module__ = 'fsleyes.displaycontext.maskopts'
- __colourChanged(*a)
Called when
colour
changes. UpdatesDisplay.alpha
from the alpha component.
- __alphaChanged(*a)
Called when
Display.alpha
changes. Updates the alpha component ofcolour
.