本文整理匯總了Python中pydicom.dataelem.DataElement.description方法的典型用法代碼示例。如果您正苦於以下問題:Python DataElement.description方法的具體用法?Python DataElement.description怎麽用?Python DataElement.description使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pydicom.dataelem.DataElement
的用法示例。
在下文中一共展示了DataElement.description方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_description_unknown_private
# 需要導入模塊: from pydicom.dataelem import DataElement [as 別名]
# 或者: from pydicom.dataelem.DataElement import description [as 別名]
def test_description_unknown_private(self):
"""Test DataElement.description with an unknown private element"""
elem = DataElement(0x00110010, 'LO', 12345)
elem.private_creator = 'TEST'
assert elem.description() == 'Private tag data'
elem = DataElement(0x00110F00, 'LO', 12345)
assert elem.tag.is_private
assert not hasattr(elem, 'private_creator')
assert elem.description() == 'Private tag data'
示例2: test_description_unknown
# 需要導入模塊: from pydicom.dataelem import DataElement [as 別名]
# 或者: from pydicom.dataelem.DataElement import description [as 別名]
def test_description_unknown(self):
"""Test DataElement.description with an unknown element"""
elem = DataElement(0x00000004, 'LO', 12345)
assert elem.description() == ''
示例3: test_description_group_length
# 需要導入模塊: from pydicom.dataelem import DataElement [as 別名]
# 或者: from pydicom.dataelem.DataElement import description [as 別名]
def test_description_group_length(self):
"""Test DataElement.description for Group Length element"""
elem = DataElement(0x00100000, 'LO', 12345)
assert elem.description() == 'Group Length'