From b9ecd8efb9ff5edb0f7f907fbc11cafc46ca523b Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauld.mccarthy@gmail.com> Date: Thu, 28 Jan 2016 17:25:42 +0000 Subject: [PATCH] Simplified ImageTexture constructor. --- fsl/fsleyes/gl/textures/imagetexture.py | 27 +++++++------------------ 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/fsl/fsleyes/gl/textures/imagetexture.py b/fsl/fsleyes/gl/textures/imagetexture.py index 3510e2b03..85ae39d8b 100644 --- a/fsl/fsleyes/gl/textures/imagetexture.py +++ b/fsl/fsleyes/gl/textures/imagetexture.py @@ -65,12 +65,8 @@ class ImageTexture(texture.Texture, notifier.Notifier): name, image, nvals=1, - normalise=False, - prefilter=None, - interp=gl.GL_NEAREST, - resolution=None, - volume=None, - notify=True): + notify=True, + **kwargs): """Create an ``ImageTexture``. A listener is added to the :attr:`.Image.data` property, so that the texture data can be refreshed whenever the image data changes - see the @@ -83,15 +79,11 @@ class ImageTexture(texture.Texture, notifier.Notifier): :arg nvals: Number of values per voxel. For example. a normal MRI or fMRI image contains only one value for each voxel. However, DTI data contains three values per voxel. - - :arg normalise: If ``True``, the image data is normalised to lie in the - range ``[0.0, 1.0]``. - - :arg prefilter: An optional function which may perform any - pre-processing on the data before it is copied to the - GPU - see the :meth:`__prepareTextureData` method. - + :arg notify: Passed to the initial call to :meth:`refresh`. + + All other keyword arguments are passed through to the :meth:`set` + method, and thus used as initial texture settings. """ texture.Texture.__init__(self, name, 3) @@ -127,12 +119,7 @@ class ImageTexture(texture.Texture, notifier.Notifier): self.image.addListener('data', self.__name, self.refresh) - self.set(interp=interp, - prefilter=prefilter, - resolution=resolution, - volume=volume, - normalise=normalise, - refresh=False) + self.set(refresh=False, **kwargs) self.__refresh(notify=notify) -- GitLab