From 847b7da093096162eb41626edf8b28332e50396b Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauld.mccarthy@gmail.com> Date: Fri, 17 Oct 2014 16:02:06 +0100 Subject: [PATCH] Imports moved into function in globject, as circular import issue was occuring --- fsl/fslview/gl/globject.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/fsl/fslview/gl/globject.py b/fsl/fslview/gl/globject.py index 10487fba2..430225780 100644 --- a/fsl/fslview/gl/globject.py +++ b/fsl/fslview/gl/globject.py @@ -18,20 +18,20 @@ GL Objects must have the following methods: import logging log = logging.getLogger(__name__) -import numpy as np +import numpy as np -import fsl.fslview.gl.glimage as glimage -import fsl.fslview.gl.glcircle as glcircle -import fsl.fslview.gl.gltensorline as gltensorline +def createGLObject(image, display): -_objectmap = { - 'volume' : glimage .GLImage, - 'circle' : glcircle .GLCircle, - 'tensor' : gltensorline.GLTensorLine -} + import fsl.fslview.gl.glimage as glimage + import fsl.fslview.gl.glcircle as glcircle + import fsl.fslview.gl.gltensorline as gltensorline -def createGLObject(image, display): + _objectmap = { + 'volume' : glimage .GLImage, + 'circle' : glcircle .GLCircle, + 'tensor' : gltensorline.GLTensorLine + } ctr = _objectmap.get(display.imageType, None) @@ -46,8 +46,8 @@ def calculateSamplePoints(image, display, xax, yax): This function returns a tuple containing: - - a numpy array of shape `(N, 3)`, containing the coordinates of the centre - of every sampling point in real worl space. + - a numpy array of shape `(N, 3)`, containing the coordinates of the + centre of every sampling point in real world space. - the horizontal distance (along xax) between adjacent points -- GitLab