Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Michiel Cottaar
fslpy
Commits
0fa1f05a
Commit
0fa1f05a
authored
9 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Melodic classification panel now displays components as 1-indexed.
parent
a7745c44
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/controls/melodicclassificationgrid.py
+8
-8
8 additions, 8 deletions
fsl/fsleyes/controls/melodicclassificationgrid.py
with
8 additions
and
8 deletions
fsl/fsleyes/controls/melodicclassificationgrid.py
+
8
−
8
View file @
0fa1f05a
...
@@ -177,7 +177,7 @@ class ComponentGrid(fslpanel.FSLEyesPanel):
...
@@ -177,7 +177,7 @@ class ComponentGrid(fslpanel.FSLEyesPanel):
# and __onTagRemoved methods.
# and __onTagRemoved methods.
tags
.
_melodicComponent
=
i
tags
.
_melodicComponent
=
i
self
.
__grid
.
SetText
(
i
,
0
,
str
(
i
))
self
.
__grid
.
SetText
(
i
,
0
,
str
(
i
+
1
))
self
.
__grid
.
SetWidget
(
i
,
1
,
tags
)
self
.
__grid
.
SetWidget
(
i
,
1
,
tags
)
tags
.
Bind
(
texttag
.
EVT_TTP_TAG_ADDED
,
self
.
__onTagAdded
)
tags
.
Bind
(
texttag
.
EVT_TTP_TAG_ADDED
,
self
.
__onTagAdded
)
...
@@ -531,13 +531,13 @@ class LabelGrid(fslpanel.FSLEyesPanel):
...
@@ -531,13 +531,13 @@ class LabelGrid(fslpanel.FSLEyesPanel):
tags
.
ClearTags
()
tags
.
ClearTags
()
tags
.
SetOptions
(
map
(
str
,
range
(
numComps
)))
tags
.
SetOptions
(
map
(
str
,
range
(
1
,
numComps
+
1
)))
for
comp
in
comps
:
for
comp
in
comps
:
colour
=
label
.
colour
()
colour
=
label
.
colour
()
colour
=
[
int
(
round
(
c
*
255.0
))
for
c
in
colour
]
colour
=
[
int
(
round
(
c
*
255.0
))
for
c
in
colour
]
tags
.
AddTag
(
str
(
comp
),
colour
)
tags
.
AddTag
(
str
(
comp
+
1
),
colour
)
self
.
__grid
.
Layout
()
self
.
__grid
.
Layout
()
...
@@ -551,7 +551,7 @@ class LabelGrid(fslpanel.FSLEyesPanel):
...
@@ -551,7 +551,7 @@ class LabelGrid(fslpanel.FSLEyesPanel):
tags
=
ev
.
GetEventObject
()
tags
=
ev
.
GetEventObject
()
overlay
=
self
.
__overlay
overlay
=
self
.
__overlay
melclass
=
overlay
.
getICClassification
()
melclass
=
overlay
.
getICClassification
()
comp
=
int
(
ev
.
tag
)
comp
=
int
(
ev
.
tag
)
-
1
label
=
tags
.
_label
label
=
tags
.
_label
log
.
debug
(
'
Component added to label {} ({})
'
.
format
(
label
,
comp
))
log
.
debug
(
'
Component added to label {} ({})
'
.
format
(
label
,
comp
))
...
@@ -585,7 +585,7 @@ class LabelGrid(fslpanel.FSLEyesPanel):
...
@@ -585,7 +585,7 @@ class LabelGrid(fslpanel.FSLEyesPanel):
tags
=
ev
.
GetEventObject
()
tags
=
ev
.
GetEventObject
()
overlay
=
self
.
__overlay
overlay
=
self
.
__overlay
melclass
=
overlay
.
getICClassification
()
melclass
=
overlay
.
getICClassification
()
comp
=
int
(
ev
.
tag
)
comp
=
int
(
ev
.
tag
)
-
1
label
=
tags
.
_label
label
=
tags
.
_label
log
.
debug
(
'
Component removed from label {} ({})
'
.
format
(
label
,
comp
))
log
.
debug
(
'
Component removed from label {} ({})
'
.
format
(
label
,
comp
))
...
@@ -624,13 +624,13 @@ class LabelGrid(fslpanel.FSLEyesPanel):
...
@@ -624,13 +624,13 @@ class LabelGrid(fslpanel.FSLEyesPanel):
corresponding to the selected tag.
corresponding to the selected tag.
"""
"""
tag
=
int
(
ev
.
tag
)
comp
=
int
(
ev
.
tag
)
-
1
overlay
=
self
.
__overlay
overlay
=
self
.
__overlay
opts
=
self
.
_displayCtx
.
getOpts
(
overlay
)
opts
=
self
.
_displayCtx
.
getOpts
(
overlay
)
log
.
debug
(
'
Tag selected on label grid: component {}
'
.
format
(
tag
))
log
.
debug
(
'
Tag selected on label grid: component {}
'
.
format
(
comp
))
opts
.
volume
=
tag
opts
.
volume
=
comp
def
__lutChanged
(
self
,
*
a
):
def
__lutChanged
(
self
,
*
a
):
...
...
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