- list.push_back(*it);
- }
-
- return(list);
-}
-
-//-----------------------------------------------------------------------------
-// Protected
-
-//-----------------------------------------------------------------------------
-// Private
-
-//-----------------------------------------------------------------------------
+ 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);
+
+ // 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);
+ }
+}