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

Imports moved into function in globject, as circular import issue was occuring

parent 15eb7aa5
No related branches found
No related tags found
No related merge requests found
...@@ -18,20 +18,20 @@ GL Objects must have the following methods: ...@@ -18,20 +18,20 @@ GL Objects must have the following methods:
import logging import logging
log = logging.getLogger(__name__) 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 = { import fsl.fslview.gl.glimage as glimage
'volume' : glimage .GLImage, import fsl.fslview.gl.glcircle as glcircle
'circle' : glcircle .GLCircle, import fsl.fslview.gl.gltensorline as gltensorline
'tensor' : gltensorline.GLTensorLine
}
def createGLObject(image, display): _objectmap = {
'volume' : glimage .GLImage,
'circle' : glcircle .GLCircle,
'tensor' : gltensorline.GLTensorLine
}
ctr = _objectmap.get(display.imageType, None) ctr = _objectmap.get(display.imageType, None)
...@@ -46,8 +46,8 @@ def calculateSamplePoints(image, display, xax, yax): ...@@ -46,8 +46,8 @@ def calculateSamplePoints(image, display, xax, yax):
This function returns a tuple containing: This function returns a tuple containing:
- a numpy array of shape `(N, 3)`, containing the coordinates of the centre - a numpy array of shape `(N, 3)`, containing the coordinates of the
of every sampling point in real worl space. centre of every sampling point in real world space.
- the horizontal distance (along xax) between adjacent points - the horizontal distance (along xax) between adjacent points
......
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