+
+/**
+ * \brief Simple predicate that checks whether the given argument
+ * corresponds to the Value Representation of a \ref BinEntry .
+ * @param tested value representation to check for.
+ */
+bool VR::IsVROfBinaryRepresentable(VRKey const &tested)
+{
+ if ( tested == GDCM_UNKNOWN)
+ return true;
+
+ if ( IsVROfStringRepresentable(tested) )
+ return false;
+
+ if ( IsVROfSequence(tested) )
+ return false;
+
+ return true;
+}
+
+/**
+ * \brief Simple predicate that checks whether the given argument
+ * corresponds to the Value Representation of a \ref ValEntry
+ * but NOT a \ref BinEntry.
+ * @param tested value representation to be checked.
+ */
+bool VR::IsVROfStringRepresentable(VRKey const &tested)
+{
+ return tested == "AE" ||
+ tested == "AS" ||
+ tested == "CS" ||
+ tested == "DA" ||
+ tested == "DS" ||
+ tested == "IS" ||
+ tested == "LO" ||
+ tested == "LT" ||
+ tested == "PN" ||
+ tested == "SH" ||
+ tested == "SL" ||
+ tested == "SS" ||
+ tested == "ST" ||
+ tested == "TM" ||
+ tested == "UI" ||
+ tested == "UL" ||
+ tested == "UN" ||
+ tested == "US";
+}
+
+/**
+ * \brief Simple predicate that checks whether the given argument
+ * corresponds to the Value Representation of a \ref SeqEntry
+ * @param tested value representation to check for.
+ */
+bool VR::IsVROfSequence(VRKey const &tested)
+{
+ return tested == "SQ";
+}
+
+bool VR::IsValidVR(VRKey const &key)
+{
+ return vr.find(key) != vr.end();
+}
+
+//-----------------------------------------------------------------------------
+// Protected
+
+//-----------------------------------------------------------------------------
+// Private
+
+//-----------------------------------------------------------------------------
+// Print
+/**
+ * \brief Print all
+ * @param os The output stream to be written to.
+ */
+void VR::Print(std::ostream &os)
+{
+ std::ostringstream s;
+
+ for (VRHT::iterator it = vr.begin(); it != vr.end(); ++it)
+ {
+ s << "VR : " << it->first << " = " << it->second << std::endl;
+ }
+ os << s.str();
+}
+
+//-----------------------------------------------------------------------------
+} // end namespace gdcm