}
//--------------------------------------------------------------------
+
//--------------------------------------------------------------------
template<class ImageType>
void CloneImage(const typename ImageType::Pointer & input, typename ImageType::Pointer & output)
}
//--------------------------------------------------------------------
+
+//--------------------------------------------------------------------
+// http://stackoverflow.com/questions/771453/copy-map-values-to-vector-in-stl
+template <typename M, typename V>
+void MapToVecFirst(const M & m, V & v) {
+ for( typename M::const_iterator it = m.begin(); it != m.end(); ++it ) {
+ v.push_back( it->first );
+ }
+}
+template <typename M, typename V>
+void MapToVecSecond(const M & m, V & v) {
+ for( typename M::const_iterator it = m.begin(); it != m.end(); ++it ) {
+ v.push_back( it->second );
+ }
+}
+//--------------------------------------------------------------------
+
+
+//--------------------------------------------------------------------
+//http://stackoverflow.com/questions/1494399/how-do-i-search-find-and-replace-in-a-standard-string
+template<class T>
+int inline findAndReplace(T& source, const T& find, const T& replace)
+{
+ int num=0;
+ int fLen = find.size();
+ int rLen = replace.size();
+ for (int pos=0; (pos=source.find(find, pos))!=T::npos; pos+=rLen) {
+ num++;
+ source.replace(pos, fLen, replace);
+ }
+ return num;
+}
+//--------------------------------------------------------------------
+
#endif /* end #define CLITKCOMMON_TXX */