Program: gdcm
Module: $RCSfile: gdcmDicomDirObject.cxx,v $
Language: C++
- Date: $Date: 2004/10/13 14:15:29 $
- Version: $Revision: 1.5 $
+ 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
#include "gdcmGlobal.h"
#include "gdcmDebug.h"
#include "gdcmValEntry.h"
+#include "gdcmDictSet.h"
+
namespace gdcm
{
* @param depth Sequence depth level
*/
-DicomDirObject::DicomDirObject(TagDocEntryHT *ptagHT, int depth)
+DicomDirObject::DicomDirObject(int depth)
: SQItem (depth)
{
- PtagHT = ptagHT;
}
TagDocEntryHT DicomDirObject::GetEntry()
{
TagDocEntryHT HT;
- docEntries=GetDocEntries();
- for(ListDocEntry::iterator i = docEntries.begin();
- i != docEntries.end(); ++i)
+ DocEntries = GetDocEntries();
+ for(ListDocEntry::iterator i = DocEntries.begin();
+ i != DocEntries.end(); ++i)
{
- HT[(*i)->GetKey()]=*i;
+ HT[(*i)->GetKey()] = *i;
}
return HT;
}
* \brief add the 'Object' related Dicom Elements to the listEntries
* of a partially created DICOMDIR
*/
-void DicomDirObject::FillObject(ListDicomDirMetaElem elemList)
+void DicomDirObject::FillObject(ListDicomDirMetaElem const & elemList)
{
// FillObject rempli le SQItem qui sera accroche au bon endroit
- std::list<Element>::iterator it;
+ ListDicomDirMetaElem::const_iterator it;
uint16_t tmpGr,tmpEl;
DictEntry *dictEntry;
ValEntry *entry;
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