fsleyes.actions.saveflirtxfm

This module provides the SaveFlirtXfmAction class, an Action which allows the user to save an Image transformation to disk for use with FLIRT.

class fsleyes.actions.saveflirtxfm.SaveFlirtXfmAction(overlayList, displayCtx, frame)

Bases: fsleyes.actions.base.Action

The SaveFlirtXfmAction class is an Action which allows the user to save an Image transformation to disk, either as a FLIRT matrix, or a voxel-to-world matrix.

__init__(overlayList, displayCtx, frame)

Create a SaveFlirtXfmAction.

Parameters:
destroy()

Must be called when this SaveFlirtXfmAction is no longer needed.

_SaveFlirtXfmAction__saveFlirtXfm()

Called when this action is executed. Prompts the user to save a FLIRT transform for the currently selected image.

_SaveFlirtXfmAction__selectedOverlayChanged(*a)

Called when the DisplayContext.selectedOverlay changes. Updates the Action.enabled state of this action.

__module__ = 'fsleyes.actions.saveflirtxfm'
fsleyes.actions.saveflirtxfm.calculateTransform(overlay, overlayList, displayCtx, refFile, srcXform=None)

Calculates and returns FLIRT transformation from the given overlay to the image specified by the given refFile.