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

[CHANGE] ROIs are now placed at the position where the navigation planes are

currently
parent 6823e912
......@@ -609,16 +609,18 @@ void WMainWindow::newRoi()
return;
}
wmath::WPosition crossHairPos = WKernel::getRunningKernel()->getSelectionManager()->getCrosshair()->getPosition();
wmath::WPosition minROIPos = crossHairPos - wmath::WPosition( 10., 10., 10. );
wmath::WPosition maxROIPos = crossHairPos + wmath::WPosition( 10., 10., 10. );
if ( m_datasetBrowser->getFirstRoiInSelectedBranch().get() == NULL )
{
osg::ref_ptr< WROIBox > newRoi = osg::ref_ptr< WROIBox >( new WROIBox( wmath::WPosition( 60., 60., 60. ),
wmath::WPosition( 80., 80., 80. ) ) );
osg::ref_ptr< WROIBox > newRoi = osg::ref_ptr< WROIBox >( new WROIBox( minROIPos, maxROIPos ) );
WKernel::getRunningKernel()->getRoiManager()->addRoi( newRoi );
}
else
{
osg::ref_ptr< WROIBox > newRoi = osg::ref_ptr< WROIBox >( new WROIBox( wmath::WPosition( 60., 60., 60. ),
wmath::WPosition( 80., 80., 80. ) ) );
osg::ref_ptr< WROIBox > newRoi = osg::ref_ptr< WROIBox >( new WROIBox( minROIPos, maxROIPos ) );
WKernel::getRunningKernel()->getRoiManager()->addRoi( newRoi, m_datasetBrowser->getFirstRoiInSelectedBranch()->getROI() );
}
}
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