X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDicomDirObject.cxx;h=1d3d8ce28a85857c1cd81a72b6592ad23ad62b90;hb=d97e9432393b8515630a11586e0e95df6be9eb43;hp=fca87916eb972a91d3be5dc0d82fadd087130330;hpb=8a3dd7efbcb545e7ed308eb7334b1e6dbbf40923;p=gdcm.git diff --git a/src/gdcmDicomDirObject.cxx b/src/gdcmDicomDirObject.cxx index fca87916..1d3d8ce2 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/10/25 03:35:19 $ - Version: $Revision: 1.6 $ + Date: $Date: 2004/12/07 13:39:33 $ + Version: $Revision: 1.12 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -20,6 +20,8 @@ #include "gdcmGlobal.h" #include "gdcmDebug.h" #include "gdcmValEntry.h" +#include "gdcmDictSet.h" + namespace gdcm { @@ -33,10 +35,9 @@ namespace gdcm * @param depth Sequence depth level */ -DicomDirObject::DicomDirObject(TagDocEntryHT *ptagHT, int depth) +DicomDirObject::DicomDirObject(int depth) : SQItem (depth) { - PtagHT = ptagHT; } @@ -83,7 +84,7 @@ void DicomDirObject::FillObject(ListDicomDirMetaElem const & elemList) { // FillObject rempli le SQItem qui sera accroche au bon endroit - std::list::const_iterator it; + ListDicomDirMetaElem::const_iterator it; uint16_t tmpGr,tmpEl; DictEntry *dictEntry; ValEntry *entry; @@ -98,29 +99,7 @@ void DicomDirObject::FillObject(ListDicomDirMetaElem const & elemList) entry->SetOffset(0); // just to avoid further missprinting entry->SetValue(it->Value); - // dealing with value length ... - - if(dictEntry->GetGroup()==0xfffe) - { - entry->SetLength(entry->GetValue().length()); - } - else if( dictEntry->GetVR() == "UL" || dictEntry->GetVR() == "SL" ) - { - entry->SetLength(4); - } - else if( dictEntry->GetVR() == "US" || dictEntry->GetVR() == "SS" ) - { - entry->SetLength(2); - } - else if( dictEntry->GetVR() == "SQ" ) - { - entry->SetLength(0xffffffff); - } - else - { - entry->SetLength(entry->GetValue().length()); - } - AddDocEntry(entry); + AddEntry(entry); } } } // end namespace gdcm