From 8aefd2e263230c0989e6a0540fcfe1c000061264 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Beno=C3=AEt=20Presles?= Date: Wed, 27 Nov 2013 10:54:56 +0100 Subject: [PATCH] inverted IO reader order to solve a bug with vox files --- common/clitkIO.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 } //// -- 2.47.1