]> Creatis software - gdcm.git/blobdiff - Testing/TestCopyDicom.cxx
ENH: Fix a warning with gcc4: TestHash.cxx:20: warning: deprecated conversion from...
[gdcm.git] / Testing / TestCopyDicom.cxx
index 9f781aefe9435db17a30a1062b3b6d1b2c3a9e7b..62e1a727e9a1a68e0c51a0520786bcdf13132076 100644 (file)
@@ -9,6 +9,8 @@
 
 #ifndef _WIN32
 #include <unistd.h> //for access, unlink
+#else
+#include <io.h> //for _access on Win32
 #endif
 
 // return true if the file exists
@@ -69,6 +71,9 @@ int TestCopyDicom(int , char* [])
 
       TagDocEntryHT & Ht = original->GetHeader()->GetEntry();
 
+      size_t dataSize = original->GetImageDataSize();
+      uint8_t* imageData = original->GetImageData();
+
       //First of all copy the header field by field
   
       // Warning :Accessor gdcmElementSet::GetEntry() should not exist 
@@ -84,7 +89,7 @@ int TestCopyDicom(int , char* [])
          if ( gdcmBinEntry* b = dynamic_cast<gdcmBinEntry*>(d) )
          {              
             copy->GetHeader()->ReplaceOrCreateByNumber( 
-                                 b->GetVoidArea(),
+                                 b->GetBinArea(),
                                  b->GetLength(),
                                  b->GetGroup(), 
                                  b->GetElement(),
@@ -108,9 +113,6 @@ int TestCopyDicom(int , char* [])
          }
       }
 
-      size_t dataSize = original->GetImageDataSize();
-      void *imageData = original->GetImageData();
-
       copy->SetImageData(imageData, dataSize);
       original->GetHeader()->SetImageDataSize(dataSize);