Exemplo n.º 1
0
        private void FillConceptCodeSequence(Element element, ref DoseDataItem content)
        {
            Elements item = ((Sequence)element).Items[0];

            foreach (Element child in item)
            {
                // do not show group length tags
                if (child.element == 0)
                {
                    continue;
                }

                var tag   = EK.Capture.Dicom.DicomToolKit.Tag.ToString(child.Group, child.element);
                var value = GetElementValue(child);
                if (tag == "(0008,0100)")
                {
                    content.ConceptCodeValue = value;
                }
                else if (tag == "(0008,0102)")
                {
                    content.ConceptCodingSchemeDesignator = value;
                }
                else if (tag == "(0008,0104)")
                {
                    content.ConceptCodeMeaning = value;
                }
                else
                {
                    MessageBox.Show("Unknown tag in FillConceptCodeSequence()!");
                }
            }
        }
Exemplo n.º 2
0
        private void FillMeasuredValueSequence(Element element, ref DoseDataItem content)
        {
            Elements item = ((Sequence)element).Items[0];

            foreach (Element child in item)
            {
                // do not show group length tags
                if (child.element == 0)
                {
                    continue;
                }

                var tag   = EK.Capture.Dicom.DicomToolKit.Tag.ToString(child.Group, child.element);
                var value = GetElementValue(child);
                if (tag == "(0040,08ea)")
                {
                    FillMeasuredUnitsValueSequence(child, ref content);
                }
                else if (tag == "(0040,a30a)")
                {
                    content.ConceptCodeMeaning = value;
                }
                else
                {
                    MessageBox.Show("Unknown tag in FillMeasuredValueSequence()!");
                }
            }
        }
Exemplo n.º 3
0
        private TreeListNode CreateNodeFromData(DoseDataItem doseDataItem)
        {
            var node = new TreeListNode();

            FillNodeFromData(doseDataItem, ref node);
            return(node);
        }
Exemplo n.º 4
0
 private void UpdateNodeFromData(DoseDataItem doseDataItem, ref TreeListNode node)
 {
     node.Text             = doseDataItem.ConceptNameCodeMeaning;
     node.SubItems[0].Text = doseDataItem.ValueType;
     node.SubItems[1].Text = doseDataItem.ConceptCodeMeaning;
     node.SubItems[2].Text = doseDataItem.Units;
     node.SubItems[3].Text = doseDataItem.ConceptNameCodeValue;
     node.SubItems[4].Text = doseDataItem.ConceptNameCodingSchemeDesignator;
     node.SubItems[5].Text = doseDataItem.ConceptNameCodeMeaning;
     node.SubItems[6].Text = doseDataItem.ConceptCodeValue;
     node.SubItems[7].Text = doseDataItem.ConceptCodingSchemeDesignator;
 }
Exemplo n.º 5
0
        private TreeListNode FillContentNode(Elements elements)
        {
            var content = new DoseDataItem();
            var node    = new TreeListNode();

            foreach (Element element in elements)
            {
                // do not show group length tags
                if (element.element == 0)
                {
                    continue;
                }


                var tag = EK.Capture.Dicom.DicomToolKit.Tag.ToString(element.Group, element.element);
                if (tag == "(0040,a010)")
                {
                    content.RelationshipType = GetElementValue(element);
                }
                else if (tag == "(0040,a040)")
                {
                    content.ValueType = GetElementValue(element);
                }
                else if (tag == "(0040,a043)")
                {
                    FillConceptNameCodeSequence(element, ref content);
                }
                else if (tag == "(0040,a168)")
                {
                    FillConceptCodeSequence(element, ref content);
                }
                else if (tag == "(0040,a300)")
                {
                    FillMeasuredValueSequence(element, ref content);
                }
                else if (tag == "(0040,a124)" || tag == "(0040,a160)")
                {
                    content.ConceptCodeMeaning = GetElementValue(element);
                }
                else
                {
                    AddChild(element, node);
                }
            }

            FillNodeFromData(content, ref node);
            return(node);
        }
Exemplo n.º 6
0
        private DoseDataItem CreateDataFromNode(TreeListNode node)
        {
            var doseDataItem = new DoseDataItem();

            doseDataItem.ValueType          = node.SubItems[0].Text;
            doseDataItem.ConceptCodeMeaning = node.SubItems[1].Text;
            doseDataItem.Units = node.SubItems[2].Text;
            doseDataItem.ConceptNameCodeValue = node.SubItems[3].Text;
            doseDataItem.ConceptNameCodingSchemeDesignator = node.SubItems[4].Text;
            doseDataItem.ConceptNameCodeMeaning            = node.SubItems[5].Text;
            doseDataItem.ConceptCodeValue = node.SubItems[6].Text;
            doseDataItem.ConceptCodingSchemeDesignator = node.SubItems[7].Text;


            return(doseDataItem);
        }
Exemplo n.º 7
0
        private void FillNodeFromData(DoseDataItem doseDataItem, ref TreeListNode node)
        {
            node.Text = doseDataItem.ConceptNameCodeMeaning;
            node.SubItems.Add(doseDataItem.ValueType);
            node.SubItems.Add(doseDataItem.ConceptCodeMeaning);
            node.SubItems.Add(doseDataItem.Units);
            node.SubItems.Add(doseDataItem.ConceptNameCodeValue);
            node.SubItems.Add(doseDataItem.ConceptNameCodingSchemeDesignator);
            node.SubItems.Add(doseDataItem.ConceptNameCodeMeaning);
            node.SubItems.Add(doseDataItem.ConceptCodeValue);
            node.SubItems.Add(doseDataItem.ConceptCodingSchemeDesignator);


            if (node.Text == string.Empty)
            {
                node.Text = "Get Error!";
            }
        }
Exemplo n.º 8
0
        private void FillMeasuredUnitsValueSequence(Element element, ref DoseDataItem content)
        {
            Elements item = ((Sequence)element).Items[0];

            foreach (Element child in item)
            {
                // do not show group length tags
                if (child.element == 0)
                {
                    continue;
                }

                var tag   = EK.Capture.Dicom.DicomToolKit.Tag.ToString(child.Group, child.element);
                var value = GetElementValue(child);
                if (tag == "(0008,0104)")
                {
                    content.Units = value;
                    return;
                }
            }
        }