- * @param Group group number of the underlying DictEntry
- * @param Elem element number of the underlying DictEntry
- */
-SeqEntry* DocEntrySet::NewSeqEntryByNumber(uint16_t Group,
- uint16_t Elem)
-{
- // Find out if the tag we encountered is in the dictionaries:
- DictEntry* DictEntry = GetDictEntryByNumber( Group, Elem );
- if ( ! DictEntry )
- {
- DictEntry = NewVirtualDictEntry(Group, Elem);
- }
-
- SeqEntry *NewEntry = new SeqEntry( DictEntry );
- if ( !NewEntry )
- {
- dbg.Verbose(1, "Document::NewSeqEntryByNumber",
- "failed to allocate SeqEntry");
- return 0;
- }
- return NewEntry;
-}
-
-//-----------------------------------------------------------------------------
-// Protected
-
-/**
- * \brief Gets a Dicom Element inside a SQ Item Entry, by name
- * @return
- */
- DocEntry *DocEntrySet::GetDocEntryByName(std::string const & name)
- {
- Dict *pubDict = Global::GetDicts()->GetDefaultPubDict();
- DictEntry *dictEntry = pubDict->GetDictEntryByName(name);
- if( !dictEntry )
- {
- return 0;
- }
-
- return GetDocEntryByNumber(dictEntry->GetGroup(),dictEntry->GetElement());
-}
-
-
-/**
- * \brief Get the value of a Dicom Element inside a SQ Item Entry, by name
- * @param name : name of the searched element.
- * @return
- */
-
-std::string DocEntrySet::GetEntryByName(TagName const & name)
-{
- Dict *pubDict = Global::GetDicts()->GetDefaultPubDict();
- DictEntry *dictEntry = pubDict->GetDictEntryByName(name);
-
- if( !dictEntry )
- {
- return GDCM_UNFOUND;
- }
-
- return GetEntryByNumber(dictEntry->GetGroup(), dictEntry->GetElement());
-}
-
-
-/**
- * \brief Request a new virtual dict entry to the dict set
- * @param group group number of the underlying DictEntry
- * @param element element number of the underlying DictEntry
- * @param vr VR of the underlying DictEntry
- * @param fourth owner group
- * @param name english name
- */
-DictEntry* DocEntrySet::NewVirtualDictEntry(uint16_t group,
- uint16_t element,
- std::string const & vr,
- std::string const & fourth,
- std::string const & name)
-{
- return Global::GetDicts()->NewVirtualDictEntry(group,element,vr,fourth,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
- */
-DocEntry* DocEntrySet::NewDocEntryByNumber(uint16_t group,
- uint16_t elem)
-{
- // 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);
- }
-
- DocEntry *newEntry = new DocEntry(dictEntry);
- if (!newEntry)
- {
- dbg.Verbose(1, "SQItem::NewDocEntryByNumber",
- "failed to allocate DocEntry");
- return 0;
- }
- return newEntry;
-}
-
-
-/** \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