Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
ee419067
Commit
ee419067
authored
May 12, 2012
by
Alexander Wiebel
Browse files
[ADD
#163
] butterfly plot option
also moved some properties to a property group
parent
ec7b5d10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
9 deletions
+38
-9
src/modules/eegView/WMEEGView.cpp
src/modules/eegView/WMEEGView.cpp
+27
-8
src/modules/eegView/WMEEGView.h
src/modules/eegView/WMEEGView.h
+11
-1
No files found.
src/modules/eegView/WMEEGView.cpp
View file @
ee419067
...
...
@@ -124,22 +124,32 @@ void WMEEGView::properties()
"Use proof of concept (POC) ROI positioning instead of real dipoles position."
,
true
,
m_propCondition
);
m_labelsWidth
=
m_properties
->
addProperty
(
"Labels width"
,
m_butterfly
=
m_properties
->
addProperty
(
"Butterfly plot"
,
"Overlay all curves in one row."
,
false
,
m_propCondition
);
m_appearanceGroup
=
m_properties
->
addPropertyGroup
(
"Appearance"
,
"Modification of the appearance of the EEG View widget"
);
m_labelsWidth
=
m_appearanceGroup
->
addProperty
(
"Labels width"
,
"The width of the label display in pixel."
,
24
);
m_graphWidth
=
m_
properties
->
addProperty
(
"Graph width"
,
m_graphWidth
=
m_
appearanceGroup
->
addProperty
(
"Graph width"
,
"The width of the graph in pixel."
,
992
);
m_ySpacing
=
m_
properties
->
addProperty
(
"Spacing"
,
m_ySpacing
=
m_
appearanceGroup
->
addProperty
(
"Spacing"
,
"The distance between two curves of the graph in pixel."
,
23.0
);
m_colorSensitivity
=
m_
properties
->
addProperty
(
"Color sensitivity"
,
m_colorSensitivity
=
m_
appearanceGroup
->
addProperty
(
"Color sensitivity"
,
"The sensitivity of the color map. It ranges from -Color Sensitivity to +Color Sensitivity in microvolt."
,
23.0
);
m_manualNavigationGroup
=
m_properties
->
addPropertyGroup
(
"Manual Navigation"
,
"Manually modify the parameters that are usually changes by mouse"
" actions in th EEG view."
);
...
...
@@ -211,7 +221,7 @@ void WMEEGView::moduleMain()
while
(
!
m_shutdownFlag
()
)
// loop until the module container requests the module to quit
{
// data changed?
if
(
m_dataChanged
()
)
if
(
m_dataChanged
()
||
m_butterfly
->
changed
(
true
)
)
{
debugLog
()
<<
"Data changed"
;
m_dataChanged
.
set
(
false
);
...
...
@@ -456,7 +466,7 @@ void WMEEGView::redraw()
// reset event position
m_event
->
set
(
boost
::
shared_ptr
<
WEEGEvent
>
(
new
WEEGEvent
)
);
if
(
m_eeg
.
get
()
&&
0
<
m_eeg
->
getNumberOfSegments
()
)
if
(
m_eeg
.
get
()
&&
m_eeg
->
getNumberOfSegments
()
>
0
)
{
const
float
text2dOffset
=
2.0
f
;
const
float
text2dSize
=
32.0
f
;
...
...
@@ -480,9 +490,18 @@ void WMEEGView::redraw()
size_t
nbSamples
=
segment
->
getNumberOfSamples
();
debugLog
()
<<
" Number of Samples: "
<<
nbSamples
;
const
float
heightConstant
=
736.0
;
// reset and adjust properties to given dataset
m_ySpacing
->
set
(
736.0
/
nbChannels
);
m_yPos
->
set
(
368.0
/
nbChannels
-
736.0
);
if
(
m_butterfly
->
get
()
)
{
m_ySpacing
->
set
(
0
);
m_yPos
->
set
(
-
heightConstant
/
nbChannels
);
}
else
{
m_ySpacing
->
set
(
heightConstant
/
nbChannels
);
m_yPos
->
set
(
(
heightConstant
*
0.5
)
/
nbChannels
-
heightConstant
);
}
m_timePos
->
set
(
0.0
);
m_timePos
->
setMax
(
nbSamples
/
rate
);
...
...
src/modules/eegView/WMEEGView.h
View file @
ee419067
...
...
@@ -141,6 +141,11 @@ private:
*/
WPropGroup
m_manualNavigationGroup
;
/**
* Group for parameters that adjust the appearance of the EEG widget
*/
WPropGroup
m_appearanceGroup
;
/**
* Property determining whether electode positions should be drawn.
*/
...
...
@@ -157,10 +162,15 @@ private:
WPropBool
m_drawLabels
;
/**
* Property determining whetherwe only show the proof of concept or the real dipoles
* Property determining whether
we only show the proof of concept or the real dipoles
*/
WPropBool
m_proofOfConcept
;
/**
* Property switching between standard and butterfly plot of curves (overlay of all curves in one row)
*/
WPropBool
m_butterfly
;
/**
* the width of the label display in pixel as property
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment