]> Creatis software - gdcm.git/blobdiff - src/gdcmUtil.cxx
COMP: Quickly fix comp on bcc55, dont understand why this was failing (put back old...
[gdcm.git] / src / gdcmUtil.cxx
index b1feafb049e249ddbb5b5969838dcf61dc9231f6..35384b64b2dd1ebbf2ac592d2ebd140fe0200490 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmUtil.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/18 08:35:50 $
-  Version:   $Revision: 1.165 $
+  Date:      $Date: 2005/10/24 22:49:57 $
+  Version:   $Revision: 1.168 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -95,7 +95,13 @@ namespace gdcm
 //-------------------------------------------------------------------------
 const std::string Util::GDCM_UID = "1.2.826.0.1.3680043.2.1143";
 std::string Util::RootUID        = GDCM_UID;
-const uint16_t Util::FMIV = 0x0001;
+/*
+ * File Meta Information Version (0002,0001) shall contain a two byte OB 
+ * value consisting of a 0x00 byte, followed by 0x01 byte, and not the 
+ * 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();
 
@@ -896,7 +902,7 @@ std::string Util::CreateUniqueUID(const std::string &root)
    append += Util::GDCM_MAC_ADRESS;
    append += ".";
    append += Util::GetCurrentDateTime();
-
+   append += ".";
    //Also add a mini random number just in case:
    char tmp[10];
    int r = (int) (100.0*rand()/RAND_MAX);