+
+/** \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-
+
+ */
+gdcmDocEntry* gdcmDocEntrySet::NewDocEntryByNumber(uint16_t group,
+ uint16_t elem,
+ std::string const &VR)
+{
+ // Find out if the tag we encountered is in the dictionaries:
+ gdcmDict *pubDict = gdcmGlobal::GetDicts()->GetDefaultPubDict();
+ gdcmDictEntry *dictEntry = pubDict->GetDictEntryByNumber(group, elem);
+ if (!dictEntry)
+ {
+ dictEntry = NewVirtualDictEntry(group, elem, VR);
+ }
+
+ gdcmDocEntry *newEntry = new gdcmDocEntry(dictEntry);
+ if (!newEntry)
+ {
+ dbg.Verbose(1, "gdcmSQItem::NewDocEntryByNumber",
+ "failed to allocate gdcmDocEntry");
+ return 0;
+ }
+ return newEntry;
+}