本文整理汇总了C#中Dicom.Data.DicomTag类的典型用法代码示例。如果您正苦于以下问题:C# DicomTag类的具体用法?C# DicomTag怎么用?C# DicomTag使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DicomTag类属于Dicom.Data命名空间,在下文中一共展示了DicomTag类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DcmItem
public DcmItem(DicomTag tag, DicomVR vr, long pos, Endian endian)
{
_tag = tag;
_vr = vr;
_streamPosition = pos;
_endian = endian;
}
示例2: ConstructorPrivateCreator
public void ConstructorPrivateCreator()
{
var t = new DicomTag(0x2000, 0x2001, "TEST CREATOR");
Assert.AreEqual(0x2000, t.Group);
Assert.AreEqual(0x2001, t.Element);
Assert.AreEqual("TEST CREATOR", t.PrivateCreator);
}
示例3: ConstructorSimple
public void ConstructorSimple()
{
var t = new DicomTag(0x0028, 0x1203);
Assert.AreEqual(t.Group, 0x0028);
Assert.AreEqual(t.Element, 0x1203);
Assert.IsEmpty(t.PrivateCreator);
}
示例4: Equals
public void Equals()
{
var a = new DicomTag(0x0028, 0x9145);
var b = new DicomTag(0x0028, 0x9146);
var c = new DicomTag(0x0028, 0x9146);
var z = default(DicomTag);
Assert.IsFalse(a.Equals(b));
Assert.IsFalse(b.Equals(a));
Assert.IsTrue(b.Equals(c));
Assert.IsTrue(c.Equals(b));
Assert.IsFalse(a.Equals(z));
Assert.IsFalse(b.Equals(z));
}
示例5: EqualsObject
public void EqualsObject()
{
var a = new DicomTag(0x0028, 0x9145);
var b = new DicomTag(0x0028, 0x9146);
var c = new DicomTag(0x0028, 0x9146);
var z = default(DicomTag);
Assert.IsFalse(a.Equals((object)b));
Assert.IsFalse(b.Equals((object)a));
Assert.IsTrue(b.Equals((object)c));
Assert.IsTrue(c.Equals((object)b));
Assert.IsFalse(a.Equals((object)z));
Assert.IsFalse(b.Equals((object)z));
}
示例6: OpNEq
public void OpNEq()
{
var a = new DicomTag(0x0028, 0x9145);
var b = new DicomTag(0x0028, 0x9146);
var c = new DicomTag(0x0028, 0x9146);
var z = default(DicomTag);
Assert.IsTrue(a != b);
Assert.IsTrue(b != a);
Assert.IsFalse(b != c);
Assert.IsFalse(c != b);
Assert.IsTrue(z != a);
Assert.IsTrue(a != z);
Assert.IsTrue(z != b);
Assert.IsTrue(b != z);
}
示例7: OpEq
public void OpEq()
{
var a = new DicomTag(0x0028, 0x9145);
var b = new DicomTag(0x0028, 0x9146);
var c = new DicomTag(0x0028, 0x9146);
var z = default(DicomTag);
Assert.IsFalse(a == b);
Assert.IsFalse(b == a);
Assert.IsTrue(b == c);
Assert.IsTrue(c == b);
Assert.IsFalse(z == a);
Assert.IsFalse(a == z);
Assert.IsFalse(z == b);
Assert.IsFalse(b == z);
}
示例8: GetUL
public DcmUnsignedLong GetUL(DicomTag tag)
{
DcmElement elem = GetElement(tag);
if (elem is DcmUnsignedLong)
return elem as DcmUnsignedLong;
if (elem != null)
throw new DicomDataException("Tried to access element with incorrect VR");
return null;
}
示例9: GetUInt16
public ushort GetUInt16(DicomTag tag, ushort deflt)
{
DcmUnsignedShort us = GetUS(tag);
if (us != null && us.Length > 0)
return us.GetValue();
return deflt;
}
示例10: GetUID
public DicomUID GetUID(DicomTag tag)
{
DcmUniqueIdentifier ui = GetUI(tag);
if (ui != null && ui.Length > 0)
return ui.GetUID();
return null;
}
示例11: GetUI
public DcmUniqueIdentifier GetUI(DicomTag tag)
{
DcmElement elem = GetElement(tag);
if (elem is DcmUniqueIdentifier)
return elem as DcmUniqueIdentifier;
if (elem != null)
throw new DicomDataException("Tried to access element with incorrect VR");
return null;
}
示例12: GetInt16
public short GetInt16(DicomTag tag, short deflt)
{
DcmSignedShort ss = GetSS(tag);
if (ss != null && ss.Length > 0)
return ss.GetValue();
return deflt;
}
示例13: OnReceiveNGetRequest
protected virtual void OnReceiveNGetRequest(byte presentationID, ushort messageID, DicomUID requestedClass, DicomUID requestedInstance, DicomTag[] attributes)
{
SendAbort(DcmAbortSource.ServiceProvider, DcmAbortReason.NotSpecified);
}
示例14: GetVR
public DicomVR GetVR(DicomTag tag)
{
DcmElement elem = GetElement(tag);
if (elem == null)
return null;
return elem.VR;
}
示例15: GetString
public string GetString(DicomTag tag, string deflt)
{
return GetString(tag, 0, deflt);
}