/// <summary>
        /// Retrieves the value for a Dicom tag.
        /// </summary>
        /// <param name="tag"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public bool TryGetValue(uint tag, out string value)
        {
            ImageSetField field = this[tag];

            if (field == null) // doesn't exist
            {
                value = null;
                return(false);
            }
            value = field.Value;
            return(true);
        }
        public void ReadXml(XmlReader reader)
        {
            // skip <ImageSetDescriptor>
            reader.Read();

            while (reader.NodeType == XmlNodeType.Element && reader.LocalName == "Field")
            {
                ImageSetField field = new ImageSetField
                {
                    Tag   = reader["Tag"],
                    Value = String.IsNullOrEmpty(reader["Value"]) ? String.Empty : reader["Value"]
                };
                AddField(field);
                reader.Read();
            }


            if (reader.NodeType == XmlNodeType.Element && reader.LocalName == "Details")
            {
                //Details = XmlUtils.Deserialize<ImageSetDetails>(reader);
            }

            reader.Read();
        }
 protected void AddField(ImageSetField field)
 {
     _fields.Add(field.DicomTag, field);
 }