def show_file(self, imageFile, fullPath):
""" Load the DICOM file, make sure it contains at least one
image, and set it up for display by OnPaint(). ** be
careful not to pass a unicode string to read_file or it will
give you 'fp object does not have a defer_size attribute,
or some such."""
ds = pydicom.read_file(str(fullPath))
ds.decode() # change strings to unicode
self.populateTree(ds)
if 'PixelData' in ds:
self.dImage = self.loadPIL_LUT(ds)
if self.dImage is not None:
tmpImage = self.ConvertPILToWX(self.dImage, False)
self.bitmap = wx.BitmapFromImage(tmpImage)
self.Refresh()
# ------ This is just the initialization of the App -------------------------
# =======================================================
# The main App Class.
# =======================================================
评论列表
文章目录