当前位置: 首页>>代码示例>>C#>>正文


C# Dicom.DicomTag类代码示例

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


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


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