X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FMakeDicomDir.cxx;h=b3465316bec24df647e59a827a90c48622910241;hb=278965e64eb49669b1a05493843f97144d8323b4;hp=5723db7de90643b7adcdf408533312f5e000a87b;hpb=4d992954520d43c6f2fb555b7cd721574978c23a;p=gdcm.git diff --git a/Example/MakeDicomDir.cxx b/Example/MakeDicomDir.cxx index 5723db7d..b3465316 100644 --- a/Example/MakeDicomDir.cxx +++ b/Example/MakeDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: MakeDicomDir.cxx,v $ Language: C++ - Date: $Date: 2005/07/07 17:31:53 $ - Version: $Revision: 1.8 $ + 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 @@ -48,14 +47,17 @@ void EndMethod(void *toto) { int main(int argc, char *argv[]) { START_USAGE(usage) - " \n MakeDicomDir :\n", - " Explores recursively the given directory, makes the relevant DICOMDIR", - " and writes it as 'NewDICOMDIR'", - " usage: MakeDicomDir dirname=rootDirectoryName [noshadowseq][noshadow][noseq] [debug] ", - " noshadowseq: user doesn't want to load Private Sequences", - " noshadow : user doesn't want to load Private groups (odd number)", - " noseq : user doesn't want to load Sequences ", - " debug : user wants to run the program in 'debug mode' ", + " \n MakeDicomDir :\n ", + " Explores recursively the given directory, makes the relevant DICOMDIR ", + " and writes it as 'NewDICOMDIR' ", + " ", + " usage: MakeDicomDir dirname=rootDirectoryName ", + " [noshadowseq][noshadow][noseq] [debug] ", + " ", + " noshadowseq: user doesn't want to load Private Sequences ", + " noshadow : user doesn't want to load Private groups (odd number) ", + " noseq : user doesn't want to load Sequences ", + " debug : user wants to run the program in 'debug mode' ", FINISH_USAGE // ----- Initialize Arguments Manager ------ @@ -102,14 +104,13 @@ int main(int argc, char *argv[]) // we ask for Directory parsing dcmdir = new gdcm::DicomDir( ); - dcmdir->SetParseDir(true); - dcmdir->SetStartMethod(StartMethod, (void *) NULL); + dcmdir->SetStartMethod(StartMethod); dcmdir->SetEndMethod(EndMethod); dcmdir->SetLoadMode(loadMode); - dcmdir->SetFileName(dirName); - + dcmdir->SetDirectoryName(dirName); + //dcmdir->SetParseDir(true); dcmdir->Load(); // ----- Check the result @@ -128,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'"