+
+/*
+ * \brief Modifies the value of a given Header Entry (Dicom Element)
+ * when it exists. Create it when unexistant.
+ * @param Group Group number of the Entry
+ * @param Elem Element number of the Entry
+ * \return pointer to the modified/created SeqEntry (NULL when creation
+ * failed).
+ */
+gdcmSeqEntry * gdcmDocument::ReplaceOrCreateByNumber(
+ uint16_t group,
+ uint16_t elem)
+{
+ gdcmSeqEntry* b = 0;
+ gdcmDocEntry* a = GetDocEntryByNumber( group, elem);
+ if (!a)
+ {
+ a = NewSeqEntryByNumber(group, elem);
+ if (!a)
+ {
+ return 0;
+ }
+
+ b = new gdcmSeqEntry(a, 1); // FIXME : 1 (Depth)
+ AddEntry(b);
+ }
+ return b;
+}
+