X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkCommon.cxx;h=c71bd5078fbf5598e7982eb81287204c1c26c694;hb=08f7de414957e92b25ca5b299007e941b610d3a8;hp=55b9927ebfd173d63652ac72eb4557b7f069af73;hpb=9476331a2923c08ae8f62fc83461ffcc72ee9fa3;p=clitk.git diff --git a/common/clitkCommon.cxx b/common/clitkCommon.cxx index 55b9927..c71bd50 100644 --- a/common/clitkCommon.cxx +++ b/common/clitkCommon.cxx @@ -21,6 +21,12 @@ #include +#ifdef _WIN32 + #define _USE_MATH_DEFINES + #include + const double M_PI = std::acos(-1.0); +#endif + // clitk include #include "clitkCommon.h" @@ -81,7 +87,8 @@ std::vector clitk::SplitFilename(const std::string& filename) std::vector pathComponents; itksys::SystemTools::SplitPath(filename.c_str(), pathComponents); std::string fileName = pathComponents.back(); - dirname.push_back(path); + if (path != "") + dirname.push_back(path); dirname.push_back(fileName); return( dirname ); } ////