def OnScatterByID(self, event): from PYMEcs.recipes import localisations from PYME.recipes.base import ModuleCollection rec = ModuleCollection() ScatterbyID = localisations.ScatterbyID(rec) rec.namespace = {ScatterbyID.inputName: self.pipeline} if ScatterbyID.configure_traits(kind='modal'): # we call this with the pipeline to allow filtering etc ScatterbyID.execute(rec.namespace)
def OnQindexRatio(self, event): from PYMEcs.recipes import localisations from PYME.recipes.base import ModuleCollection rec = ModuleCollection() QIRatio = localisations.QindexRatio(rec) # we call this with the pipeline to allow filtering etc rec.namespace = {QIRatio.inputName: self.pipeline} if QIRatio.configure_traits(kind='modal'): QIRatio.execute(rec.namespace) self.pipeline.addColumn(QIRatio.qIndexRatio, rec.namespace[QIRatio.outputName][QIRatio.qIndexRatio])
def OnSaveTif(self, wx_event=None): from pyme_omero.recipe_modules import omero_upload import os from PYME.recipes.base import ModuleCollection from PYME.recipes.localisations import DensityMapping input_dir, file_stub = os.path.split(self.pipeline.filename) file_stub, ext = os.path.splitext(file_stub) context = dict(file_stub=file_stub, input_dir=input_dir) rec = ModuleCollection() # build new recipe but point to old namespace rec.namespace = self.pipeline.recipe.namespace rec.add_module( DensityMapping( rec, inputLocalizations=self.pipeline.selectedDataSourceKey, outputImage='thumbnail_rendering')) rec.add_module( omero_upload.ImageUpload(rec, input_image='thumbnail_rendering')) if rec.configure_traits(view=rec.pipeline_view, kind='modal'): rec.execute() rec.save(context)