Commit 1ca61454 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE] values type in fiber vtk format changed to double

parent 1f85c08e
......@@ -86,7 +86,7 @@ public:
/**
* Parameter storage for each vertex.
*/
typedef boost::shared_ptr< std::vector< float > > VertexParemeterArray;
typedef boost::shared_ptr< std::vector< double > > VertexParemeterArray;
/**
* Item used in the selection below also containing color info.
......
......@@ -193,7 +193,7 @@ void WReaderFiberVTK::readValues()
std::string line = getLine( "reading VALUES declaration" );
std::vector< std::string > tokens = string_utils::tokenize( line );
if( tokens.size() != 3 || string_utils::toLower( tokens.at( 2 ) ) != "float" )
if( tokens.size() != 3 || string_utils::toLower( tokens.at( 2 ) ) != "double" )
{
// do not throw an error. this is a custom extension.
return;
......@@ -203,12 +203,12 @@ void WReaderFiberVTK::readValues()
wlog::debug( "ReaderFiberVTK" ) << "Found " << numValues << " values.";
float *valueData = new float[ numValues ];
m_ifs->read( reinterpret_cast< char* >( valueData ), sizeof( float ) * numValues );
double *valueData = new double[ numValues ];
m_ifs->read( reinterpret_cast< char* >( valueData ), sizeof( double ) * numValues );
switchByteOrderOfArray( valueData, numValues ); // all 4 bytes of each float are in wrong order we need to reorder them
switchByteOrderOfArray( valueData, numValues ); // all 4 bytes of each double are in wrong order we need to reorder them
m_fiberParameters = WDataSetFibers::VertexParemeterArray( new std::vector< float > );
m_fiberParameters = WDataSetFibers::VertexParemeterArray( new std::vector< double > );
m_fiberParameters->reserve( numValues );
for( size_t i = 0; i < numValues; ++i )
{
......
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