Commit f32a53ee authored by Alexander Wiebel's avatar Alexander Wiebel
Browse files

[ADD] loading double data sets

parent a876a0c2
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "../WValueSetBase.h" #include "../WValueSetBase.h"
#include "../WValueSet.h" #include "../WValueSet.h"
#include "../WDataHandlerEnums.h" #include "../WDataHandlerEnums.h"
#include "../../common/WLogger.h"
WLoaderNIfTI::WLoaderNIfTI( std::string fileName ) WLoaderNIfTI::WLoaderNIfTI( std::string fileName )
...@@ -125,8 +126,15 @@ boost::shared_ptr< WDataSet > WLoaderNIfTI::load() ...@@ -125,8 +126,15 @@ boost::shared_ptr< WDataSet > WLoaderNIfTI::load()
break; break;
} }
case DT_DOUBLE:
{
std::vector< double > data = copyArray( reinterpret_cast< double* >( filedata->data ), countVoxels, vDim );
newValueSet = boost::shared_ptr< WValueSetBase >( new WValueSet< double >( order, vDim, data, W_DT_DOUBLE ) );
break;
}
default: default:
std::cout << "unknown data type " << header->datatype << std::endl; wlog::error( "WLoaderNIfTI" ) << "unknown data type " << header->datatype << std::endl;
newValueSet = boost::shared_ptr< WValueSetBase >(); newValueSet = boost::shared_ptr< WValueSetBase >();
} }
......
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