]> Creatis software - clitk.git/blobdiff - common/clitkIO.cxx
Add define to avoid vtk warning on mac
[clitk.git] / common / clitkIO.cxx
index 011147d868fedb67d05b17cd3ec5ac15ec1b6135..5c5977baa4fb7326da551a662a1ab44c1cf35459 100644 (file)
 #include "clitkImageCommon.h"
 #include "clitkDicomRTDoseIOFactory.h"
 #include "clitkVoxImageIOFactory.h"
-#include "clitkHisImageIOFactory.h"
 #include "clitkVfImageIOFactory.h"
 #include "clitkXdrImageIOFactory.h"
-#include "clitkHndImageIOFactory.h"
+#include "rtkHisImageIOFactory.h"
+#include "rtkHndImageIOFactory.h"
+#include "rtkEdfImageIOFactory.h"
+#include "rtkImagXImageIOFactory.h"
+#include "rtkXRadImageIOFactory.h"
+#include "clitkEsrfHstImageIOFactory.h"
 #include "clitkGateAsciiImageIOFactory.h"
 #include "clitkConfiguration.h"
 #if CLITK_PRIVATE_FEATURES
   #include "clitkUsfImageIOFactory.h"
+  #include "clitkUSVoxImageIOFactory.h"
+  #include "clitkSvlImageIOFactory.h"
+#endif
+#if ITK_VERSION_MAJOR >= 4
+  #include "itkGDCMImageIOFactory.h"
 #endif
 
 //--------------------------------------------------------------------
 // Register factories
 void clitk::RegisterClitkFactories()
 {
+#if ITK_VERSION_MAJOR >= 4
+  std::list< itk::ObjectFactoryBase * > fl = itk::GDCMImageIOFactory::GetRegisteredFactories();
+  for (std::list< itk::ObjectFactoryBase * >::iterator it = fl.begin(); it != fl.end(); ++it)
+    if (dynamic_cast<itk::GDCMImageIOFactory *>(*it))
+    {
+      itk::GDCMImageIOFactory::UnRegisterFactory(*it);
+      break;
+    }
+#endif
 #if CLITK_PRIVATE_FEATURES
   clitk::UsfImageIOFactory::RegisterOneFactory();
+  clitk::USVoxImageIOFactory::RegisterOneFactory();
+  clitk::SvlImageIOFactory::RegisterOneFactory();
 #endif
   clitk::GateAsciiImageIOFactory::RegisterOneFactory();
   clitk::DicomRTDoseIOFactory::RegisterOneFactory();
@@ -52,8 +72,15 @@ void clitk::RegisterClitkFactories()
 #endif
   clitk::VoxImageIOFactory::RegisterOneFactory();
   clitk::VfImageIOFactory::RegisterOneFactory();
-  clitk::HisImageIOFactory::RegisterOneFactory();
   clitk::XdrImageIOFactory::RegisterOneFactory();
-  clitk::HndImageIOFactory::RegisterOneFactory();
+  rtk::HisImageIOFactory::RegisterOneFactory();
+  rtk::HndImageIOFactory::RegisterOneFactory();
+  rtk::EdfImageIOFactory::RegisterOneFactory();
+  rtk::ImagXImageIOFactory::RegisterOneFactory();
+  rtk::XRadImageIOFactory::RegisterOneFactory();
+  clitk::EsrfHstImageIOFactory::RegisterOneFactory();
+#if ITK_VERSION_MAJOR >= 4
+  itk::GDCMImageIOFactory::RegisterOneFactory();
+#endif
 } ////