imViewer_Simple.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:bids 作者: robertoostenveld 项目源码 文件源码
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.
# =======================================================
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号