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 an Image overlay as a binary mask.

threshold = <MagicMock name='mock.Bounds()' id='139907488751264'>

The mask threshold range - values outside of this range are not displayed.

invert = <MagicMock name='mock.Boolean()' id='139907488986064'>

If True, the threshold range is inverted - values inside the range are not shown, and values outside of the range are shown.

colour = <MagicMock name='mock.Colour()' id='139907487826944'>

The mask colour.

outline = <MagicMock name='mock.Boolean()' id='139907488986064'>

If True only the outline of the mask will be shown. If False, the filled mask will be displayed.

outlineWidth = <MagicMock name='mock.Int()' id='139907489385920'>

Width of mask outline, if :attr:outline` is ``True. This value is in terms of pixels.

interpolation = <MagicMock name='mock.Choice()' id='139907488543456'>
__init__(overlay, *args, **kwargs)[source]

Create a MaskOpts instance for the given overlay. All arguments are passed through to the NiftiOpts constructor.

__annotations__ = {}
__module__ = 'fsleyes.displaycontext.maskopts'
destroy()[source]

Removes some property listeners and calls NitfiOpts.destroy().

__dataRangeChanged(*a)

Called when the dataRange changes. Updates the threshold limits.

__colourChanged(*a)

Called when colour changes. Updates Display.alpha from the alpha component.

__alphaChanged(*a)

Called when Display.alpha changes. Updates the alpha component of colour.