Commit c31919a5 by Alexander Wiebel

[FIX #298] set correct max/min for threshold properties and change the property

type from int to double
parent e923e8f9
......@@ -29,6 +29,7 @@
#include "../../common/WIOTools.h"
#include "../../dataHandler/WDataSet.h"
#include "../../dataHandler/WDataSetSingle.h"
#include "../../dataHandler/WDataSetScalar.h"
#include "../../dataHandler/WSubject.h"
#include "../../dataHandler/WDataHandler.h"
#include "../../dataHandler/WDataTexture3D.h"
......@@ -134,7 +135,7 @@ void WMData::properties()
true,
propertyCallback );
m_threshold = m_properties->addProperty( "Threshold", "Values below this threshold will not be "
"shown in colormaps.", 0, propertyCallback );
"shown in colormaps.", 0., propertyCallback );
m_opacity = m_properties->addProperty( "Opacity %", "The opacity of this data in colormaps combining"
" values from several data sets.", 100, propertyCallback );
m_opacity->setMax( 100 );
......@@ -246,6 +247,12 @@ void WMData::moduleMain()
WLoaderNIfTI niiLoader( fileName );
m_dataSet = niiLoader.load();
if( boost::shared_dynamic_cast< WDataSetScalar >( m_dataSet ) )
{
m_threshold->setMin( boost::shared_dynamic_cast< WDataSetScalar >( m_dataSet )->getMin() );
m_threshold->setMax( boost::shared_dynamic_cast< WDataSetScalar >( m_dataSet )->getMax() );
}
boost::shared_ptr< WDataSetSingle > dss;
dss = boost::shared_dynamic_cast< WDataSetSingle >( m_dataSet );
if( dss )
......
......@@ -184,7 +184,7 @@ protected:
/**
* Threshold value for this data.
*/
WPropInt m_threshold;
WPropDouble m_threshold;
/**
* Opacity value for this data.
......
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