Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Evan Edmond
fslpy
Commits
b9ecd8ef
Commit
b9ecd8ef
authored
9 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Simplified ImageTexture constructor.
parent
c7e65614
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/fsleyes/gl/textures/imagetexture.py
+7
-20
7 additions, 20 deletions
fsl/fsleyes/gl/textures/imagetexture.py
with
7 additions
and
20 deletions
fsl/fsleyes/gl/textures/imagetexture.py
+
7
−
20
View file @
b9ecd8ef
...
@@ -65,12 +65,8 @@ class ImageTexture(texture.Texture, notifier.Notifier):
...
@@ -65,12 +65,8 @@ class ImageTexture(texture.Texture, notifier.Notifier):
name
,
name
,
image
,
image
,
nvals
=
1
,
nvals
=
1
,
normalise
=
False
,
notify
=
True
,
prefilter
=
None
,
**
kwargs
):
interp
=
gl
.
GL_NEAREST
,
resolution
=
None
,
volume
=
None
,
notify
=
True
):
"""
Create an ``ImageTexture``. A listener is added to the
"""
Create an ``ImageTexture``. A listener is added to the
:attr:`.Image.data` property, so that the texture data can be
:attr:`.Image.data` property, so that the texture data can be
refreshed whenever the image data changes - see the
refreshed whenever the image data changes - see the
...
@@ -83,15 +79,11 @@ class ImageTexture(texture.Texture, notifier.Notifier):
...
@@ -83,15 +79,11 @@ class ImageTexture(texture.Texture, notifier.Notifier):
:arg nvals: Number of values per voxel. For example. a normal MRI
:arg nvals: Number of values per voxel. For example. a normal MRI
or fMRI image contains only one value for each voxel.
or fMRI image contains only one value for each voxel.
However, DTI data contains three values per 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`.
: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
)
texture
.
Texture
.
__init__
(
self
,
name
,
3
)
...
@@ -127,12 +119,7 @@ class ImageTexture(texture.Texture, notifier.Notifier):
...
@@ -127,12 +119,7 @@ class ImageTexture(texture.Texture, notifier.Notifier):
self
.
image
.
addListener
(
'
data
'
,
self
.
__name
,
self
.
refresh
)
self
.
image
.
addListener
(
'
data
'
,
self
.
__name
,
self
.
refresh
)
self
.
set
(
interp
=
interp
,
self
.
set
(
refresh
=
False
,
**
kwargs
)
prefilter
=
prefilter
,
resolution
=
resolution
,
volume
=
volume
,
normalise
=
normalise
,
refresh
=
False
)
self
.
__refresh
(
notify
=
notify
)
self
.
__refresh
(
notify
=
notify
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment