Commit ee419067 authored by Alexander Wiebel's avatar Alexander Wiebel
Browse files

[ADD #163] butterfly plot option

also moved some properties to a property group
parent ec7b5d10
......@@ -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.0f;
const float text2dSize = 32.0f;
......@@ -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 );
......
......@@ -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
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment