- // ----------------------- was ReadNextHeaderEntry -----------------
- g = ReadInt16();
- n = ReadInt16();
- if (errno == 1)
- // We reached the EOF (or an error occured) therefore
- // header parsing has to be considered as finished.
- break;
-
- // Find out if the tag we encountered is in the dictionaries:
- DictEntry = GetDictEntryByNumber(Group, Elem);
- if (!DictEntry)
- DictEntry = NewVirtualDictEntry(Group, Elem);
- if (!DictEntry) {
- dbg.Verbose(1, "gdcmDocEntrySet::LoadDocEntrySet",
- "failed to allocate gdcmDictEntry");
- return false;
- }
-
- // Right now,
- vr = DictEntry->GetVR(); // Suppose we get it, suppose it's the same one
- // that's in the Explicit VR part of the Header
- // TODO
- // Resoudre pb quand inadequation entre Explicit VR et Dict
-
- if (filetype != ExplicitVR) {} // jamais de risque de conflit
- // pour les autres cas,
- // refaire l'equiv de gdcmParser::FindHeaderEntryVR
- // qui contient CheckHeaderEntryVR
- // le pb, c'est qu'on a besoin de la VR pour fabriquer l'Entry
-
- if (vr == "SQ" ) {
- // --- SeqEntry
- // TODO
- // SEQUENCE; appel 'récursif' de ??? pour charger la 'valeur'
- // (ensemble d' ITEMs, en fait,
- // chaque ITEM etant chargé avec LoadDocEntrySet)
-
-
- } else if (vr == "AE" || vr == "AS" || vr == "DA" || vr == "PN" ||
- vr == "UI" || vr == "TM" ) {
- // --- ValEntry
- NewValEntry = new gdcmValEntry(DictEntry);
- if (!NewValEntry) {
- dbg.Verbose(1, "gdcmDocEntrySet::LoadDocEntrySet",
- "failed to allocate gdcmValEntry");
- return false;
- }
- FindHeaderEntryVR(NewEntry);
- FindHeaderEntryLength(NewEntry);
- }
-
-
- else {
- // --- BinEntry
- NewBinEntry = new gdcmBinEntry(DictEntry);
- if (!NewValEntry) {
- dbg.Verbose(1, "gdcmDocEntrySet::LoadDocEntrySet",
- "failed to allocate gdcmBinEntry");
- return false;