- gdcmDict *PubDict=gdcmGlobal::GetDicts()->GetDefaultPubDict();
- gdcmDictEntry *NewTag = (*PubDict).GetDictEntryByName(Name);
- if (!NewTag)
- NewTag = NewVirtualDictEntry(0xffff, 0xffff, "LO", "unkn", Name);
+/** \brief
+ * Creates a new DocEntry (without any 'value' ...)
+ * @param group group number of the underlying DictEntry
+ * @param elem elem number of the underlying DictEntry
+ * @param vr V(alue) R(epresentation) of the Entry -if private Entry-
+ */
+DocEntry* DocEntrySet::NewDocEntryByNumber(uint16_t group, uint16_t elem,
+ TagName const & vr)
+{
+ // Find out if the tag we encountered is in the dictionaries:
+ Dict *pubDict = Global::GetDicts()->GetDefaultPubDict();
+ DictEntry *dictEntry = pubDict->GetDictEntryByNumber(group, elem);
+ if (!dictEntry)
+ {
+ dictEntry = NewVirtualDictEntry(group, elem, vr);
+ }
+
+ DocEntry *newEntry = new DocEntry(dictEntry);
+ if (!newEntry)
+ {
+ dbg.Verbose(1, "SQItem::NewDocEntryByNumber",
+ "failed to allocate DocEntry");
+ return 0;
+ }
+ return newEntry;
+}
+/* \brief
+ * Probabely move, as is, to DocEntrySet, as a non virtual method
+ * and remove Document::NewDocEntryByName
+ */
+DocEntry *DocEntrySet::NewDocEntryByName(TagName const & name)
+{
+ Dict *pubDict = Global::GetDicts()->GetDefaultPubDict();
+ DictEntry *newTag = pubDict->GetDictEntryByName(name);
+ if (!newTag)
+ {
+ newTag = NewVirtualDictEntry(0xffff, 0xffff, "LO", "unkn", name);
+ }