X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=src%2FgdcmDocEntrySet.cxx;h=7be85dff36dd317cc05cb37a282d7ef5326daf29;hb=fc71b6d6df72ee061f0a88e3de407a83511f8ed2;hp=5f31e20205cf00f95bce10d6e11d52bda420bb17;hpb=ac07c623eaeff39070d0cc4cb05f9dd2c04ca931;p=gdcm.git diff --git a/src/gdcmDocEntrySet.cxx b/src/gdcmDocEntrySet.cxx index 5f31e202..7be85dff 100644 --- a/src/gdcmDocEntrySet.cxx +++ b/src/gdcmDocEntrySet.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntrySet.cxx,v $ Language: C++ - Date: $Date: 2005/11/21 09:41:46 $ - Version: $Revision: 1.68 $ + Date: $Date: 2006/03/22 13:19:25 $ + 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 @@ -27,6 +27,10 @@ #include "gdcmDataEntry.h" #include "gdcmVR.h" +#if defined(__BORLANDC__) + #include // for memset +#endif + namespace gdcm { //----------------------------------------------------------------------------- @@ -117,7 +121,7 @@ SeqEntry *DocEntrySet::GetSeqEntry(uint16_t group, uint16_t elem) DocEntry *currentEntry = GetDocEntry(group, elem); if ( !currentEntry ) return NULL; - + return dynamic_cast(currentEntry); } @@ -210,8 +214,8 @@ bool DocEntrySet::SetEntryBinArea(uint8_t *content, int lgth, DataEntry *entry) * failed). */ DataEntry *DocEntrySet::InsertEntryString(std::string const &value, - uint16_t group, uint16_t elem, - VRKey const &vr ) + uint16_t group, uint16_t elem, + VRKey const &vr ) { DataEntry *dataEntry = 0; DocEntry *currentEntry = GetDocEntry( group, elem ); @@ -268,8 +272,8 @@ DataEntry *DocEntrySet::InsertEntryString(std::string const &value, * failed). */ DataEntry *DocEntrySet::InsertEntryBinArea(uint8_t *binArea, int lgth, - uint16_t group, uint16_t elem, - VRKey const &vr ) + uint16_t group, uint16_t elem, + VRKey const &vr ) { DataEntry *dataEntry = 0; DocEntry *currentEntry = GetDocEntry( group, elem ); @@ -438,7 +442,7 @@ SeqEntry* DocEntrySet::NewSeqEntry(uint16_t group, uint16_t elem) gdcmWarningMacro( "Failed to allocate SeqEntry for (" <GetDefaultPubDict(); if (!pubDict) { @@ -474,7 +480,7 @@ DictEntry *DocEntrySet::GetDictEntry(uint16_t group,uint16_t elem) /** * \brief Searches [both] the public [and the shadow dictionary (when they * exist)] for the presence of the DictEntry with given - * group and element, and create a new virtual DictEntry if necessary + * group and element, and creates a new virtual DictEntry if necessary * @param group group number of the searched DictEntry * @param elem element number of the searched DictEntry * @param vr V(alue) R(epresentation) to use, if necessary @@ -488,14 +494,14 @@ DictEntry *DocEntrySet::GetDictEntry(uint16_t group, uint16_t elem, DictEntry *goodEntry = dictEntry; VRKey goodVR = vr; TagName vm; - if (elem == 0x0000) + if (elem == 0x0000) goodVR="UL"; if ( goodEntry ) { if ( goodVR != goodEntry->GetVR() && goodVR != GDCM_VRUNKNOWN ) - { + { gdcmWarningMacro("For (" << std::hex << group << "|" << elem << "), found VR : [" << vr << "]" << " expected: [" << goodEntry->GetVR() << "]" ) ; @@ -516,7 +522,7 @@ DictEntry *DocEntrySet::GetDictEntry(uint16_t group, uint16_t elem, if (dictEntry) { - goodEntry = DictEntry::New(group, elem, goodVR, vm,//"FIXME", + goodEntry = DictEntry::New(group, elem, goodVR, vm, dictEntry->GetName() ); } else