Program: gdcm
Module: $RCSfile: gdcmUtil.cxx,v $
Language: C++
- Date: $Date: 2005/11/03 14:04:43 $
- Version: $Revision: 1.174 $
+ Date: $Date: 2005/11/29 13:02:46 $
+ Version: $Revision: 1.179 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "gdcmUtil.h"
#include "gdcmDebug.h"
+
#include <iostream>
+#include <stdarg.h> // for va_list
// For GetCurrentDate, GetCurrentTime
#include <time.h>
close(sd);
#endif
// Not implemented platforms (or no cable !)
- perror("in Get MAC Adress (internal) : There was a configuration problem on your plateform");
+ perror("in Get MAC Adress (internal) : There was a configuration problem (or no cable !) on your plateform");
memset(addr,0,6);
return -1;
#endif //__sun
}
/**
- * \brief Encode the mac address on a fixed lenght string of 15 characters.
+ * \brief Encode the mac address on a fixed length string of 15 characters.
* we save space this way.
*/
std::string Util::GetMACAddress()
}
else
{
- gdcmWarningMacro("Problem in finding the MAC Address");
+ gdcmStaticWarningMacro("Problem in finding the MAC Address");
return "";
}
}
/**
- * \brief Creates a new UID. As stipulate in the DICOM ref
- * each time a DICOM image is create it should have
+ * \brief Creates a new UID. As stipulated in the DICOM ref
+ * each time a DICOM image is created it should have
* a unique identifier (URI)
* @param root is the DICOM prefix assigned by IOS group
*/
// If append is too long we need to rehash it
if ( (prefix + append).size() > 64 )
{
- gdcmErrorMacro( "Size of UID is too long." );
+ gdcmStaticErrorMacro( "Size of UID is too long." );
// we need a hash function to truncate this number
// if only md5 was cross plateform
// MD5(append);
return str;
}
+void Util::hfpswap(double *a, double *b)
+{
+ double tmp;
+ tmp=*a;
+ *a=*b;
+ *b=tmp;
+}
+
//-------------------------------------------------------------------------
} // end namespace gdcm