Ejemplo n.º 1
0
        bool INode.Matches(string pattern)
        {
            if (pattern == "*")
            {
                return(Caption != null);
            }

            return((Caption != null && Caption.Contains(pattern, StringComparison.OrdinalIgnoreCase)) ||
                   (Id != null && Id.Contains(pattern, StringComparison.OrdinalIgnoreCase)));
        }
Ejemplo n.º 2
0
        public HtmlString RenderTH()
        {
            var xml = new XElement("th",
                                   Caption != null && Caption.Contains("<") ? XElement.Parse(Caption) as object
                    : Caption ?? Name);

            if (CssClass != null)
            {
                xml.SetAttributeValue("class", CssClass);
            }

            return(new HtmlString(xml.ToString()));
        }
Ejemplo n.º 3
0
        public override DicomDictionaryEntry ParseRow(Dictionary <string, XElement> row)
        {
            if (row["Tag"].Value.ToLower() == "(no tag)")
            {
                return(null);
            }
            var    tag = DicomMaskedTag.Parse(row["Tag"].Value.ToLower());
            string name;
            string keyword;
            bool   retired;

            if (row.ContainsKey("Message Field"))
            {
                name    = row["Message Field"].Value;
                retired = Caption.Contains("Retired");
            }
            else
            {
                name    = row["Name"].Value;
                retired = row[""].Value.Contains("RET");
            }

            keyword = row["Keyword"].Value.Replace("\u200b", string.Empty);

            if (keyword.EndsWith("Retired"))
            {
                keyword = keyword.Substring(0, keyword.Length - "Retired".Length);
            }
            var     vrs = row["VR"].Value.Split(new[] { " or " }, StringSplitOptions.RemoveEmptyEntries).Where(vr => vr.ToLowerInvariant().Trim() != "see note").Select(DicomVR.Parse).ToArray();
            DicomVM vm  = null;

            if (!string.IsNullOrEmpty(row["VM"].Value))
            {
                vm = DicomVM.Parse(row["VM"].Value.Replace(" or 1", string.Empty));
            }

            //var dicos = row[""].Value.Contains("DICOS");
            //var diconde = row[""].Value.Contains("DICONDE");

            return(new DicomDictionaryEntry(tag, name, keyword, vm, retired, vrs));
        }