Exemple #1
0
        /// <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);
        }
Exemple #2
0
        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();
        }
Exemple #3
0
 protected void AddField(ImageSetField field)
 {
     _fields.Add(field.DicomTag, field);
 }