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

GLImageobject.getDataResolution was returning a single value, when it

needed to return one value per axis. Other minor cosmetic changes.
parent bd361b9c
No related branches found
No related tags found
No related merge requests found
......@@ -11,22 +11,9 @@ all 2D representations of objects in OpenGL.
This module also provides the :func:`createGLObject` function, which provides
mappings between :class:`~fsl.data.image.Image` types, and their corresponding
OpenGL representation.
Some other convenience functions are also provided, for generating
OpenGL vertex data.
"""
import logging
import itertools as it
import numpy as np
import fsl.utils.transform as transform
log = logging.getLogger(__name__)
def createGLObject(image, display):
"""Create :class:`GLObject` instance for the given
:class:`~fsl.data.image.Image` instance.
......@@ -243,4 +230,5 @@ class GLImageObject(GLObject):
return self.image.shape[:3]
else:
lo, hi = self.display.getDisplayBounds()
return ((hi - lo) / self.display.resolution).min()
minres = int(round(((hi - lo) / self.display.resolution).min()))
return [minres] * 3
......@@ -44,7 +44,6 @@ def show2D(xax, yax, width, height, lo, hi):
gl.glRotatef(270, 1, 0, 0)
def calculateSamplePoints(shape, resolution, xform, xax, yax):
"""Calculates a uniform grid of points, in the display coordinate system
(as specified by the given
......
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