+ if (BinEntry *b = dynamic_cast<BinEntry *>(d))
+ {
+ uint8_t *a = b->GetBinArea();
+ if (!b)
+ return GDCM_NOTLOADED;
+ // TODO : unify those two methods.
+ if (Util::IsCleanArea(a, b->GetLength()) )
+ return Util::CreateCleanString(a, b->GetLength());
+ }
+ return GDCM_NOTASCII;
+}
+
+/**
+ * \brief Searches within Header Entries (Dicom Elements) parsed with
+ * the public and private dictionaries
+ * for the value length of a given tag..
+ * @param group Group number of the searched tag.
+ * @param elem Element number of the searched tag.
+ * @return Corresponding element length; -2 if not found
+ */
+int DocEntrySet::GetEntryLength(uint16_t group, uint16_t elem)
+{
+ DocEntry *entry = GetDocEntry(group, elem);
+ if ( entry )
+ return entry->GetLength();
+ return -1;
+}