From 28d134e7a6dcc11f3703bb8ec85334636f57f56e Mon Sep 17 00:00:00 2001 From: malaterre Date: Sat, 9 Oct 2004 03:21:55 +0000 Subject: [PATCH] ENH: Still remove some sprintf and rework internals --- src/gdcmDicomDir.cxx | 199 +++++++++++++++++++----------------- src/gdcmDicomDir.h | 72 ++++++------- src/gdcmDicomDirElement.cxx | 38 +++---- src/gdcmDicomDirElement.h | 67 ++++++------ src/gdcmDicomDirObject.cxx | 10 +- 5 files changed, 200 insertions(+), 186 deletions(-) diff --git a/src/gdcmDicomDir.cxx b/src/gdcmDicomDir.cxx index 3a57a57a..d9f71b67 100644 --- a/src/gdcmDicomDir.cxx +++ b/src/gdcmDicomDir.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDir.cxx,v $ Language: C++ - Date: $Date: 2004/09/27 08:39:05 $ - Version: $Revision: 1.70 $ + Date: $Date: 2004/10/09 03:21:55 $ + Version: $Revision: 1.71 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -16,16 +16,6 @@ =========================================================================*/ -#include -#include -#include - -#ifdef _MSC_VER - #include -#else - #include -#endif - #include "gdcmDicomDir.h" #include "gdcmDicomDirStudy.h" #include "gdcmDicomDirSerie.h" @@ -39,6 +29,16 @@ #include "gdcmSQItem.h" #include "gdcmValEntry.h" +#include +#include +#include + +#ifdef _MSC_VER + #include +#else + #include +#endif + //----------------------------------------------------------------------------- // For full DICOMDIR description, see: // PS 3.3-2003, pages 731-750 @@ -54,7 +54,7 @@ gdcmDicomDir::gdcmDicomDir() { Initialize(); // sets all private fields to NULL std::string pathBidon = "Bidon"; // Sorry, NULL not allowed ... - metaElems = NewMeta(); + MetaElems = NewMeta(); } /** @@ -87,15 +87,14 @@ gdcmDicomDir::gdcmDicomDir(std::string const & fileName, bool parseDir ): { // user passed '.' as Name // we get current directory name - char* dummy = new char[1000]; + char dummy[1000]; getcwd(dummy, (size_t)1000); SetFileName( dummy ); // will be converted into a string - delete[] dummy; // no longer needed } if ( parseDir ) // user asked for a recursive parsing of a root directory { - metaElems = NewMeta(); + MetaElems = NewMeta(); dbg.Verbose(0, "gdcmDicomDir::gdcmDicomDir : Parse directory" " and create the DicomDir"); @@ -131,15 +130,15 @@ gdcmDicomDir::~gdcmDicomDir() SetStartMethod(NULL); SetProgressMethod(NULL); SetEndMethod(NULL); - for(ListDicomDirPatient::iterator cc = patients.begin(); - cc!= patients.end(); + for(ListDicomDirPatient::iterator cc = Patients.begin(); + cc!= Patients.end(); ++cc) { delete *cc; } - if ( metaElems ) + if ( MetaElems ) { - delete metaElems; + delete MetaElems; } } @@ -150,13 +149,13 @@ gdcmDicomDir::~gdcmDicomDir() */ void gdcmDicomDir::Print(std::ostream &os) { - if(metaElems) + if( MetaElems ) { - metaElems->SetPrintLevel(PrintLevel); - metaElems->Print(os); + MetaElems->SetPrintLevel(PrintLevel); + MetaElems->Print(os); } - for(ListDicomDirPatient::iterator cc = patients.begin(); - cc != patients.end(); + for(ListDicomDirPatient::iterator cc = Patients.begin(); + cc != Patients.end(); ++cc) { (*cc)->SetPrintLevel( PrintLevel ); @@ -180,11 +179,11 @@ bool gdcmDicomDir::IsReadable() { return false; } - if( !metaElems ) + if( !MetaElems ) { return false; } - if( patients.size() <= 0 ) + if( Patients.size() <= 0 ) { return false; } @@ -198,20 +197,20 @@ bool gdcmDicomDir::IsReadable() void gdcmDicomDir::Initialize() { - startMethod = NULL; - progressMethod = NULL; - endMethod = NULL; - startMethodArgDelete = NULL; - progressMethodArgDelete = NULL; - endMethodArgDelete = NULL; - startArg = NULL; - progressArg = NULL; - endArg = NULL; - - progress = 0.0; - abort = false; - - metaElems = 0; + StartMethod = NULL; + ProgressMethod = NULL; + EndMethod = NULL; + StartMethodArgDelete = NULL; + ProgressMethodArgDelete = NULL; + EndMethodArgDelete = NULL; + StartArg = NULL; + ProgressArg = NULL; + EndArg = NULL; + + Progress = 0.0; + Abort = false; + + MetaElems = 0; } @@ -236,14 +235,14 @@ void gdcmDicomDir::ParseDirectory() void gdcmDicomDir::SetStartMethod(gdcmMethod* method, void* arg, gdcmMethod* argDelete ) { - if( startArg && startMethodArgDelete ) + if( StartArg && StartMethodArgDelete ) { - startMethodArgDelete( startArg ); + StartMethodArgDelete( StartArg ); } - startMethod = method; - startArg = arg; - startMethodArgDelete = argDelete; + StartMethod = method; + StartArg = arg; + StartMethodArgDelete = argDelete; } /** @@ -255,7 +254,7 @@ void gdcmDicomDir::SetStartMethod(gdcmMethod* method, void* arg, */ void gdcmDicomDir::SetStartMethodArgDelete(gdcmMethod* method) { - startMethodArgDelete = method; + StartMethodArgDelete = method; } /** @@ -269,14 +268,14 @@ void gdcmDicomDir::SetStartMethodArgDelete(gdcmMethod* method) void gdcmDicomDir::SetProgressMethod(gdcmMethod* method, void* arg, gdcmMethod* argDelete ) { - if( progressArg && progressMethodArgDelete ) + if( ProgressArg && ProgressMethodArgDelete ) { - progressMethodArgDelete( progressArg ); + ProgressMethodArgDelete( ProgressArg ); } - progressMethod = method; - progressArg = arg; - progressMethodArgDelete = argDelete; + ProgressMethod = method; + ProgressArg = arg; + ProgressMethodArgDelete = argDelete; } /** @@ -288,7 +287,7 @@ void gdcmDicomDir::SetProgressMethod(gdcmMethod* method, void* arg, */ void gdcmDicomDir::SetProgressMethodArgDelete(gdcmMethod* method) { - progressMethodArgDelete = method; + ProgressMethodArgDelete = method; } /** @@ -302,14 +301,14 @@ void gdcmDicomDir::SetProgressMethodArgDelete(gdcmMethod* method) void gdcmDicomDir::SetEndMethod(gdcmMethod* method, void* arg, gdcmMethod* argDelete ) { - if( endArg && endMethodArgDelete ) + if( EndArg && EndMethodArgDelete ) { - endMethodArgDelete( endArg ); + EndMethodArgDelete( EndArg ); } - endMethod = method; - endArg = arg; - endMethodArgDelete = argDelete; + EndMethod = method; + EndArg = arg; + EndMethodArgDelete = argDelete; } /** @@ -321,7 +320,7 @@ void gdcmDicomDir::SetEndMethod(gdcmMethod* method, void* arg, */ void gdcmDicomDir::SetEndMethodArgDelete(gdcmMethod* method) { - endMethodArgDelete = method; + EndMethodArgDelete = method; } /** @@ -348,11 +347,10 @@ bool gdcmDicomDir::WriteDicomDir(std::string const& fileName) return false; } - uint8_t* filePreamble = new uint8_t[128]; + uint8_t filePreamble[128]; memset(filePreamble, 0, 128); fwrite(filePreamble,128,1,fp); fwrite("DICM",4,1,fp); - delete[] filePreamble; gdcmDicomDirMeta *ptrMeta = GetDicomDirMeta(); ptrMeta->Write(fp, gdcmExplicitVR); @@ -360,7 +358,9 @@ bool gdcmDicomDir::WriteDicomDir(std::string const& fileName) // force writing 0004|1220 [SQ ], that CANNOT exist within gdcmDicomDirMeta fwrite(&sq[0],8,1,fp); // 0004 1220 ffff ffff - for(ListDicomDirPatient::iterator cc = patients.begin();cc!=patients.end();++cc) + for(ListDicomDirPatient::iterator cc = Patients.begin(); + cc != Patients.end(); + ++cc ) { (*cc)->Write( fp, gdcmExplicitVR ); } @@ -389,15 +389,15 @@ void gdcmDicomDir::CreateDicomDirChainedList(std::string const & path) gdcmHeader *header; TagHT.clear(); - patients.clear(); + Patients.clear(); for( gdcmDirList::iterator it = fileList.begin(); it != fileList.end(); ++it ) { - progress = (float)(count+1)/(float)fileList.size(); + Progress = (float)(count+1)/(float)fileList.size(); CallProgressMethod(); - if( abort ) + if( Abort ) { break; } @@ -484,12 +484,12 @@ gdcmDicomDirPatient * gdcmDicomDir::NewPatient() // for all the DicomDirPatient Elements for( it = elemList.begin(); it != elemList.end(); ++it ) { - tmpGr = it->group; - tmpEl = it->elem; + tmpGr = it->Group; + tmpEl = it->Elem; dictEntry = GetPubDict()->GetDictEntryByNumber(tmpGr, tmpEl); entry = new gdcmValEntry( dictEntry ); entry->SetOffset(0); // just to avoid further missprinting - entry->SetValue( it->value ); + entry->SetValue( it->Value ); // dealing with value length ... @@ -517,7 +517,7 @@ gdcmDicomDirPatient * gdcmDicomDir::NewPatient() } gdcmDicomDirPatient *p = new gdcmDicomDirPatient(s, &TagHT); - patients.push_front( p ); + Patients.push_front( p ); return p; } @@ -577,8 +577,8 @@ void gdcmDicomDir::SetElement(std::string &path,gdcmDicomDirType type, for( it = elemList.begin(); it != elemList.end(); ++it) { - tmpGr = it->group; - tmpEl = it->elem; + tmpGr = it->Group; + tmpEl = it->Elem; dictEntry = GetPubDict()->GetDictEntryByNumber(tmpGr, tmpEl); entry = new gdcmValEntry( dictEntry ); // Be sure it's never a BinEntry ! @@ -586,11 +586,16 @@ void gdcmDicomDir::SetElement(std::string &path,gdcmDicomDirType type, entry->SetOffset(0); // just to avoid further missprinting entry->SetLength(0); // just to avoid further missprinting - if( header ) // NULL when we Build Up (ex nihilo) a DICOMDIR - // or when we add the META elems + if( header ) + { + // NULL when we Build Up (ex nihilo) a DICOMDIR + // or when we add the META elems val = header->GetEntryByNumber(tmpGr, tmpEl); + } else + { val = GDCM_UNFOUND; + } if( val == GDCM_UNFOUND) { @@ -608,15 +613,19 @@ void gdcmDicomDir::SetElement(std::string &path,gdcmDicomDirType type, val = header->GetFileName(); } else + { val = &(header->GetFileName().c_str()[path.length()]); + } } else - val = it->value; + { + val = it->Value; + } } else { if ( header->GetEntryLengthByNumber(tmpGr,tmpEl) == 0 ) - val = it->value; + val = it->Value; } // GDCM_UNFOUND or not ! @@ -685,11 +694,11 @@ void gdcmDicomDir::SetElement(std::string &path,gdcmDicomDirType type, */ void gdcmDicomDir::CallStartMethod() { - progress = 0.0f; - abort = false; - if( startMethod ) + Progress = 0.0f; + Abort = false; + if( StartMethod ) { - startMethod( startArg ); + StartMethod( StartArg ); } } @@ -699,9 +708,9 @@ void gdcmDicomDir::CallStartMethod() */ void gdcmDicomDir::CallProgressMethod() { - if( progressMethod ) + if( ProgressMethod ) { - progressMethod( progressArg ); + ProgressMethod( ProgressArg ); } } @@ -711,10 +720,10 @@ void gdcmDicomDir::CallProgressMethod() */ void gdcmDicomDir::CallEndMethod() { - progress = 1.0f; - if( endMethod ) + Progress = 1.0f; + if( EndMethod ) { - endMethod( endArg ); + EndMethod( EndArg ); } } @@ -753,7 +762,7 @@ void gdcmDicomDir::CreateDicomDir() } gdcmDicomDirType type = gdcmDicomDir::GDCM_DICOMDIR_META; - metaElems = NewMeta(); + MetaElems = NewMeta(); ListSQItem listItems = s->GetSQItems(); @@ -808,11 +817,11 @@ void gdcmDicomDir::CreateDicomDir() */ void gdcmDicomDir::AddDicomDirMeta() { - if( metaElems ) + if( MetaElems ) { - delete metaElems; + delete MetaElems; } - metaElems = new gdcmDicomDirMeta( &TagHT ); + MetaElems = new gdcmDicomDirMeta( &TagHT ); } /** @@ -822,7 +831,7 @@ void gdcmDicomDir::AddDicomDirMeta() */ void gdcmDicomDir::AddDicomDirPatientToEnd(gdcmSQItem *s) { - patients.push_back(new gdcmDicomDirPatient(s, &TagHT)); + Patients.push_back(new gdcmDicomDirPatient(s, &TagHT)); } /** @@ -832,9 +841,9 @@ void gdcmDicomDir::AddDicomDirPatientToEnd(gdcmSQItem *s) */ void gdcmDicomDir::AddDicomDirStudyToEnd(gdcmSQItem *s) { - if( patients.size() > 0 ) + if( Patients.size() > 0 ) { - ListDicomDirPatient::iterator itp = patients.end(); + ListDicomDirPatient::iterator itp = Patients.end(); itp--; (*itp)->AddDicomDirStudy(new gdcmDicomDirStudy(s, &TagHT)); } @@ -847,9 +856,9 @@ void gdcmDicomDir::AddDicomDirPatientToEnd(gdcmSQItem *s) */ void gdcmDicomDir::AddDicomDirSerieToEnd(gdcmSQItem *s) { - if( patients.size() > 0 ) + if( Patients.size() > 0 ) { - ListDicomDirPatient::iterator itp = patients.end(); + ListDicomDirPatient::iterator itp = Patients.end(); itp--; if( (*itp)->GetDicomDirStudies().size() > 0 ) @@ -868,9 +877,9 @@ void gdcmDicomDir::AddDicomDirSerieToEnd(gdcmSQItem *s) */ void gdcmDicomDir::AddDicomDirImageToEnd(gdcmSQItem *s) { - if( patients.size() > 0 ) + if( Patients.size() > 0 ) { - ListDicomDirPatient::iterator itp = patients.end(); + ListDicomDirPatient::iterator itp = Patients.end(); itp--; if( (*itp)->GetDicomDirStudies().size() > 0 ) diff --git a/src/gdcmDicomDir.h b/src/gdcmDicomDir.h index df5d9f64..40772ca8 100644 --- a/src/gdcmDicomDir.h +++ b/src/gdcmDicomDir.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDir.h,v $ Language: C++ - Date: $Date: 2004/09/27 08:39:06 $ - Version: $Revision: 1.32 $ + Date: $Date: 2004/10/09 03:21:55 $ + Version: $Revision: 1.33 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -52,16 +52,16 @@ public: /// \sa SetPrintLevel virtual void Print(std::ostream &os = std::cout); -// Informations contained in the parser + /// Informations contained in the parser virtual bool IsReadable(); /// Returns a pointer to the gdcmDicomDirMeta for this DICOMDIR. - gdcmDicomDirMeta* GetDicomDirMeta() { return metaElems; }; + gdcmDicomDirMeta* GetDicomDirMeta() { return MetaElems; }; /// Returns the PATIENT chained List for this DICOMDIR. - ListDicomDirPatient &GetDicomDirPatients() { return patients; }; + ListDicomDirPatient &GetDicomDirPatients() { return Patients; }; -// Parsing + /// Parsing void ParseDirectory(); void SetStartMethod(gdcmMethod*, void* = NULL, gdcmMethod* = NULL); @@ -72,19 +72,19 @@ public: void SetEndMethodArgDelete(gdcmMethod*); /// GetProgress GetProgress - float GetProgress() { return progress; }; + float GetProgress() { return Progress; }; /// AbortProgress AbortProgress - void AbortProgress() { abort = true; }; + void AbortProgress() { Abort = true; }; /// IsAborted IsAborted - bool IsAborted() { return abort; }; + bool IsAborted() { return Abort; }; -// Adding + /// Adding gdcmDicomDirMeta* NewMeta(); gdcmDicomDirPatient* NewPatient(); -// Write + /// Write bool WriteDicomDir(std::string const & fileName); /// Types of the gdcmDicomDirObject within the gdcmDicomDir @@ -122,33 +122,33 @@ private: // Variables /// Pointer on *the* gdcmDicomDirObject 'DicomDirMeta Elements' - gdcmDicomDirMeta* metaElems; + gdcmDicomDirMeta* MetaElems; /// Chained list of DicomDirPatient (to be exploited recursively) - ListDicomDirPatient patients; - -/// pointer to the initialisation method for any progress bar - gdcmMethod* startMethod; -/// pointer to the incrementation method for any progress bar - gdcmMethod* progressMethod; -/// pointer to the termination method for any progress bar - gdcmMethod* endMethod; -/// pointer to the ??? method for any progress bar - gdcmMethod* startMethodArgDelete; -/// pointer to the ??? method for any progress bar - gdcmMethod* progressMethodArgDelete; -/// pointer to the ??? method for any progress bar - gdcmMethod* endMethodArgDelete; -/// pointer to the ??? for any progress bar - void* startArg; -/// pointer to the ??? for any progress bar - void* progressArg; -/// pointer to the ??? for any progress bar - void* endArg; -/// value of the ??? for any progress bar - float progress; -/// value of the ??? for any progress bar - bool abort; + ListDicomDirPatient Patients; + + /// pointer to the initialisation method for any progress bar + gdcmMethod* StartMethod; + /// pointer to the incrementation method for any progress bar + gdcmMethod* ProgressMethod; + /// pointer to the termination method for any progress bar + gdcmMethod* EndMethod; + /// pointer to the ??? method for any progress bar + gdcmMethod* StartMethodArgDelete; + /// pointer to the ??? method for any progress bar + gdcmMethod* ProgressMethodArgDelete; + /// pointer to the ??? method for any progress bar + gdcmMethod* EndMethodArgDelete; + /// pointer to the ??? for any progress bar + void* StartArg; + /// pointer to the ??? for any progress bar + void* ProgressArg; + /// pointer to the ??? for any progress bar + void* EndArg; + /// value of the ??? for any progress bar + float Progress; + /// value of the ??? for any progress bar + bool Abort; }; //----------------------------------------------------------------------------- diff --git a/src/gdcmDicomDirElement.cxx b/src/gdcmDicomDirElement.cxx index 88df039a..a645bc81 100644 --- a/src/gdcmDicomDirElement.cxx +++ b/src/gdcmDicomDirElement.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirElement.cxx,v $ Language: C++ - Date: $Date: 2004/10/08 04:43:37 $ - Version: $Revision: 1.17 $ + Date: $Date: 2004/10/09 03:21:55 $ + Version: $Revision: 1.18 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -22,7 +22,6 @@ #include "gdcmDictSet.h" #include -#include // For sprintf #include //----------------------------------------------------------------------------- @@ -45,7 +44,7 @@ gdcmDicomDirElement::gdcmDicomDirElement() while (!from.eof()) { - from >> std::ws; // used to be eatwhite(from); + from >> std::ws; from.getline(buff, 1024, ' '); type = buff; @@ -53,13 +52,13 @@ gdcmDicomDirElement::gdcmDicomDirElement() (type=="studyElem") || (type=="serieElem") || (type=="imageElem") ) { - from >> std::hex >> elem.group >> elem.elem; + from >> std::hex >> elem.Group >> elem.Elem; - from >> std::ws; // used to be eatwhite(from); + from >> std::ws; from.getline(buff, 1024, '"'); - from >> std::ws; // Used to be eatwhite(from); + from >> std::ws; from.getline(buff, 1024, '"'); - elem.value = buff; + elem.Value = buff; if( type == "metaElem" ) { @@ -112,41 +111,42 @@ void gdcmDicomDirElement::Print(std::ostream &os) { std::ostringstream s; std::list::iterator it; - char greltag[10]; //group element tag + //char greltag[10]; //group element tag + std::string greltag; s << "Meta Elements :"<group,it->elem); - s << " ("<value<Group,it->Elem); + s << " (" << greltag << ") = " << it->Value << std::endl; } s << "Patient Elements :"<group,it->elem); - s << " ("<value<Group,it->Elem); + s << " (" << greltag << ") = " << it->Value << std::endl; } s << "Study Elements :"<group,it->elem); - s << " ("<value<Group, it->Elem); + s << " (" << greltag << ") = " << it->Value << std::endl; } s << "Serie Elements :"<group,it->elem); - s << " ("<value<Group, it->Elem); + s << " (" << greltag << ") = " << it->Value << std::endl; } s << "Image Elements :"<group,it->elem); - s << " ("<value<Group, it->Elem); + s << " (" << greltag << ") = " << it->Value << std::endl; } os << s.str(); diff --git a/src/gdcmDicomDirElement.h b/src/gdcmDicomDirElement.h index 1f063a08..6ab62e9d 100644 --- a/src/gdcmDicomDirElement.h +++ b/src/gdcmDicomDirElement.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirElement.h,v $ Language: C++ - Date: $Date: 2004/09/27 08:39:06 $ - Version: $Revision: 1.10 $ + Date: $Date: 2004/10/09 03:21:55 $ + Version: $Revision: 1.11 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -27,11 +27,11 @@ typedef struct { /// DicomGroup number - unsigned short int group; + unsigned short int Group; /// DicomElement number - unsigned short int elem; + unsigned short int Elem; /// value (coded as a std::string) of the Element - std::string value; + std::string Value; } gdcmElement; typedef std::list ListDicomDirMetaElem; @@ -55,41 +55,46 @@ public: /** * \brief canonical Printer * \sa SetPrintLevel - */ + */ void Print(std::ostream &os); -/** - * \ingroup gdcmDicomDirElement - * \brief returns a reference to the chained List - * related to the META Elements of a DICOMDIR. - */ + + /** + * \ingroup gdcmDicomDirElement + * \brief returns a reference to the chained List + * related to the META Elements of a DICOMDIR. + */ ListDicomDirMetaElem &GetDicomDirMetaElements() { return DicomDirMetaList; }; -/** - * \ingroup gdcmDicomDirElement - * \brief returns a reference to the chained List - * related to the PATIENT Elements of a DICOMDIR. - */ + + /** + * \ingroup gdcmDicomDirElement + * \brief returns a reference to the chained List + * related to the PATIENT Elements of a DICOMDIR. + */ ListDicomDirPatientElem &GetDicomDirPatientElements() { return DicomDirPatientList; }; -/** - * \ingroup gdcmDicomDirElement - * \brief returns a reference to the chained List - * related to the STUDY Elements of a DICOMDIR. - */ + + /** + * \ingroup gdcmDicomDirElement + * \brief returns a reference to the chained List + * related to the STUDY Elements of a DICOMDIR. + */ ListDicomDirStudyElem &GetDicomDirStudyElements() { return DicomDirStudyList; }; -/** - * \ingroup gdcmDicomDirElement - * \brief returns a reference to the chained List - * related to the SERIE Elements of a DICOMDIR. - */ + + /** + * \ingroup gdcmDicomDirElement + * \brief returns a reference to the chained List + * related to the SERIE Elements of a DICOMDIR. + */ ListDicomDirSerieElem &GetDicomDirSerieElements() { return DicomDirSerieList; }; -/** - * \ingroup gdcmDicomDirElement - * \brief returns a reference to the chained List - * related to the IMAGE Elements of a DICOMDIR. - */ + + /** + * \ingroup gdcmDicomDirElement + * \brief returns a reference to the chained List + * related to the IMAGE Elements of a DICOMDIR. + */ ListDicomDirImageElem &GetDicomDirImageElements() { return DicomDirImageList; }; diff --git a/src/gdcmDicomDirObject.cxx b/src/gdcmDicomDirObject.cxx index ae5ca855..5bbdbc02 100644 --- a/src/gdcmDicomDirObject.cxx +++ b/src/gdcmDicomDirObject.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDicomDirObject.cxx,v $ Language: C++ - Date: $Date: 2004/09/27 08:39:06 $ - Version: $Revision: 1.2 $ + Date: $Date: 2004/10/09 03:21:55 $ + 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 @@ -89,12 +89,12 @@ void gdcmDicomDirObject::FillObject(std::list elemList) // for all the Elements found in they own part of the DicomDir dict. for(it = elemList.begin(); it != elemList.end(); ++it) { - tmpGr = it->group; - tmpEl = it->elem; + tmpGr = it->Group; + tmpEl = it->Elem; dictEntry = gdcmGlobal::GetDicts()->GetDefaultPubDict()->GetDictEntryByNumber(tmpGr,tmpEl); entry = new gdcmValEntry(dictEntry); entry->SetOffset(0); // just to avoid further missprinting - entry->SetValue(it->value); + entry->SetValue(it->Value); // dealing with value length ... -- 2.48.1