Beispiel #1
0
 public DicomTagPath(DvtkData.Dimse.Tag parentTag, DvtkData.Dimse.Tag tag)
 {
     _tag     = parentTag;
     _nextTag = new DicomTagPath(tag);
 }
Beispiel #2
0
 public DicomTagPath(DvtkData.Dimse.Tag parent1Tag, DvtkData.Dimse.Tag parent2Tag, DvtkData.Dimse.Tag parent3Tag, DvtkData.Dimse.Tag tag)
 {
     _tag     = parent1Tag;
     _nextTag = new DicomTagPath(parent2Tag, parent3Tag, tag);
 }
Beispiel #3
0
 public DicomTagPath(DvtkData.Dimse.Tag parent1Tag, DvtkData.Dimse.Tag parent2Tag, DvtkData.Dimse.Tag parent3Tag, DvtkData.Dimse.Tag tag)
 {
     _tag = parent1Tag;
     _nextTag = new DicomTagPath(parent2Tag, parent3Tag, tag);
 }
Beispiel #4
0
 public DicomTagPath(DvtkData.Dimse.Tag parentTag, DicomTagPath dicomTagPath)
 {
     _tag     = parentTag;
     _nextTag = dicomTagPath;
 }
Beispiel #5
0
 public DicomTagPath(DvtkData.Dimse.Tag parentTag, DvtkData.Dimse.Tag tag)
 {
     _tag = parentTag;
     _nextTag = new DicomTagPath(tag);
 }
Beispiel #6
0
 public DicomTagPath(DvtkData.Dimse.Tag parentTag, DicomTagPath dicomTagPath)
 {
     _tag = parentTag;
     _nextTag = dicomTagPath;
 }
        private static void AddDicomAttribute(DvtkData.Dimse.AttributeSet dataset, DicomTagPath dicomTagPath, System.String dicomValue)
        {
            if (dicomTagPath.Next != null)
            {
                // Try to get the sequence identified by this Tag
                DvtkData.Dimse.Attribute sequenceAttribute = dataset.GetAttribute(dicomTagPath.Tag);
                if (sequenceAttribute == null)
                {
                    // Need to add the sequence
                    DvtkData.Dimse.SequenceItem item = new DvtkData.Dimse.SequenceItem();
                    dataset.AddAttribute(dicomTagPath.Tag.GroupNumber,
                        dicomTagPath.Tag.ElementNumber,
                        DvtkData.Dimse.VR.SQ, item);

                    // Get the newly added sequence
                    sequenceAttribute = dataset.GetAttribute(dicomTagPath.Tag);
                }

                // Get the contained item
                DvtkData.Dimse.SequenceOfItems sequenceOfItems = (DvtkData.Dimse.SequenceOfItems)sequenceAttribute.DicomValue;
                if (sequenceOfItems.Sequence.Count == 1)
                {
                    DvtkData.Dimse.SequenceItem item = sequenceOfItems.Sequence[0];

                    // Call recursively
                    AddDicomAttribute(item, dicomTagPath.Next, dicomValue);
                }
            }
            else
            {
                // Try to get the attribute identified by this Tag
                DvtkData.Dimse.Attribute attribute = dataset.GetAttribute(dicomTagPath.Tag);
                if (attribute != null)
                {
                    // If present - remove the attribute - we want to update the value
                    dataset.Remove(attribute);
                }

                // Add the new value
                dataset.AddAttribute(dicomTagPath.Tag.GroupNumber, dicomTagPath.Tag.ElementNumber, DicomTagVrLookup.GetVR(dicomTagPath.Tag), dicomValue);
            }
        }
Beispiel #8
0
 /// <summary>
 /// Class constructor
 /// </summary>
 /// <param name="dicomTagPath">DICOM Tag Path.</param>
 /// <param name="hl7TagPath">HL7 Tag Path.</param>
 /// <param name="valueConvertor"></param>
 public DicomHl7TagMap(DicomTagPath dicomTagPath, Hl7TagPath hl7TagPath, BaseValueConvertor valueConvertor)
 {
     _dicomTagPath   = dicomTagPath;
     _hl7TagPath     = hl7TagPath;
     _valueConvertor = valueConvertor;
 }
Beispiel #9
0
 /// <summary>
 /// Class constructor
 /// </summary>
 /// <param name="dicomTagPath">DICOM Tag Path.</param>
 /// <param name="hl7TagPath">HL7 Tag Path.</param>
 public DicomHl7TagMap(DicomTagPath dicomTagPath, Hl7TagPath hl7TagPath)
 {
     _dicomTagPath = dicomTagPath;
     _hl7TagPath   = hl7TagPath;
 }