+ return false;
+ }
+ return true;
+}
+
+/**
+ * \brief Assuming the internal file pointer \ref gdcmDocument::fp
+ * is placed at the beginning of a tag (TestGroup, TestElement),
+ * read the length associated to the Tag.
+ * \warning On success the internal file pointer \ref gdcmDocument::fp
+ * is modified to point after the tag and it's length.
+ * On failure (i.e. when the tag wasn't the expected tag
+ * (TestGroup, TestElement) the internal file pointer
+ * \ref gdcmDocument::fp is restored to it's original position.
+ * @param TestGroup The expected group of the tag.
+ * @param TestElement The expected Element of the tag.
+ * @return On success returns the length associated to the tag. On failure
+ * returns 0.
+ */
+uint32_t gdcmDocument::ReadTagLength(uint16_t TestGroup, uint16_t TestElement)
+{
+ long PositionOnEntry = ftell(fp);
+ (void)PositionOnEntry;
+
+ if ( !ReadTag(TestGroup, TestElement) )
+ {