+ // Create a new seqEntry if necessary
+ if ( !seqEntry )
+ {
+ seqEntry = NewSeqEntry(group, elem);
+
+ if ( !AddEntry(seqEntry) )
+ {
+ gdcmWarningMacro( "AddEntry failed although this is a creation for ("
+ <<std::hex << group << "|" << elem <<")" );
+ seqEntry->Delete();
+ return NULL;
+ }
+ seqEntry->Delete();
+ }
+ // Remark :
+ // SequenceDelimitationItem will be added at the end of the SeqEntry,
+ // at write time
+ return seqEntry;
+}
+
+/**
+ * \brief Checks if a given Dicom Element exists within the DocEntrySet
+ * @param group Group number of the searched Dicom Element
+ * @param elem Element number of the searched Dicom Element
+ * @return true is found
+ */
+bool DocEntrySet::CheckIfEntryExist(uint16_t group, uint16_t elem )
+{
+ return GetDocEntry(group,elem)!=NULL;
+}
+