Commit 5ade4ff6 authored by Mathias Goldau's avatar Mathias Goldau
Browse files

[ADD] enforce that gzipped nifti files have the suffix: ".nii.gz"

parent b3283560
......@@ -44,6 +44,11 @@ void WLoaderManager::load( std::string fileName, boost::shared_ptr< WDataHandler
if( suffix == ".nii" || suffix == ".gz" )
{
// enforce that a gzipped file is has also a "nii" sub suffix
boost::filesystem::path p( fileName );
p.replace_extension( "" );
suffix = getSuffix( p.string() );
assert( suffix == ".nii" && "currently only nii files may be gzipped" );
WLoaderNIfTI niiLoader( fileName, dataHandler );
boost::thread loaderThread( niiLoader );
}
......
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