]> Creatis software - gdcm.git/blobdiff - Example/MakeDicomDir.cxx
* Fix bug while wrapping python. The DicomDir SetStart/Progress/EndMethod are...
[gdcm.git] / Example / MakeDicomDir.cxx
index 9f87f5dfaab071a577579a93b0e10ba8fe89b237..b3465316bec24df647e59a827a90c48622910241 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: MakeDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/07/21 04:55:50 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2005/08/29 12:29:47 $
+  Version:   $Revision: 1.12 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -20,7 +20,6 @@
 #include "gdcmDicomDirPatient.h"
 #include "gdcmDirList.h"
 #include "gdcmDebug.h"
-
 #include "gdcmArgMgr.h"
 
 #include <iostream>
@@ -106,7 +105,7 @@ int main(int argc, char *argv[])
 
    dcmdir = new gdcm::DicomDir( );
 
-   dcmdir->SetStartMethod(StartMethod, (void *) NULL);
+   dcmdir->SetStartMethod(StartMethod);
    dcmdir->SetEndMethod(EndMethod);
 
    dcmdir->SetLoadMode(loadMode);
@@ -130,7 +129,9 @@ int main(int argc, char *argv[])
    delete dcmdir;
 
    // Read from disc the just written DicomDir
-   gdcm::DicomDir *newDicomDir = new gdcm::DicomDir("NewDICOMDIR");
+   gdcm::DicomDir *newDicomDir = new gdcm::DicomDir();
+   newDicomDir->SetFileName( "NewDICOMDIR" );
+   newDicomDir->Load();
    if( !newDicomDir->IsReadable() )
    {
       std::cout<<"          Written DicomDir 'NewDICOMDIR'"