本文整理汇总了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;
}
}
示例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);
}
}
}
示例3: DicomAttributeSQ
public DicomAttributeSQ(DicomTag tag)
: base(tag)
{
if (!tag.VR.Equals(DicomVr.SQvr)
&& !tag.MultiVR)
throw new DicomException(SR.InvalidVR);
}
示例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);
}
示例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));
}
}
示例6:
public override DicomAttribute this[DicomTag tag]
{
get
{
DicomAttribute dicomAttribute;
return _fusionHeaders.TryGetAttribute(tag, out dicomAttribute) ? dicomAttribute : _realSopDataSource[tag];
}
}
示例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);
}
}
示例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;
}
示例9: TryGetAttribute
public override bool TryGetAttribute(DicomTag tag, out DicomAttribute attribute)
{
lock (SyncLock)
{
if (NeedFullHeader(tag.TagValue))
GetFullHeader();
return base.TryGetAttribute(tag, out attribute);
}
}
示例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;
}
示例11: lock
public override DicomAttribute this[DicomTag tag]
{
get
{
lock (SyncLock)
{
if (NeedFullHeader(tag.TagValue))
LoadFullHeader();
return base[tag];
}
}
}
示例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];
}
}
}
示例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);
}
}
示例14: lock
public override DicomAttribute this[DicomTag tag]
{
get
{
lock (SyncLock)
{
DicomAttribute attribute;
if (TryGetXmlAttribute(tag.TagValue, out attribute))
return attribute;
return base[tag];
}
}
}
示例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];
}
}
}