+ * \brief Writes in a file (according to the requested format)
+ * a single gdcmHeaderEntry passed as argument.
+ * \sa WriteEntryValue, WriteEntryTagVRLength.
+ * @param tag Pointer on the gdcmHeaderEntry to be written
+ * @param _fp Already open file pointer
+ * @param type type of the File to be written
+ */
+
+bool gdcmParser::WriteEntry(gdcmHeaderEntry *tag, FILE *_fp,FileType type)
+{
+ guint32 length = tag->GetLength();
+
+ // The value of a tag MUST (see the DICOM norm) be an odd number of
+ // bytes. When this is not the case, pad with an additional byte:
+ if(length%2==1)
+ {
+ tag->SetValue(tag->GetValue()+"\0");
+ tag->SetLength(tag->GetReadLength()+1);
+ }
+
+ WriteEntryTagVRLength(tag, _fp, type);
+ WriteEntryValue(tag, _fp, type);
+ return true;
+}
+
+/**