Program: gdcm
Module: $RCSfile: TestMakeDicomDir.cxx,v $
Language: C++
- Date: $Date: 2005/11/28 15:20:29 $
- Version: $Revision: 1.11 $
+ Date: $Date: 2007/06/21 14:59:06 $
+ Version: $Revision: 1.13 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "gdcmDicomDir.h"
#include "gdcmDicomDirPatient.h"
#include "gdcmDirList.h"
+#include "gdcmCommandManager.h"
#include "gdcmDebug.h"
// ---
-class CommandStart : public gdcm::Command
+class CommandStart : public GDCM_NAME_SPACE::Command
{
gdcmTypeMacro(CommandStart);
gdcmNewMacro(CommandStart);
CommandStart() {}
};
-class CommandEnd : public gdcm::Command
+class CommandEnd : public GDCM_NAME_SPACE::Command
{
gdcmTypeMacro(CommandEnd);
gdcmNewMacro(CommandEnd);
CommandEnd() {}
};
-class CommandProgress : public gdcm::Command
+class CommandProgress : public GDCM_NAME_SPACE::Command
{
gdcmTypeMacro(CommandProgress);
gdcmNewMacro(CommandProgress);
public :
virtual void Execute()
{
- gdcm::DicomDir *dd=dynamic_cast<gdcm::DicomDir *>(GetObject());
+ GDCM_NAME_SPACE::DicomDir *dd=dynamic_cast<GDCM_NAME_SPACE::DicomDir *>(GetObject());
if(dd)
std::cerr << "Progress parsing (" << dd->GetProgress() << ")" << std::endl;
dirName = GDCM_DATA_ROOT;
}
- gdcm::DicomDir *dcmdir;
+ GDCM_NAME_SPACE::DicomDir *dcmdir;
// new style (user is allowed no to load Sequences an/or Shadow Groups)
- dcmdir = gdcm::DicomDir::New( );
+ dcmdir = GDCM_NAME_SPACE::DicomDir::New( );
- gdcm::Command *cmd;
+ GDCM_NAME_SPACE::Command *cmd;
cmd = CommandStart::New();
- dcmdir->SetCommand(gdcm::CMD_STARTPROGRESS,cmd);
+ GDCM_NAME_SPACE::CommandManager::SetCommand(dcmdir,GDCM_NAME_SPACE::CMD_STARTPROGRESS,cmd);
cmd->Delete();
cmd = CommandProgress::New();
- dcmdir->SetCommand(gdcm::CMD_PROGRESS,cmd);
+ GDCM_NAME_SPACE::CommandManager::SetCommand(dcmdir,GDCM_NAME_SPACE::CMD_PROGRESS,cmd);
cmd->Delete();
cmd = CommandEnd::New();
- dcmdir->SetCommand(gdcm::CMD_ENDPROGRESS,cmd);
+ GDCM_NAME_SPACE::CommandManager::SetCommand(dcmdir,GDCM_NAME_SPACE::CMD_ENDPROGRESS,cmd);
cmd->Delete();
// dcmdir->SetLoadMode(gdcm::LD_NOSEQ | gdcm::LD_NOSHADOW);
// some images have a wrong length for element 0x0000 of private groups
- dcmdir->SetLoadMode(gdcm::LD_NOSEQ);
+ dcmdir->SetLoadMode(GDCM_NAME_SPACE::LD_NOSEQ);
dcmdir->SetDirectoryName(dirName);
dcmdir->Load();
dcmdir->Delete();
// Read from disc the just written DicomDir
- gdcm::DicomDir *newDicomDir = gdcm::DicomDir::New();
+ GDCM_NAME_SPACE::DicomDir *newDicomDir = GDCM_NAME_SPACE::DicomDir::New();
newDicomDir->SetFileName("NewDICOMDIR");
newDicomDir->Load();