本文整理匯總了Python中dicom.dataset.Dataset.ImplementationVersionName方法的典型用法代碼示例。如果您正苦於以下問題:Python Dataset.ImplementationVersionName方法的具體用法?Python Dataset.ImplementationVersionName怎麽用?Python Dataset.ImplementationVersionName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類dicom.dataset.Dataset
的用法示例。
在下文中一共展示了Dataset.ImplementationVersionName方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: OnReceiveStore
# 需要導入模塊: from dicom.dataset import Dataset [as 別名]
# 或者: from dicom.dataset.Dataset import ImplementationVersionName [as 別名]
def OnReceiveStore(SOPClass, DS):
print "Received C-STORE"
# do something with dataset. For instance, store it on disk.
file_meta = Dataset()
file_meta.MediaStorageSOPClassUID = DS.SOPClassUID
file_meta.MediaStorageSOPInstanceUID = DS.SOPInstanceUID # Change to my own UID via dicom.UID.generate_uid() though I should make sure such genereated UIDs use my orgroot.
file_meta.ImplementationClassUID = "1.2.826.0.1.3680043.9.5066.0" # My UID for my implementation, with a '.0' appended to it to represent development testing, ie the UID I got from Medical Connections.
file_meta.ImplementationVersionName = "DICOMMETRICS-DEV" # My implementation version name. Remember to change this for each version. Remember to correspondingly change the ImplementationClassUID too.
filename = '%s/%s.dcm' % (tempfile.gettempdir(), DS.SOPInstanceUID)
ds = FileDataset(filename, {}, file_meta=file_meta, preamble="\0" * 128)
ds.update(DS)
ds.is_little_endian = True
ds.is_implicit_VR = True
ds.save_as(filename)
print "File %s written" % filename
# must return appropriate status
return SOPClass.Success