Commit fb24e6fa authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[MERGE]

parents 14c6ed89 ebca271a
......@@ -138,12 +138,6 @@ void WMReadRawData::moduleMain()
boost::shared_ptr< WDataSetScalar > WMReadRawData::readData( std::string fileName )
{
// size_t selected = m_dataTypeSelection->get().getItemIndexOfSelected( 0 );
// switch( m_dataTypeSelection )
// {
// case
// std::cout << "----. " << m_dataTypeSelection->get() << std::endl;
//std::cout << "----. " << selected << m_dataTypeSelection->get().at( 0 )->getName() << std::endl;
std::string dataTypeName = m_dataTypeSelection->get().at( 0 )->getName();
boost::shared_ptr< WValueSetBase > newValueSet;
if( dataTypeName == "UINT8" )
......@@ -154,34 +148,34 @@ boost::shared_ptr< WDataSetScalar > WMReadRawData::readData( std::string fileNam
{
newValueSet = boost::shared_ptr< WValueSetBase >( new WValueSet< uint16_t >( 0, 1, readDataTyped< uint16_t >( fileName ), W_DT_UINT16 ) );
}
// else if( dataTypeName == "UINT32")
// {
// newValueSet = readDataTyped< uint32_t >( fileName );
// }
// else if( dataTypeName == "UINT64")
// {
// newValueSet = readDataTyped< uint64_t >( fileName );
// }
// else if( dataTypeName == "INT8" )
// {
// newValueSet = readDataTyped< int8_t >( fileName );
// }
// else if( dataTypeName == "INT16")
// {
// newValueSet = readDataTyped< int16_t >( fileName );
// }
// else if( dataTypeName == "INT32")
// {
// newValueSet = readDataTyped< int32_t >( fileName );
// }
// else if( dataTypeName == "INT64")
// {
// newValueSet = readDataTyped< int64_t >( fileName );
// }
// else if( dataTypeName == "FLOAT" )
// {
// newValueSet = readDataTyped< float >( fileName );
// }
else if( dataTypeName == "UINT32")
{
newValueSet = boost::shared_ptr< WValueSetBase >( new WValueSet< uint32_t >( 0, 1, readDataTyped< uint32_t >( fileName ), W_DT_UINT32 ) );
}
else if( dataTypeName == "UINT64")
{
newValueSet = boost::shared_ptr< WValueSetBase >( new WValueSet< uint64_t >( 0, 1, readDataTyped< uint64_t >( fileName ), W_DT_UINT64 ) );
}
else if( dataTypeName == "INT8" )
{
newValueSet = boost::shared_ptr< WValueSetBase >( new WValueSet< int8_t >( 0, 1, readDataTyped< int8_t >( fileName ), W_DT_INT8 ) );
}
else if( dataTypeName == "INT16")
{
newValueSet = boost::shared_ptr< WValueSetBase >( new WValueSet< int16_t >( 0, 1, readDataTyped< int16_t >( fileName ), W_DT_INT16 ) );
}
else if( dataTypeName == "INT32")
{
newValueSet = boost::shared_ptr< WValueSetBase >( new WValueSet< int32_t >( 0, 1, readDataTyped< int32_t >( fileName ), W_DT_SIGNED_INT ) );
}
else if( dataTypeName == "INT64")
{
newValueSet = boost::shared_ptr< WValueSetBase >( new WValueSet< int64_t >( 0, 1, readDataTyped< int64_t >( fileName ), W_DT_INT64 ) );
}
else if( dataTypeName == "FLOAT" )
{
newValueSet = boost::shared_ptr< WValueSetBase >( new WValueSet< float >( 0, 1, readDataTyped< float >( fileName ), W_DT_FLOAT ) );
}
else if( dataTypeName == "DOUBLE" )
{
newValueSet = boost::shared_ptr< WValueSetBase >( new WValueSet< double >( 0, 1, readDataTyped< double >( fileName ), W_DT_DOUBLE ) );
......
......@@ -107,7 +107,7 @@ public:
*
* \param vsetA the first value set
*/
VisitorVSetB( const WValueSet< VSetAType >* const vsetA ):
explicit VisitorVSetB( const WValueSet< VSetAType >* const vsetA ):
boost::static_visitor< result_type >(),
m_vsetA( vsetA )
{
......@@ -141,10 +141,9 @@ public:
for( size_t i = 0; i < vsetB->rawSize(); ++i )
{
size_t vi = 3 * i;
data[ vi + 0 ] = static_cast< ResultT >( a[ vi + 0 ] ) * static_cast< ResultT >( b[ i ] ) ;
data[ vi + 1 ] = static_cast< ResultT >( a[ vi + 1 ] ) * static_cast< ResultT >( b[ i ] ) ;
data[ vi + 2 ] = static_cast< ResultT >( a[ vi + 2 ] ) * static_cast< ResultT >( b[ i ] ) ;
data[ vi + 0 ] = static_cast< ResultT >( a[ vi + 0 ] ) * static_cast< ResultT >( b[ i ] );
data[ vi + 1 ] = static_cast< ResultT >( a[ vi + 1 ] ) * static_cast< ResultT >( b[ i ] );
data[ vi + 2 ] = static_cast< ResultT >( a[ vi + 2 ] ) * static_cast< ResultT >( b[ i ] );
}
// create result value set
......@@ -175,7 +174,7 @@ public:
*
* \param vsetB The valueset to visit during this visit.
*/
VisitorVSetA( WValueSetBase* vsetB ):
explicit VisitorVSetA( WValueSetBase* vsetB ):
boost::static_visitor< result_type >(),
m_vsetB( vsetB )
{
......
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