diff --git a/CMakeLists.txt b/CMakeLists.txt
index 08ed942b73d50e8ebf0a797d85cad7ff5eabee06..6e6fb5d58cfacc95a28db3c14a6a83fd89385ff9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,7 +9,7 @@
cmake_minimum_required( VERSION 3.1 FATAL_ERROR )
# visimpl project and version
-project( visimpl VERSION 1.8.5 )
+project( visimpl VERSION 1.8.6 )
set( visimpl_VERSION_ABI 6 )
SET( VISIMPL_LICENSE "GPL")
diff --git a/visimpl/DomainManager.cpp b/visimpl/DomainManager.cpp
index fb28192bad4cb302e273f08d3dc52a83aafddfb3..f1de16c84853f244bbfaa96446dbac49c4b07887 100644
--- a/visimpl/DomainManager.cpp
+++ b/visimpl/DomainManager.cpp
@@ -7,6 +7,10 @@
#include <utility>
+const visimpl::TSizeFunction DEFAULT_PARTICLE_SIZE{{ 0.0f , 50.0f },
+ { 1.0f , 15.0f }};
+
+
namespace visimpl
{
@@ -46,12 +50,8 @@ namespace visimpl
colors.emplace_back( 0.7f , glm::vec4( 1.0f , 1.0f , 0.0f , 0.5f ));
colors.emplace_back( 1.0f , glm::vec4( 0.0f , 0.0f , 1.0f , 0.5f ));
- TSizeFunction sizes;
- sizes.emplace_back( 0.0f , 6.0f );
- sizes.emplace_back( 1.0f , 18.0f );
-
_selectionModel = std::make_shared< StaticGradientModel >(
- camera , leftPlane , rightPlane , sizes , colors ,
+ camera , leftPlane , rightPlane , DEFAULT_PARTICLE_SIZE , colors ,
true , false , 0.0f , _decay );
_defaultProgram.loadFromText(
@@ -335,11 +335,9 @@ namespace visimpl
_currentRenderer ,
_selectionModel->isClippingEnabled( ));
- const TSizeFunction defaultSizes{{ 0.0f , 50.0f } ,
- { 1.0f , 15.0f }};
-
- group->getModel( )->setParticleSize( defaultSizes );
+ group->getModel( )->setParticleSize( DEFAULT_PARTICLE_SIZE );
group->getModel( )->setAccumulativeMode( _accumulativeMode );
+ group->sizeFunction(DEFAULT_PARTICLE_SIZE);
std::vector <uint32_t> ids;
std::vector <NeuronParticle> particles;
@@ -373,7 +371,10 @@ namespace visimpl
_currentRenderer ,
_selectionModel->isClippingEnabled( ));
+ group->getModel( )->setParticleSize( DEFAULT_PARTICLE_SIZE );
group->getModel( )->setAccumulativeMode( _accumulativeMode );
+ group->sizeFunction(DEFAULT_PARTICLE_SIZE);
+
std::vector <NeuronParticle> particles;
for ( const auto& gid: _selectionGids )
diff --git a/visimpl/MainWindow.cpp b/visimpl/MainWindow.cpp
index 5e5d534c31389281245d0c3c6feb1673d56f0b32..cb9706a57612a31ab6c854127ab4693945b035fa 100644
--- a/visimpl/MainWindow.cpp
+++ b/visimpl/MainWindow.cpp
@@ -1406,7 +1406,7 @@ namespace visimpl
connect( _tfWidget , SIGNAL( colorChanged( void )) , this ,
SLOT( UpdateSimulationColorMapping( void )) );
- connect( _tfWidget , SIGNAL( colorChanged( void )) , this ,
+ connect( _tfWidget , SIGNAL( sizeChanged( void )) , this ,
SLOT( UpdateSimulationSizeFunction( void )) );
connect( _tfWidget , SIGNAL( previewColor( void )) , this ,
SLOT( PreviewSimulationColorMapping( void )) );
@@ -2020,6 +2020,8 @@ namespace visimpl
connect( tfWidget , SIGNAL( colorChanged( )) ,
this , SLOT( onGroupColorChanged( )) );
+ connect( tfWidget , SIGNAL( sizeChanged( )) ,
+ this , SLOT( onGroupColorChanged( )) );
connect( tfWidget , SIGNAL( previewColor( )) ,
this , SLOT( onGroupPreview( )) );
@@ -2426,7 +2428,7 @@ namespace visimpl
if ( tfw )
{
auto groupName = tfw->property( GROUP_NAME_ ).toString( );
- updateGroupColors( groupName.toStdString( ) , tfw->getColors( ) ,
+ updateGroup( groupName.toStdString( ) , tfw->getColors( ) ,
tfw->getSizeFunction( ));
}
}
@@ -2440,13 +2442,13 @@ namespace visimpl
auto groupName = tfw->property( GROUP_NAME_ ).toString( );
if ( !ok ) return;
- updateGroupColors( groupName.toStdString( ) , tfw->getPreviewColors( ) ,
+ updateGroup( groupName.toStdString( ) , tfw->getPreviewColors( ) ,
tfw->getSizePreview( ));
}
}
void
- MainWindow::updateGroupColors( std::string name , const TTransferFunction& t ,
+ MainWindow::updateGroup( std::string name , const TTransferFunction& t ,
const TSizeFunction& s )
{
const auto& groups = _domainManager->getGroups( );
@@ -2850,7 +2852,7 @@ namespace visimpl
};
std::for_each( sizePairs.cbegin( ) , sizePairs.cend( ) , addSizes );
- updateGroupColors( name.toStdString( ) , function , sizes );
+ updateGroup( name.toStdString( ) , function , sizes );
auto container = std::get< gr_container >( _groupsVisButtons.at( idx ));
auto tfw = qobject_cast< TransferFunctionWidget* >(
container->layout( )->itemAt( 0 )->widget( ));
diff --git a/visimpl/MainWindow.h b/visimpl/MainWindow.h
index a3626ed05ac111fb0edb98b15f4e8085747f7f6b..ae8d8548251130dab36f9a64e6479a7b6348d1e9 100644
--- a/visimpl/MainWindow.h
+++ b/visimpl/MainWindow.h
@@ -355,13 +355,13 @@ namespace visimpl
bool _showDialog( QColor& current , const QString& message = "" );
- /** \brief Helper to update a group representations colors.
+ /** \brief Helper to update a group colors and size.
* \param[in] name the name of the group.
* \param[in] t Transfer function.
* \param[in] s Size function.
*
*/
- void updateGroupColors( std::string name , const TTransferFunction& t ,
+ void updateGroup( std::string name , const TTransferFunction& t ,
const TSizeFunction& s );
virtual void closeEvent( QCloseEvent* e ) override;