예제 #1
0
파일: wizard.py 프로젝트: coocoky/scipion
    def _itemSelected(self, obj):
        
        index = obj.getIndex()
        filename = obj.getFileName()
        if index:
            filename = "%03d@%s" % (index, filename)
        
#        self.image = xmipp.Image()
        self.image = ImageHandler()._img
        
        try:
            self.image.readPreview(filename, self.dim)
            if filename.endswith('.psd'):
                self.image.convertPSD()
            self.Z = self.image.getData()
        except Exception, e:
            from pyworkflow.gui.matplotlib_image import getPngData
            self.Z = getPngData(findResource('no-image.png'))
            dialog.showError("Input particles", "Error reading image <%s>" % filename, self) 
예제 #2
0
    def _itemSelected(self, obj):

        index = obj.getIndex()
        filename = emlib.image.ImageHandler.fixXmippVolumeFileName(obj)
        if index:
            filename = "%03d@%s" % (index, filename)

        self.image = emlib.image.ImageHandler()._img

        try:
            self.image.readPreview(filename, self.dim)
            if filename.endswith('.psd'):
                self.image.convertPSD()
            self.Z = self.image.getData()
        except Exception as e:
            from pyworkflow.gui.matplotlib_image import getPngData
            self.Z = getPngData(pw.findResource('no-image.gif'))
            dialog.showError("Input particles",
                             "Error reading image <%s>" % filename, self)
        self.preview.updateData(self.Z)