]> Creatis software - gdcm.git/blobdiff - Example/TestCopyDicom.cxx
ENH: dos2unix CMakeLists.txt to allow diffing of directory with VTK + remove tabs
[gdcm.git] / Example / TestCopyDicom.cxx
index f0f7c23388d3618ccecbdc3f9ba77658297a5df5..2edc47f8597b8a04dc85164c64c009ea80af353e 100644 (file)
@@ -6,6 +6,8 @@
 
 #ifndef _WIN32
 #include <unistd.h> //for access, unlink
+#else
+#include <io.h> //for _access
 #endif
 
 // return true if the file exists
@@ -47,6 +49,8 @@ int main(int argc, char* argv[])
       return 1;
    }
 
+// don't modify identation in order to let this source xdiffable with ../Test
+
       std::string filename = argv[1];
       std::string output = argv[2];
 
@@ -69,7 +73,7 @@ int main(int argc, char* argv[])
       TagDocEntryHT & Ht = original->GetHeader()->GetEntry();
 
       size_t dataSize = original->GetImageDataSize();
-      void *imageData = original->GetImageData();
+      uint8_t* imageData = original->GetImageData();
   
       //First of all copy the header field by field
   
@@ -87,7 +91,7 @@ int main(int argc, char* argv[])
          if ( gdcmBinEntry* b = dynamic_cast<gdcmBinEntry*>(d) )
          {              
             copy->GetHeader()->ReplaceOrCreateByNumber( 
-                                 b->GetVoidArea(),
+                                 b->GetBinArea(),
                                  b->GetLength(),
                                  b->GetGroup(), 
                                  b->GetElement(),