本文整理汇总了Python中EditUtil.EditUtil.exportAsDICOMSEG方法的典型用法代码示例。如果您正苦于以下问题:Python EditUtil.exportAsDICOMSEG方法的具体用法?Python EditUtil.exportAsDICOMSEG怎么用?Python EditUtil.exportAsDICOMSEG使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EditUtil.EditUtil
的用法示例。
在下文中一共展示了EditUtil.exportAsDICOMSEG方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: export
# 需要导入模块: from EditUtil import EditUtil [as 别名]
# 或者: from EditUtil.EditUtil import exportAsDICOMSEG [as 别名]
def export(self):
"""create a DICOM Segmentation Object from the current labels
and put it in the slicer dicom database"""
if not hasattr(slicer.modules, "encodeseg"):
# TODO: change this message when EncodeSEG is in the trunk
qt.QMessageBox.critical(
slicer.util.mainWindow(),
"DICOM",
"The Reporting extension must be installed in order to export segmentation objects",
)
return
if not self.master.GetAttribute("DICOM.instanceUIDs"):
qt.QMessageBox.critical(slicer.util.mainWindow(), "DICOM", "Master volume must have DICOM context")
return
rows = self.structures.rowCount()
if rows == 0:
self.split()
rows = self.structures.rowCount()
if rows == 0:
logging.info("Cannot export empty segmentation") # TODO: should you be able to?
return
EditUtil.exportAsDICOMSEG(self.master)
logging.info("Segmentations exported to DICOM Database")