Exemple #1
0
    def _visualize(self, obj, **args):

        if isinstance(obj, EmanProtBoxing):
            coords = obj.getCoords()
            if coords:
                XmippViewer._visualize(self, obj.outputCoordinates)

        elif isinstance(obj, EmanProtInitModel):
            obj = obj.outputVolumes
            fn = obj.getFileName()
            labels = 'id enabled comment _filename '
            objCommands = "'%s' '%s' '%s'" % (OBJCMD_CLASSAVG_PROJS,
                                              OBJCMD_PROJS, OBJCMD_INITVOL)

            self._views.append(
                vw.ObjectView(
                    self._project,
                    obj.strId(),
                    fn,
                    viewParams={
                        showj.MODE: showj.MODE_MD,
                        showj.ORDER: labels,
                        showj.VISIBLE: labels,
                        showj.RENDER: '_filename',
                        showj.OBJCMDS: objCommands
                    },
                ))
Exemple #2
0
 def createScipionPartView(self, filename, viewParams={}):
     inputParticlesId = self.protocol.inputParticles.get().strId()
     
     labels =  'enabled id _size _filename _transform._matrix'
     viewParams = {showj.ORDER:labels,
                   showj.VISIBLE: labels, showj.RENDER:'_filename',
                   'labels': 'id',
                   }
     return vw.ObjectView(self._project, 
                       self.protocol.strId(), filename, other=inputParticlesId,
                       env=self._env, viewParams=viewParams)
Exemple #3
0
    def _createVolumesSqlite(self):
        """ Write an sqlite with all volumes selected for visualization. """

        path = self.protocol._getExtraPath('eman2_viewer_volumes.sqlite')
        samplingRate = self.protocol.inputParticles.get().getSamplingRate()

        vols = self._getVolumeNames()
        files = []
        for vol in vols:
            if os.path.exists(vol):
                files.append(vol)
        self.createVolumesSqlite(files, path, samplingRate)
        return [vw.ObjectView(self._project, self.protocol.strId(), path)]