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

[CHANGE #284] added other types to raw loader

parent f4bd9702
......@@ -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 ) );
......
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