• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Dicom.DicomTag类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ClearCanvas.Dicom.DicomTag的典型用法代码示例。如果您正苦于以下问题:C# DicomTag类的具体用法?C# DicomTag怎么用?C# DicomTag使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DicomTag类属于ClearCanvas.Dicom命名空间,在下文中一共展示了DicomTag类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: DicomAttributeMultiValueText

        internal DicomAttributeMultiValueText(DicomTag tag, ByteBuffer item)
            : base(tag)
        {
            string valueArray;

            valueArray = item.GetString();

            // store the length before removing pad chars
            StreamLength = (uint) valueArray.Length;

            // Saw some Osirix images that had padding on SH attributes with a null character, just
            // pull them out here.
			// Leading and trailing space characters are non-significant in all multi-valued VRs,
			// so pull them out here as well since some devices seem to pad UI attributes with spaces too.
            valueArray = valueArray.Trim(new [] {tag.VR.PadChar, '\0', ' '});

            if (valueArray.Length == 0)
            {
                _values = new string[0];
                Count = 1;
                StreamLength = 0;
            }
            else
            {
                _values = valueArray.Split(new char[] {'\\'});

                Count = (long) _values.Length;
                StreamLength = (uint) valueArray.Length;
            }
        }
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:30,代码来源:DicomAttributeMultiValueText.cs


示例2:

		public DicomAttribute this[DicomTag tag]
		{
			get
			{
				if (_attributes.ContainsKey(tag))
					return _attributes[tag];

				if (!_fieldMap.ContainsKey(tag))
				{
					return null;
				}

				DicomAttribute attr = tag.CreateDicomAttribute();
				object value = _fieldMap[tag].GetValue(_entity, null);
				if (value!=null)
					attr.SetStringValue(value.ToString());
				_attributes.Add(tag, attr);
				return attr;
			}
			set
			{
				if (_fieldMap[tag]!=null)
				{
					_fieldMap[tag].SetValue(_entity, value.ToString(), null);
				}
			}
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:27,代码来源:ServerEntityAttributeProvider.cs


示例3: DicomAttributeSQ

 public DicomAttributeSQ(DicomTag tag)
     : base(tag)
 {
     if (!tag.VR.Equals(DicomVr.SQvr)
      && !tag.MultiVR)
         throw new DicomException(SR.InvalidVR);
 }
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:7,代码来源:DicomAttributeSQ.cs


示例4: DicomFieldAttribute

		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);
		}
开发者ID:emmandeb,项目名称:ClearCanvas-1,代码行数:7,代码来源:DicomFieldAttribute.cs


示例5: Parse

        protected static void Parse(string tagPath, out List<DicomTag> parentTags, out DicomTag tag)
        {
            Platform.CheckForNullReference(tagPath, "tagPath");

            parentTags = null;
            tag = null;

            string[] tagPathComponents = tagPath.Split(',');
            if (tagPathComponents != null)
            {
                uint tagValue;
                if (tagPathComponents.Length > 1)
                {
                    parentTags = new List<DicomTag>();

                    for (int i = 0; i < tagPathComponents.Length - 1; i++)
                    {
                        tagValue = uint.Parse(tagPathComponents[i], NumberStyles.HexNumber);
                        DicomTag parent = DicomTagDictionary.GetDicomTag(tagValue);
                        if (parent == null)
                            throw new Exception(String.Format("Specified tag {0} is not in the dictionary", parent));
                        parentTags.Add(parent);
                    }
                }

                tagValue = uint.Parse(tagPathComponents[tagPathComponents.Length - 1], NumberStyles.HexNumber);
                tag = DicomTagDictionary.GetDicomTag(tagValue);
                if (tag == null)
                    throw new Exception(String.Format("Specified tag {0} is not in the dictionary", tag));

            }
        }
开发者ID:nhannd,项目名称:Xian,代码行数:32,代码来源:DicomTagPath.cs


示例6:

		public override DicomAttribute this[DicomTag tag]
		{
			get
			{
				DicomAttribute dicomAttribute;
				return _fusionHeaders.TryGetAttribute(tag, out dicomAttribute) ? dicomAttribute : _realSopDataSource[tag];
			}
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:8,代码来源:FusionSopDataSource.cs


示例7: TryGetAttribute

		public override bool TryGetAttribute(DicomTag tag, out DicomAttribute attribute)
		{
			lock (SyncLock)
			{
				// the instance dataset should always override the prototype values from the sliceset
				return DataSet.TryGetAttribute(tag, out attribute) || Slice.TryGetAttribute(tag, out attribute);
			}
		}
开发者ID:jfphilbin,项目名称:ClearCanvas,代码行数:8,代码来源:VolumeSliceSopDataSource.cs


示例8: DicomFieldAttribute

        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;
        }
开发者ID:khaha2210,项目名称:radio,代码行数:10,代码来源:DicomFieldAttribute.cs


示例9: TryGetAttribute

        public override bool TryGetAttribute(DicomTag tag, out DicomAttribute attribute)
        {
            lock (SyncLock)
            {
                if (NeedFullHeader(tag.TagValue))
                    GetFullHeader();

                return base.TryGetAttribute(tag, out attribute);
            }
        }
开发者ID:nhannd,项目名称:Xian,代码行数:10,代码来源:ImageServerSopDataSource.cs


示例10: DicomAttributeSingleValueText

		internal DicomAttributeSingleValueText(DicomTag tag, ByteBuffer item)
			: base(tag)
		{
			_value = item.GetString();

			// Saw some Osirix images that had padding on SH attributes with a null character, just
			// pull them out here.
			_value = _value.Trim(new char[] {tag.VR.PadChar, '\0'});

			Count = 1;
			StreamLength = (uint) _value.Length;
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:12,代码来源:DicomAttributeSingleValueText.cs


示例11: lock

        public override DicomAttribute this[DicomTag tag]
        {
            get
            {
                lock (SyncLock)
                {
                    if (NeedFullHeader(tag.TagValue))
						LoadFullHeader();

                    return base[tag];
                }
            }
        }
开发者ID:jfphilbin,项目名称:ClearCanvas,代码行数:13,代码来源:XmlSopDataSource.cs


示例12: lock

        public override DicomAttribute this[DicomTag tag]
        {
            get
            {
                //the _sop indexer is not thread-safe.
                lock (SyncLock)
                {
                    if (_sop.IsStoredTag(tag))
                        return _sop[tag];

                    return base[tag];
                }
            }
        }
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:14,代码来源:LocalStoreSopDataSource.cs


示例13: TryGetAttribute

        public override bool TryGetAttribute(DicomTag tag, out DicomAttribute attribute)
        {
            lock (SyncLock)
            {
                if (_sop.IsStoredTag(tag))
                {
                    attribute = _sop[tag];
                    if (!attribute.IsEmpty)
                        return true;
                }

                return base.TryGetAttribute(tag, out attribute);
            }
        }
开发者ID:nhannd,项目名称:Xian,代码行数:14,代码来源:LocalStoreSopDataSource.cs


示例14: lock

        public override DicomAttribute this[DicomTag tag]
        {
            get
            {
                lock (SyncLock)
                {
                    DicomAttribute attribute;
                    if (TryGetXmlAttribute(tag.TagValue, out attribute))
                        return attribute;

                    return base[tag];
                }
            }
        }
开发者ID:jasper-yeh,项目名称:ClearCanvas,代码行数:14,代码来源:XmlSopDataSource.cs


示例15:

		public override DicomAttribute this[DicomTag tag]
		{
			get
			{
				lock (SyncLock)
				{
					// the instance dataset should always override the prototype values from the sliceset
					// if the operation results in a new attribute being inserted, do it in the instance dataset
					DicomAttribute attribute;
					if (DataSet.TryGetAttribute(tag, out attribute) || Slice.TryGetAttribute(tag, out attribute))
						return attribute;
					return DataSet[tag];
				}
			}
		}
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:15,代码来源:AsyncVolumeSliceSopDataSource.cs


示例16: DicomUncompressedPixelData

		/// <summary>
		/// Contructor from a <see cref="DicomCompressedPixelData"/> instance.
		/// </summary>
		/// <param name="compressedPixelData"></param>
		public DicomUncompressedPixelData(DicomCompressedPixelData compressedPixelData)
			: base(compressedPixelData)
		{
			if (BitsAllocated > 8)
			{
				_pd = new DicomAttributeOW(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 DicomAttributeOB(obTag);
			}
			InitializeFrameData(this, _pd);
		}
开发者ID:jfphilbin,项目名称:ClearCanvas,代码行数:19,代码来源:DicomUncompressedPixelData.cs


示例17: GetInstanceXml

        private InstanceXml GetInstanceXml(StudyXmlOutputSettings outputSettings, out DicomFile real)
        {
            var xml = new StudyXml();
            real = new DicomFile();
            SetupMR(real.DataSet);
            real.MediaStorageSopClassUid = real.DataSet[DicomTags.SopClassUid].ToString();
            real.MetaInfo[DicomTags.SopClassUid].SetString(0, real.DataSet[DicomTags.SopClassUid].ToString());
            
            var bytes = new Byte[2048];
            real.DataSet[DicomTags.RedPaletteColorLookupTableData].Values = bytes;

            var privateTag = new DicomTag(0x00111301, "Private Tag", "PrivateTag", DicomVr.CSvr, false, 1, 1, false);
            real.DataSet[privateTag].SetString(0, "Private");

            var sequences = (DicomSequenceItem[])real.DataSet[DicomTags.RequestAttributesSequence].Values;
            var firstItem = sequences.First();
            firstItem[DicomTags.RedPaletteColorLookupTableData].Values = bytes;

            var attr = real.DataSet[DicomTags.ReferencedStudySequence];
            var sequenceItem = new DicomSequenceItem();
            attr.AddSequenceItem(sequenceItem);
            sequenceItem[privateTag].SetString(0, "Private");

            xml.AddFile(real);
            
            var memento = xml.GetMemento(outputSettings ?? new StudyXmlOutputSettings
            {
                IncludeLargeTags = StudyXmlTagInclusion.IncludeTagExclusion,
                IncludePrivateValues = StudyXmlTagInclusion.IgnoreTag,
                MaxTagLength = 1024
            });

            xml = new StudyXml();
            xml.SetMemento(memento);
            return xml.First().First();
        }
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:36,代码来源:XmlSopDataSourceTests.cs


示例18: TryGetAttribute

			public override bool TryGetAttribute(DicomTag tag, out DicomAttribute attribute)
			{
				return _sopDataSource.TryGetAttribute(tag, out attribute);
			}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:4,代码来源:UnitTestStudyLoader.cs


示例19:

			public override DicomAttribute this[DicomTag tag]
			{
				get { return _sopDataSource[tag]; }
			}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:4,代码来源:UnitTestStudyLoader.cs


示例20: TryGetAttribute

		public override bool TryGetAttribute(DicomTag tag, out DicomAttribute attribute)
		{
			return _fusionHeaders.TryGetAttribute(tag, out attribute) || _realSopDataSource.TryGetAttribute(tag, out attribute);
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:4,代码来源:FusionSopDataSource.cs



注:本文中的ClearCanvas.Dicom.DicomTag类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Network.AssociationParameters类代码示例发布时间:2022-05-24
下一篇:
C# Dicom.DicomMessageBase类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap