Commit 78cba2a2 authored by Cornelius Müller's avatar Cornelius Müller
Browse files

[ADD #163] allow to have multiple dipoles per time position

parent 6eb8bf84
......@@ -122,7 +122,7 @@ void WMEEGView::properties()
m_propCondition );
m_proofOfConcept = m_properties->addProperty( "Enable POC",
"Use proof of concept (POC) ROI positioning instead of real dipoles position.",
true,
false,
m_propCondition );
m_butterfly = m_properties->addProperty( "Butterfly plot",
"Overlay all curves in one row.",
......@@ -302,10 +302,11 @@ void WMEEGView::moduleMain()
{
debugLog() << "New event position: " << event->getTime();
if( m_roi )
for ( std::vector< osg::ref_ptr< WROIBox > >::iterator iter = m_rois.begin(); iter != m_rois.end(); ++iter)
{
WKernel::getRunningKernel()->getRoiManager()->removeRoi( m_roi );
WKernel::getRunningKernel()->getRoiManager()->removeRoi(*iter);
}
m_rois.clear();
if( m_sourceCalculator )
{
......@@ -313,9 +314,9 @@ void WMEEGView::moduleMain()
{
WPosition position = m_sourceCalculator->calculate( event );
float halfWidth = m_ROIsize->get( true ) * 0.5;
m_roi = new WROIBox( position - WVector3d( halfWidth, halfWidth, halfWidth ),
position + WVector3d( halfWidth, halfWidth, halfWidth ) );
WKernel::getRunningKernel()->getRoiManager()->addRoi( m_roi );
m_rois.push_back( new WROIBox( position - WVector3d( halfWidth, halfWidth, halfWidth ),
position + WVector3d( halfWidth, halfWidth, halfWidth ) ) );
WKernel::getRunningKernel()->getRoiManager()->addRoi( m_rois.back() );
}
else if( m_dipoles->getData() )
{
......@@ -323,9 +324,9 @@ void WMEEGView::moduleMain()
{
float halfWidth = m_ROIsize->get( true ) * 0.5;
WPosition position = m_dipoles->getData()->getPosition();
m_roi = new WROIBox( position - WVector3d( halfWidth, halfWidth, halfWidth ),
position + WVector3d( halfWidth, halfWidth, halfWidth ) );
WKernel::getRunningKernel()->getRoiManager()->addRoi( m_roi );
m_rois.push_back( new WROIBox( position - WVector3d( halfWidth, halfWidth, halfWidth ),
position + WVector3d( halfWidth, halfWidth, halfWidth ) ) );
WKernel::getRunningKernel()->getRoiManager()->addRoi( m_rois.back() );
}
}
else
......@@ -333,10 +334,6 @@ void WMEEGView::moduleMain()
debugLog() << "No dipoles found and not in POC mode: placing NO ROI.";
}
}
else
{
m_roi.release();
}
m_currentEventTime = event->getTime();
}
......
......@@ -26,6 +26,7 @@
#define WMEEGVIEW_H
#include <string>
#include <vector>
#include <osg/Texture1D>
#include <osgSim/ScalarsToColors>
......@@ -266,11 +267,11 @@ private:
osg::ref_ptr< osg::Node > m_labelsNode;
/**
* The ROI around the source dipole position at the time determined by
* The ROIs around the source dipole positions at the time determined by
* m_event.
* Used to select the fibers around this dipole.
* Used to select the fibers around this dipoles.
*/
osg::ref_ptr< WROIBox > m_roi;
std::vector< osg::ref_ptr< WROIBox > > m_rois;
/**
* Bool flag which gets set when the data was changed.
......
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