]> Creatis software - clitk.git/blobdiff - common/clitkCommon.h
Convert Drag/Drop opening file function to c++ < c++11
[clitk.git] / common / clitkCommon.h
index b58974a3e721c486e6ff164f7ff2f18d25a25673..3729584686bdd1d2510d4603000336fe307a0443 100644 (file)
@@ -69,6 +69,9 @@ namespace clitk {
     exit(-3); \
   }
 
+#ifndef ITK_OVERRIDE
+# define ITK_OVERRIDE
+#endif
 
   //--------------------------------------------------------------------
   // when everything goes wrong
@@ -96,6 +99,9 @@ namespace clitk {
   // Return filename extension
   std::string GetExtension(const std::string& filename);
 
+  // Return filename splitting in 1 or 2 parts : directory name (if exists) & filename
+  std::vector<std::string> SplitFilename(const std::string& filename);
+
   //--------------------------------------------------------------------
   // Convert float, double ... to string
   template<class T> std::string toString(const T & t);
@@ -117,6 +123,8 @@ namespace clitk {
   TPixelDown PixelTypeDownCast(const TPixelUp & x);
   template<>
   float PixelTypeDownCast(const double & x);
+  template<>
+  double PixelTypeDownCast(const double & x);
 
   //--------------------------------------------------------------------
   // Return the indexes of sorted values in a vector