]> Creatis software - gdcm.git/commitdiff
* bug fix for compilation on MSVC6
authorregrain <regrain>
Sat, 22 Jan 2005 12:39:10 +0000 (12:39 +0000)
committerregrain <regrain>
Sat, 22 Jan 2005 12:39:10 +0000 (12:39 +0000)
   * gdcmPython/gdcm.i : rename of classes missed
   -- BeNours

ChangeLog
Example/TestWriteSimple.cxx
gdcmPython/gdcm.i
src/gdcmCommon.h

index 3bf409f0f52a4aed3cecd75f0bf536b575e96c59..7dafde2332a15e713f5ef81558db3631849853e1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-01-22 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
+   * bug fix for compilation on MSVC6
+   * gdcmPython/gdcm.i : rename of classes missed
+
 2005-01-20 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
    * gdcmDicomDirElement.[h|cxx] : change the AddEntry method. Now, it gets a
      type and not a string. So, there remove problems on the format of the
index 2e60574c6cec38ae54161575ad270b42be047f8a..7c76e13eac3b1172ca8c4dcbfbc7ff624d6fb87b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestWriteSimple.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/21 11:40:53 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2005/01/22 12:39:11 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 
 int main(int argc, char* argv[])
 {
+   if (argc < 3) 
+   {
+      std::cerr << "Usage :" << std::endl << argv[0]
+                << " InputFile OutputDicom" << std::endl;
+      return 0;
+   }
 
-  if (argc < 3) 
-    {
-    std::cerr << "Usage :" << std::endl << argv[0] << 
-      " InputFile OutputDicom" << std::endl;
-    return 0;
-    }
-
-  std::string header = argv[1];
-  const char *output = argv[2];
-
-  gdcm::File       *f1 = new gdcm::File( header );
-  gdcm::FileHelper   *f2 = new gdcm::FileHelper( f1 );
-
-  // If the following call is important, then the API sucks. Why is it
-  // required to allocate PixelData when we are not using it !?
-  uint8_t* PixelData = f2->GetImageData(); //EXTREMELY IMPORTANT
-  //Otherwise ReadPixel == -1 -> the dicom writing fails completely
-  
-  int dataSize    = f2->GetImageDataSize();
-  // unsigned char cast is necessary to be able to delete the buffer
-  // since deleting a void* is not allowed in c++
-  uint8_t *imageData = (uint8_t *)f2->GetImageData();
-
-  f2->SetImageData( imageData, dataSize );
-
-  f2->WriteDcmExplVR( output );
-  
-  delete f1;
-  delete f2;
-  //delete PixelData; //Does GetImageData return the same pointer ?
-  (void)PixelData;
-
-  return 0;
+   std::string header = argv[1];
+   const char *output = argv[2];
+
+   gdcm::File       *f1 = new gdcm::File( header );
+   gdcm::FileHelper   *f2 = new gdcm::FileHelper( f1 );
+
+   // If the following call is important, then the API sucks. Why is it
+   // required to allocate PixelData when we are not using it !?
+   uint8_t* PixelData = f2->GetImageData(); //EXTREMELY IMPORTANT
+   //Otherwise ReadPixel == -1 -> the dicom writing fails completely
+
+   int dataSize    = f2->GetImageDataSize();
+   // unsigned char cast is necessary to be able to delete the buffer
+   // since deleting a void* is not allowed in c++
+   uint8_t *imageData = (uint8_t *)f2->GetImageData();
+
+   f2->SetImageData( imageData, dataSize );
+
+   f2->WriteDcmExplVR( output );
+
+   delete f1;
+   delete f2;
+   //delete PixelData; //Does GetImageData return the same pointer ?
+   (void)PixelData;
+
+   return 0;
 }
 
index 2d3c5ad64e9d5a13c1c255949d7017b85ee0ab41..cb5aaeac68e414c75cb41400cceac4755156ead0 100644 (file)
@@ -18,7 +18,7 @@
 #include "gdcmElementSet.h"
 #include "gdcmFileHelper.h"
 #include "gdcmGlobal.h"
-#include "gdcmHeader.h"
+#include "gdcmFile.h"
 #include "gdcmSerieHeader.h"
 #include "gdcmRLEFramesInfo.h"
 #include "gdcmJPEGFragmentsInfo.h"
@@ -288,13 +288,13 @@ using namespace gdcm;
 ////////////////////////////////////////////////////////////////////////////
 // Because overloading and %rename don't work together (see below Note 1)
 // we need to ignore some methods (e.g. the overloaded default constructor).
-// The gdcm::Header class doesn't have any SetFilename method anyhow, and
+// The gdcm::File class doesn't have any SetFilename method anyhow, and
 // this constructor is only used internaly (not from the API) so this is
 // not a big loss.
 %ignore gdcm::binary_write(std::ostream &,uint32_t const &);
 %ignore gdcm::binary_write(std::ostream &,uint16_t const &);
 
-%ignore gdcm::Header::Header();
+%ignore gdcm::File::File();
 %ignore gdcm::DicomDir::DicomDir();
 
 // Ignore all placed in gdcmCommon.h
@@ -322,7 +322,7 @@ using namespace gdcm;
 %include "gdcmDicomDirPatient.h"
 %include "gdcmDicomDirMeta.h"
 %include "gdcmDocument.h"
-%include "gdcmHeader.h"
+%include "gdcmFile.h"
 %include "gdcmSerieHeader.h"
 %include "gdcmFile.h"
 %include "gdcmUtil.h"
index ddd95eb7e4b81529aea7a5ceed8090cd699c7625..82b8dae28b1b702449f0d4c337e9aba1dcae6098 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmCommon.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/21 20:49:37 $
-  Version:   $Revision: 1.54 $
+  Date:      $Date: 2005/01/22 12:39:12 $
+  Version:   $Revision: 1.55 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -54,7 +54,7 @@ typedef  signed char    int8_t;
 typedef  unsigned char    uint8_t;
 typedef  unsigned short   uint16_t;
 typedef  unsigned int     uint32_t;
-typedef  unsigned __int64 uint64_t;
+#define uint64_t unsigned __int64    //  problems with swig when using a typedef
 #define UINT32_MAX    (4294967295U)
 #endif