X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkCommon.h;h=44f9940a16189ce6814ec76174db5282bacacc18;hb=1fea92ac237c16c1f027ffabdb42066f6f4f6114;hp=e3145b1d840425812feef4f2a6f4773c7073b90e;hpb=ff7b62d284bd4f5eadce3aff4b217ae722b369a7;p=clitk.git diff --git a/common/clitkCommon.h b/common/clitkCommon.h index e3145b1..44f9940 100644 --- a/common/clitkCommon.h +++ b/common/clitkCommon.h @@ -30,8 +30,18 @@ #include #include +// std include #include +// Include for "rusage" +#include +#if defined(unix) || defined(__APPLE__) +# include +# include +#elif defined(WIN32) +# include +#endif + //-------------------------------------------------------------------- namespace clitk { @@ -71,6 +81,9 @@ namespace clitk { template std::string toStringVector(const T * t, const int n); template std::string toStringVector(const T & t, const int n); template std::string toStringVector(const std::vector & t); + template bool fromString(T& t, + const std::string& s, + std::ios_base& (*f)(std::ios_base&)=std::dec); //-------------------------------------------------------------------- // Display a progress % @@ -193,6 +206,9 @@ namespace clitk { template void CloneImage(const typename ImageType::Pointer & input, typename ImageType::Pointer & output); + //-------------------------------------------------------------------- + void PrintMemoryUsed(); + #include "clitkCommon.txx" } // end namespace