]> Creatis software - gdcm.git/commitdiff
* Test/TestWriteSimple.cxx: fix to gdcmHeader-gdcmHeaderHelper revamping.
authorfrog <frog>
Mon, 21 Jun 2004 08:47:13 +0000 (08:47 +0000)
committerfrog <frog>
Mon, 21 Jun 2004 08:47:13 +0000 (08:47 +0000)
      The default constructor invoked by the line
         gdcmHeader *f1 = new gdcmHeader( header );
      was gdcmHeader::gdcmHeader(bool) instead of the expected
      gdcmHeader::gdcmHeader(std::string const &, bool = false, bool, bool).
      Hence the parsing wasn't executed... See also below.
    * src/gdcmHeader.h: the declaration of gdcmHeader::gdcmHeader(bool)
      as explicit constructor didn't do the trick to fix the above problem.
      Could anyone explain why ?   --- Frog

ChangeLog
Testing/TestWriteSimple.cxx
src/gdcmHeader.h

index cb3908f362b928e0c7f27c2f51325b6ceb01cfc9..2253ee223b895e4cce5b73003f5fc15e749ba422 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2004-06-21 Eric Boix <Eric.Boix@creatis.insa-lyon.fr>
+    * Test/TestWriteSimple.cxx: fix to gdcmHeader-gdcmHeaderHelper revamping.
+      The default constructor invoked by the line
+         gdcmHeader *f1 = new gdcmHeader( header );
+      was gdcmHeader::gdcmHeader(bool) instead of the expected
+      gdcmHeader::gdcmHeader(std::string const &, bool = false, bool, bool).
+      Hence the parsing wasn't executed... See also below.
+    * src/gdcmHeader.h: the declaration of gdcmHeader::gdcmHeader(bool)
+      as explicit constructor didn't do the trick to fix the above problem.
+      Could anyone explain why ?
+
 2004-06-20 Eric Boix <Eric.Boix@creatis.insa-lyon.fr>
     * In order to fix memory leaks:
      - Test/TestWriteSimple.cxx: added cleaning of free store through
index 74531f9b75147ce047f6c2228ec14ba0a18aaedb..49c7a530722f85c3804f20e6a2859729cf9f8857 100644 (file)
@@ -13,7 +13,7 @@ int TestWriteSimple(int argc, char* argv[])
     return 0;  
     }
 
-  const char *header = argv[1];
+  std::string header = argv[1];
   const char *output = argv[2];
 
   gdcmHeader *f1 = new gdcmHeader( header );
index 75d5eb1a99643bff75a246cd448efbaab56c02d5..19326cc9c8b57bd3deecb717ee52f90c2bd653de 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmHeader.h,v $
   Language:  C++
-  Date:      $Date: 2004/06/21 04:18:26 $
-  Version:   $Revision: 1.75 $
+  Date:      $Date: 2004/06/21 08:47:14 $
+  Version:   $Revision: 1.76 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -107,7 +107,7 @@ protected:
    guint16 GrPixel;
 
 public:
-   gdcmHeader(bool exception_on_error = false);
+   explicit gdcmHeader(bool exception_on_error = false);
    gdcmHeader(std::string const & filename, 
               bool  exception_on_error = false, 
               bool  enable_sequences   = false,