]> Creatis software - gdcm.git/blobdiff - src/gdcmDicomDir.cxx
* vtk/vtkGdcmReader.cxx : correct error in vtkDebugMacro, vtkWarningMacro
[gdcm.git] / src / gdcmDicomDir.cxx
index 28160d5c3c4aedb045a16bde682cb4e8ed19a4ad..ee3b95c18920c33bb0bf28ac6234044a2d54ea3c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/11/16 16:20:23 $
-  Version:   $Revision: 1.81 $
+  Date:      $Date: 2004/11/30 17:04:01 $
+  Version:   $Revision: 1.83 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 #include <algorithm>
 #include <sys/types.h>
 
+#ifdef _MSC_VER
+#define getcwd _getcwd
+#endif
+
 #if defined( _MSC_VER) || defined(__BORLANDC__)
    #include <direct.h>
 #else
    #include <unistd.h>
 #endif
+
 namespace gdcm 
 {
 
@@ -363,7 +368,7 @@ bool DicomDir::WriteDicomDir(std::string const& fileName)
    binary_write( *fp, "DICM");
  
    DicomDirMeta *ptrMeta = GetDicomDirMeta();
-   ptrMeta->Write(fp, ExplicitVR);
+   ptrMeta->WriteContent(fp, ExplicitVR);
    
    // force writing 0004|1220 [SQ ], that CANNOT exist within DicomDirMeta
    for(i=0;i<4;++i)
@@ -375,7 +380,7 @@ bool DicomDir::WriteDicomDir(std::string const& fileName)
                                      cc != Patients.end();
                                    ++cc )
    {
-      (*cc)->Write( fp, ExplicitVR );
+      (*cc)->WriteContent( fp, ExplicitVR );
    }
    
    // force writing Sequence Delimitation Item