Program: gdcm
Module: $RCSfile: gdcmUtil.cxx,v $
Language: C++
- Date: $Date: 2007/10/01 09:25:06 $
- Version: $Revision: 1.188 $
+ Date: $Date: 2008/01/02 14:58:00 $
+ Version: $Revision: 1.190 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
* value 0x0001 encoded as a little endian 16 bit short value,
* which would be the other way around...
*/
-const uint16_t Util::FMIV = 0x0100;
-uint8_t *Util::FileMetaInformationVersion = (uint8_t *)&FMIV;
-std::string Util::GDCM_MAC_ADRESS = GetMACAddress();
+
+#if defined(GDCM_WORDS_BIGENDIAN) || defined(GDCM_FORCE_BIGENDIAN_EMULATION)
+ const uint16_t Util::FMIV = 0x0001;
+#else
+ const uint16_t Util::FMIV = 0x0100;
+#endif
+ uint8_t *Util::FileMetaInformationVersion = (uint8_t *)&FMIV;
+
+ std::string Util::GDCM_MAC_ADDRESS = GetMACAddress();
//-------------------------------------------------------------------------
// Public
if ( root.empty() )
{
// gdcm UID prefix, as supplied by http://www.medicalconnections.co.uk
+ assert( !RootUID.empty() );
prefix = RootUID;
}
else
// A root was specified use it to forge our new UID:
append += ".";
//append += Util::GetMACAddress(); // to save CPU time
- append += Util::GDCM_MAC_ADRESS;
- append += ".";
+ if( !Util::GDCM_MAC_ADDRESS.empty() ) // When mac address was empty we would end up with a double . which is illegal
+ {
+ append += Util::GDCM_MAC_ADDRESS;
+ append += ".";
+ }
append += Util::GetCurrentDateTime();
append += ".";
//Also add a mini random number just in case:
ghost@aladdin.com
*/
-/* $Id: gdcmUtil.cxx,v 1.188 2007/10/01 09:25:06 jpr Exp $ */
+/* $Id: gdcmUtil.cxx,v 1.190 2008/01/02 14:58:00 malaterre Exp $ */
/*
Independent implementation of MD5 (RFC 1321).