Skip to content
Snippets Groups Projects
Commit 6572a97d authored by Paul McCarthy's avatar Paul McCarthy
Browse files

X/Y/Z canvas centre command line argument is now working. Its semantics

will change soon though.
parent 90049ff5
No related branches found
No related tags found
No related merge requests found
......@@ -564,8 +564,9 @@ HELP = td.TypeDict({
# TODO how about other overlay types?
'Main.voxelLoc' : 'Location to show (voxel coordinates of '
'first overlay)',
'Main.worldLoc' : 'Location to show (world coordinates, '
'takes precedence over --voxelloc)',
'Main.worldLoc' : 'Location to show (world coordinates of '
'first overlay, takes precedence over '
'--voxelloc)',
'Main.selectedOverlay' : 'Selected overlay (default: last)',
'Main.autoDisplay' : 'Automatically configure display settings to '
'overlays (unless any display settings are '
......
......@@ -30,6 +30,7 @@ import fsl.fsleyes.displaycontext as displaycontext
import fsl.fsleyes.perspectives as perspectives
import fsl.fsleyes.overlay as fsloverlay
import fsl.utils.status as status
import fsl.utils.async as async
log = logging.getLogger(__name__)
......@@ -240,7 +241,18 @@ def interface(parent, args, ctx):
fsleyes_parseargs.applySceneArgs(
args, overlayList, displayCtx, viewOpts)
def centre():
if args.xcentre:
viewPanel.getXCanvas().centreDisplayAt(*args.xcentre)
if args.ycentre:
viewPanel.getYCanvas().centreDisplayAt(*args.ycentre)
if args.zcentre:
viewPanel.getZCanvas().centreDisplayAt(*args.zcentre)
if isinstance(viewPanel, views.OrthoPanel):
async.idle(centre)
return frame
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment