예제 #1
0
        /// <summary>
        /// Load a DICOM file (as set by the <see cref="Filename"/> property).
        /// </summary>
        /// <remarks>
        /// Note:  If the file does not contain DICM encoded in it, the routine will assume
        /// the file is not a Part 10 format file, and is instead encoded as just a DataSet
        /// with the transfer syntax set to Implicit VR Little Endian.
        /// </remarks>
        /// <param name="stopTag">A tag to stop at when reading the file.  See the constants in <see cref="DicomTags"/>.</param>
        /// <param name="options">The options to use when reading the file.</param>
        public void Load(uint stopTag, DicomReadOptions options)
        {
            DicomTag stopDicomTag = DicomTagDictionary.GetDicomTag(stopTag) ??
                                    new DicomTag(stopTag, "Bogus Tag", "BogusTag", DicomVr.NONE, false, 1, 1, false);

            Load(stopDicomTag, options);
        }
예제 #2
0
 public DicomFieldAttribute(uint tag, uint parentTag)
     : this(tag)
 {
     _parentTag = DicomTagDictionary.GetDicomTag(parentTag);
     if (_parentTag == null)
     {
         _parentTag = new DicomTag(parentTag, "Unknown Tag", "UnknownTag", DicomVr.UNvr, false, 1, uint.MaxValue, false);
     }
 }
예제 #3
0
        public DicomFieldAttribute(uint tag)
        {
            _tag = DicomTagDictionary.GetDicomTag(tag);
            if (_tag == null)
            {
                _tag = new DicomTag(tag, "Unknown Tag", "UnknownTag", DicomVr.UNvr, false, 1, uint.MaxValue, false);
            }

            _default     = DicomFieldDefault.None;
            _defltOnZL   = false;
            _createEmpty = false;
        }
 /// <summary>
 /// Contructor from a <see cref="DicomCompressedPixelData"/> instance.
 /// </summary>
 /// <param name="compressedPixelData"></param>
 public DicomUncompressedPixelData(DicomCompressedPixelData compressedPixelData)
     : base(compressedPixelData)
 {
     if (BitsAllocated > 8)
     {
         _pd = new DicomElementOw(DicomTags.PixelData);
     }
     else
     {
         var pdTag = DicomTagDictionary.GetDicomTag(DicomTags.PixelData);
         var obTag = new DicomTag(DicomTags.PixelData, pdTag.Name, pdTag.VariableName, DicomVr.OBvr, pdTag.MultiVR, pdTag.VMLow, pdTag.VMHigh, pdTag.Retired);
         _pd = new DicomElementOb(obTag);
     }
     InitializeFrameData(this, _pd);
 }
예제 #5
0
 /// <summary>
 /// Internal constructor when a uint representation of the tag is used to identify the tag being added.
 /// </summary>
 /// <param name="tag">The DICOM tag associated with the element being created.</param>
 internal DicomElement(uint tag)
 {
     Tag = DicomTagDictionary.GetDicomTag(tag);
 }