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/30 15:13:05 $
+ Version: $Revision: 1.14 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "gdcmDicomDirPatient.h"
#include "gdcmDirList.h"
#include "gdcmDebug.h"
-
#include "gdcmArgMgr.h"
#include <iostream>
char *dirName;
dirName = am->ArgMgrGetString("dirName",(char *)".");
- int loadMode = 0x00000000;
+ int loadMode = gdcm::LD_ALL;
if ( am->ArgMgrDefined("noshadowseq") )
- loadMode |= NO_SHADOWSEQ;
+ loadMode |= gdcm::LD_NOSHADOWSEQ;
else
{
if ( am->ArgMgrDefined("noshadow") )
- loadMode |= NO_SHADOW;
+ loadMode |= gdcm::LD_NOSHADOW;
if ( am->ArgMgrDefined("noseq") )
- loadMode |= NO_SEQ;
+ loadMode |= gdcm::LD_NOSEQ;
}
if (am->ArgMgrDefined("debug"))
dcmdir = new gdcm::DicomDir( );
- dcmdir->SetStartMethod(StartMethod, (void *) NULL);
+ dcmdir->SetStartMethod(StartMethod);
dcmdir->SetEndMethod(EndMethod);
dcmdir->SetLoadMode(loadMode);
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'"