From: BenoƮt Presles Date: Wed, 27 Nov 2013 09:54:56 +0000 (+0100) Subject: inverted IO reader order to solve a bug with vox files X-Git-Tag: v1.4.0~150^2 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=8aefd2e263230c0989e6a0540fcfe1c000061264;p=clitk.git inverted IO reader order to solve a bug with vox files --- diff --git a/common/clitkIO.cxx b/common/clitkIO.cxx index 5c5977b..aa42db8 100644 --- a/common/clitkIO.cxx +++ b/common/clitkIO.cxx @@ -45,6 +45,7 @@ #endif #if ITK_VERSION_MAJOR >= 4 #include "itkGDCMImageIOFactory.h" + #include "itkPNGImageIOFactory.h" #endif //-------------------------------------------------------------------- @@ -59,6 +60,14 @@ void clitk::RegisterClitkFactories() itk::GDCMImageIOFactory::UnRegisterFactory(*it); break; } + + std::list< itk::ObjectFactoryBase * > flpng = itk::PNGImageIOFactory::GetRegisteredFactories(); + for (std::list< itk::ObjectFactoryBase * >::iterator it = flpng.begin(); it != flpng.end(); ++it) + if (dynamic_cast(*it)) + { + itk::PNGImageIOFactory::UnRegisterFactory(*it); + break; + } #endif #if CLITK_PRIVATE_FEATURES clitk::UsfImageIOFactory::RegisterOneFactory(); @@ -81,6 +90,7 @@ void clitk::RegisterClitkFactories() clitk::EsrfHstImageIOFactory::RegisterOneFactory(); #if ITK_VERSION_MAJOR >= 4 itk::GDCMImageIOFactory::RegisterOneFactory(); + itk::PNGImageIOFactory::RegisterOneFactory(); #endif } ////