fsleyes.plugins.profiles.samplelineprofile

This module provides the SampleLineProfile class, an interaction Profile for OrthoPanel views, which is used by the SampleLinePanel.

class fsleyes.plugins.profiles.samplelineprofile.SampleLineProfile(viewPanel, overlayList, displayCtx)[source]

Bases: fsleyes.profiles.orthoviewprofile.OrthoViewProfile

The SampleLineProfile class is a Profile for the OrthoPanel class, which allows the user to draw a line on a canvas. The SampleLinePanel will then sample values along that line from the currently selected overlay, and display them on a plot.

static tempModes()[source]

Returns the temporary mode map for the SampleLineProfile, which controls the use of modifier keys to temporarily enter other interaction modes.

static altHandlers()[source]

Returns the alternate handlers map, which allows event handlers defined in one mode to be re-used whilst in another mode.

__init__(viewPanel, overlayList, displayCtx)[source]

Create a SampleLineProfile.

Parameters
destroy()[source]

Called when this SampleLineProfile is no longer used. Clears the current line annotation, if there is one, then calls the base class destroy method.

property sampleLine

Returns a reference to the Line annotation that has most recently been drawn, or None if no line has been drawn.

property sampleStart

Return the (x, y, z) display coordinates of the start of the most recently drawn line, or None if no line has been drawn.

property sampleEnd

Return the (x, y, z) display coordinates of the end of the most recently drawn line, or None if no line has been drawn.

_sampleModeLeftMouseDown(ev, canvas, mousePos, canvasPos)[source]

Adds a new line annotation.

_sampleModeLeftMouseDrag(ev, canvas, mousePos, canvasPos)[source]

Adjust the line end point so it tracks the mouse location.

__annotations__ = {}
__module__ = 'fsleyes.plugins.profiles.samplelineprofile'