From 448f28718b0d7fe74e985aff806604ca59d1ea20 Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauld.mccarthy@gmail.com> Date: Fri, 24 Oct 2014 10:07:39 +0100 Subject: [PATCH] Bugfix - transform.axisBounds was assuming image shape of 3 dimensions. --- fsl/fslview/displaycontext.py | 2 +- fsl/utils/transform.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fsl/fslview/displaycontext.py b/fsl/fslview/displaycontext.py index 3f0d17db5..4b047ebac 100644 --- a/fsl/fslview/displaycontext.py +++ b/fsl/fslview/displaycontext.py @@ -565,7 +565,7 @@ class DisplayContext(props.HasProperties): for ax in range(3): - lo, hi = transform.axisBounds(img.shape, xform, ax) + lo, hi = transform.axisBounds(img.shape[:3], xform, ax) if lo < minBounds[ax]: minBounds[ax] = lo if hi > maxBounds[ax]: maxBounds[ax] = hi diff --git a/fsl/utils/transform.py b/fsl/utils/transform.py index 6304e6b18..cf331bfa9 100644 --- a/fsl/utils/transform.py +++ b/fsl/utils/transform.py @@ -25,7 +25,7 @@ def concat(x1, x2): def axisBounds(shape, xform, axis): """Returns the (lo, hi) bounds of the specified axis.""" - x, y, z = shape + x, y, z = shape[:3] x -= 0.5 y -= 0.5 -- GitLab