Program: gdcm
Module: $RCSfile: AnonymizeDicomDir.cxx,v $
Language: C++
- Date: $Date: 2005/10/25 14:52:26 $
- Version: $Revision: 1.9 $
+ Date: $Date: 2007/03/23 14:59:58 $
+ Version: $Revision: 1.10 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
START_USAGE(usage)
- " \n AnonymizeDicomDir :\n",
- " Anonymize a gdcm-readable DICOMDIR ",
- " even when some 'Objects' are not yet taken into account",
- " Warning : the DICOMDIR is overwritten",
- " usage: AnonymizeDicomDir filein=dicomDirName [debug] ",
- " debug : user wants to run the program in 'debug mode' ",
+ " \n AnonymizeDicomDir :\n ",
+ " Anonymize a gdcm-readable DICOMDIR ",
+ " even when some 'Objects' are not yet taken into account ",
+ " Warning : the DICOMDIR is overwritten ",
+ " usage: AnonymizeDicomDir filein=dicomDirName [debug] ",
+ " debug : developper wants to run the program in 'debug mode' ",
FINISH_USAGE
// ----- Initialize Arguments Manager ------
Program: gdcm
Module: $RCSfile: MakeDicomDir.cxx,v $
Language: C++
- Date: $Date: 2006/07/18 10:12:56 $
- Version: $Revision: 1.22 $
+ Date: $Date: 2007/03/23 14:59:58 $
+ Version: $Revision: 1.23 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
" 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' ",
+ " debug : developper wants to run the program in 'debug mode' ",
" check : the dicomdir is checked as 'gdcm readable' ",
FINISH_USAGE
// ----- Begin Processing -----
gdcm::DicomDir *dcmdir;
-
-
// we ask for Directory parsing
//dcmdir->SetParseDir(true);
// struct tms tms1, tms2; // Time measurements
- // times(&tms1);
- dcmdir->Load();
+ // times(&tms1);
+
+ dcmdir->Load(); // Reads all the files and creates the gdcm::DicomDir
+
//times(&tms2);
//std::cout
// << (long) ((tms2.tms_utime) - (tms1.tms_utime))
return 1;
}
- // ----- Create the corresponding DicomDir
+ // ----- Writes the corresponding DICOMDIR file (from the gdcm::DicomDir)
dcmdir->Write(name);
dcmdir->Delete();
Program: gdcm
Module: $RCSfile: ReWrite.cxx,v $
Language: C++
- Date: $Date: 2007/03/06 10:19:00 $
- Version: $Revision: 1.21 $
+ Date: $Date: 2007/03/23 14:59:58 $
+ Version: $Revision: 1.22 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
if (beg == -1)
beg = 0;
if (end == -1)
- end = nZ;
+ end = nZ-1;
std::ostringstream str;
Program: gdcm
Module: $RCSfile: exMoveImagesToSingleSerieUID.cxx,v $
Language: C++
- Date: $Date: 2006/07/19 09:04:46 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2007/03/23 14:59:58 $
+ Version: $Revision: 1.3 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
exMoveImagesToSingleSerieUID
dirin=inputDirectoryName
dirout=outputDirectoryName
- [studyUID = ] [patName = ] [Zspacing = ]
- [ { [noshadowseq] | [noshadow][noseq] } ] [debug]
- [verbose]",
+ [studyUID = ] [patName = ] [Zspacing = ]
+ [ { [noshadowseq] | [noshadow][noseq] } ] [debug]
+ [verbose]",
dirin : single-level Directory containing the images
delete am;
return 0;
}
+
+/*
char *fileName = am->ArgMgrWantString("filein",usage);
if ( fileName == NULL )
{
delete am;
return 0;
}
+*/
+
+
+ const char *fileName = am->ArgMgrGetString("filein");
+ const char *dirName = am->ArgMgrGetString("dirin");
+
+ if ( (fileName == 0 && dirName == 0) ||
+ (fileName != 0 && dirName != 0) )
+ {
+ std::cerr << std::endl
+ << "Either 'filein=' or 'dirin=' must be present;"
+ << std::endl << "Not both" << std::endl;
+ am->ArgMgrUsage(usage); // Display 'usage'
+ delete am;
+ return 1;
+ }
+
char *outputFileName = am->ArgMgrWantString("fileout",usage);
if ( outputFileName == NULL )
}
if (am->ArgMgrDefined("debug"))
gdcm::Debug::DebugOn();
-
+
+ if (am->ArgMgrDefined("warning"))
+ gdcm::Debug::WarningOn();
+
// if unused Param we give up
if ( am->ArgMgrPrintUnusedLabels() )
{