Program: gdcm
Module: $RCSfile: AnonymizeMultiPatient.cxx,v $
Language: C++
- Date: $Date: 2006/05/31 16:16:04 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2007/05/23 14:18:04 $
+ Version: $Revision: 1.5 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// ----- Initialize Arguments Manager ------
- gdcm::ArgMgr *am = new gdcm::ArgMgr(argc, argv);
+ GDCM_NAME_SPACE::ArgMgr *am = new GDCM_NAME_SPACE::ArgMgr(argc, argv);
if (argc == 1 || am->ArgMgrDefined("usage"))
{
std::string dirName = name;
- bool verbose = am->ArgMgrDefined("verbose");
+ int verbose = am->ArgMgrDefined("verbose");
if (am->ArgMgrDefined("debug"))
- gdcm::Debug::DebugOn();
+ GDCM_NAME_SPACE::Debug::DebugOn();
- int loadMode = gdcm::LD_ALL;
+ int loadMode = GDCM_NAME_SPACE::LD_ALL;
if ( am->ArgMgrDefined("noshadowseq") )
- loadMode |= gdcm::LD_NOSHADOWSEQ;
+ loadMode |= GDCM_NAME_SPACE::LD_NOSHADOWSEQ;
else
{
if ( am->ArgMgrDefined("noshadow") )
- loadMode |= gdcm::LD_NOSHADOW;
+ loadMode |= GDCM_NAME_SPACE::LD_NOSHADOW;
if ( am->ArgMgrDefined("noseq") )
- loadMode |= gdcm::LD_NOSEQ;
+ loadMode |= GDCM_NAME_SPACE::LD_NOSEQ;
}
// ----- Begin Processing -----
- gdcm::DicomDir *dcmdir;
+ GDCM_NAME_SPACE::DicomDir *dcmdir;
// we ask for Directory parsing
- dcmdir = gdcm::DicomDir::New( );
+ dcmdir = GDCM_NAME_SPACE::DicomDir::New( );
dcmdir->SetLoadMode(loadMode);
dcmdir->SetDirectoryName(dirName);
dcmdir->Load();
return 1;
}
- gdcm::DicomDirPatient *pa;
- gdcm::DicomDirStudy *st;
- gdcm::DicomDirSerie *se;
- gdcm::DicomDirVisit *vs;
- gdcm::DicomDirImage *im;
+ GDCM_NAME_SPACE::DicomDirPatient *pa;
+ GDCM_NAME_SPACE::DicomDirStudy *st;
+ GDCM_NAME_SPACE::DicomDirSerie *se;
+ GDCM_NAME_SPACE::DicomDirImage *im;
std::string codedName;
std::string fullFileName;
std::string patName;
- gdcm::File *f;
+ GDCM_NAME_SPACE::File *f;
pa = dcmdir->GetFirstPatient();
while ( pa )
{ // on degouline les PATIENT du DICOMDIR
patName = pa->GetEntryString(0x0010, 0x0010);
- codedName = "g^" + gdcm::Util::ConvertToMD5(patName);
+ codedName = "g^" + GDCM_NAME_SPACE::Util::ConvertToMD5(patName);
if (verbose)
std::cout << patName << " --> " << codedName << std::endl;
st = pa->GetFirstStudy();
while ( im )
{ // on degouline les Images de cette serie
fullFileName = dirName;
- fullFileName += gdcm::GDCM_FILESEPARATOR;
+ fullFileName += GDCM_NAME_SPACE::GDCM_FILESEPARATOR;
fullFileName += im->GetEntryString(0x0004, 0x1500);
if (verbose)
std::cout << "FileName " << fullFileName << std::endl;
- f = gdcm::File::New( );
+ f = GDCM_NAME_SPACE::File::New( );
f->SetLoadMode(loadMode);
f->SetFileName( fullFileName );
if ( !f->Load() )
//
// Overwrite the file
//
- // The gdcm::File remains untouched in memory
+ // The GDCM_NAME_SPACE::File remains untouched in memory
f->AnonymizeNoLoad();