X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FexExtractDicomTags.cxx;h=223e4652269d30c5463cfea079e29c2f18709d28;hb=5f2a9e86acc7c14559f0c692af86f4e92ccf8a87;hp=c799f927acf3132ec8342688594bd17cd14274ff;hpb=bc69950a406d06c50f0fb75a96572784965cb534;p=gdcm.git diff --git a/Example/exExtractDicomTags.cxx b/Example/exExtractDicomTags.cxx index c799f927..223e4652 100644 --- a/Example/exExtractDicomTags.cxx +++ b/Example/exExtractDicomTags.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: exExtractDicomTags.cxx,v $ Language: C++ - Date: $Date: 2005/10/18 08:35:44 $ - Version: $Revision: 1.2 $ + Date: $Date: 2007/05/23 14:18:05 $ + 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 @@ -51,7 +51,7 @@ int main(int argc, char *argv[]) // ----- Initialize Arguments Manager ------ - gdcm::ArgMgr *am = new gdcm::ArgMgr(argc, argv); + GDCM_NAME_SPACE::ArgMgr *am = new GDCM_NAME_SPACE::ArgMgr(argc, argv); if (am->ArgMgrDefined("usage")) { @@ -67,7 +67,7 @@ int main(int argc, char *argv[]) } if (am->ArgMgrDefined("debug")) - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); // if unused Params we give up if ( am->ArgMgrPrintUnusedLabels() ) @@ -83,14 +83,14 @@ int main(int argc, char *argv[]) int loadMode = 0x0; // load everything - gdcm::File *f = new gdcm::File(); + GDCM_NAME_SPACE::File *f = GDCM_NAME_SPACE::File::New(); f->SetLoadMode( loadMode ); f->SetFileName( fileName ); bool res = f->Load(); if ( !res ) { - delete f; + f->Delete(); return 0; } @@ -98,7 +98,7 @@ int main(int argc, char *argv[]) if (!f->IsReadable()) { std::cout << "NOT a Dicom File : " << fileName <Delete(); return 1; } @@ -123,8 +123,8 @@ int main(int argc, char *argv[]) std::string ProtocolName; -// ------------> Region (Organe) : aucun champ DICOM n'est prévu -// pour contenir cette information +// ------------> Region (Organ) : *no* DICOM field is expected +// to hold information // Get informations on the file : // Modality, Transfer Syntax, Study Date, Study Time @@ -136,7 +136,7 @@ int main(int argc, char *argv[]) StudyTime = f->GetEntryString(0x0008,0x0030); PatientName = f->GetEntryString(0x0010,0x0010); PatientID = f->GetEntryString(0x0010,0x0020); //patientid - PatientSex = f->GetEntryString(0x0010,0x0040); //sexe + PatientSex = f->GetEntryString(0x0010,0x0040); //sex SOPInstanceUID = f->GetEntryString(0x0008,0x0018); //imageid = SOPinsUID StudyInstanceUID = f->GetEntryString(0x0020,0x000d); //STUInsUID [Study Instance UID] [1.2.840.113680.1.103.56887.1017329008.714317] SeriesInstanceUID = f->GetEntryString(0x0020,0x000e); //SerInsUID @@ -162,12 +162,12 @@ int main(int argc, char *argv[]) ProtocolName = f->GetEntryString(0x0018,0x1030); - // --> Big trouble with nz (mb of planes) and nt (number of 'times') + // --> Big trouble with nz (number of planes) and nt (number of 'times') // --> that belong to LibIDO, not to DICOM. // --> DICOM has 'Number of Frames' (0028|0008), // that's more or less number of 'times' // Volumes are generaly stored in a 'Serie' - // (hope so ... a single Serie be xti-slice xti-times) + // (hope so ... a single Serie may be xti-slice xti-times) std::string Rows; @@ -247,5 +247,6 @@ int main(int argc, char *argv[]) std::cout << "GetYSpacing = [" << sy << "]" << std::endl; std::cout << "GetZSpacing = [" << sz << "]" << std::endl; + f->Delete(); return 0; }