diff --git a/fsl/fslview/gl/globject.py b/fsl/fslview/gl/globject.py index 10487fba2e8e30cf626ea998f98b1c7b91d4ee1e..43022578080a49174e97d08c56f62928d66a7c7b 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