Beispiel #1
0
 internal FileReference(DicomStreamOpener streamOpener, long offset, long length, Endian endian, DicomVr vr)
 {
     StreamOpener = streamOpener;
     Offset       = offset;
     _length      = length;
     Endian       = endian;
     Vr           = vr;
 }
Beispiel #2
0
 private DicomTag(uint tag, String name)
 {
     TagValue    = tag;
     _name       = name;
     _vr         = DicomVr.UNvr;
     _multiVrTag = false;
     _vmLow      = 1;
     _vmHigh     = 1;
     _isRetired  = false;
 }
Beispiel #3
0
 /// <summary>
 /// Primary constructor for dictionary tags
 /// </summary>
 /// <param name="tag"></param>
 /// <param name="name"></param>
 /// <param name="varName"></param>
 /// <param name="vr"></param>
 /// <param name="isMultiVrTag"></param>
 /// <param name="vmLow"></param>
 /// <param name="vmHigh"></param>
 /// <param name="isRetired"></param>
 public DicomTag(uint tag, String name, String varName, DicomVr vr, bool isMultiVrTag, uint vmLow, uint vmHigh, bool isRetired)
 {
     TagValue    = tag;
     _name       = name;
     _varName    = varName;
     _vr         = vr;
     _multiVrTag = isMultiVrTag;
     _vmLow      = vmLow;
     _vmHigh     = vmHigh;
     _isRetired  = isRetired;
 }
Beispiel #4
0
        /// <summary>
        /// Initialize dictionary with standard tags.
        /// </summary>
        private static void InitStandardTags()
        {
            using (var stream = typeof(DicomTagDictionary).Assembly.GetManifestResourceStream("UIH.Dicom.DicomTagDictionary.data"))
            {
                if (stream == null)
                {
                    throw new InvalidOperationException("DICOM data dictionary embedded resource not found.");
                }

                using (var reader = new StreamReader(stream))
                {
                    string line;
                    while ((line = reader.ReadLine()) != null)
                    {
                        if (line.StartsWith("#"))
                        {
                            continue;
                        }

                        var items = line.Split(';');
                        var tag   = new DicomTag(
                            uint.Parse(items[0]),
                            items[1],
                            items[2],
                            DicomVr.GetVR(items[3]),
                            bool.Parse(items[4]),
                            uint.Parse(items[5]),
                            uint.Parse(items[6]),
                            bool.Parse(items[7])
                            );
                        _tags.Add(tag.TagValue, tag);
                        _tagNames.Add(tag.VariableName, tag);
                    }
                }
            }
        }