def __init__(self):
        super(VigraWatershedWorkflow, self).__init__()
        self._applets = []

        # Create a graph to be shared by all operators
        graph = Graph()
        self._graph = graph

        # Create applets
        self.dataSelectionApplet = DataSelectionApplet(
            graph,
            "Input Data",
            "Input Data",
            supportIlastik05Import=True,
            batchDataGui=False)
        self.watershedApplet = VigraWatershedViewerApplet(
            graph, "Watershed", "Watershed")

        # Connect top-level operators
        self.watershedApplet.topLevelOperator.InputImage.connect(
            self.dataSelectionApplet.topLevelOperator.Image)

        self._applets.append(self.dataSelectionApplet)
        self._applets.append(self.watershedApplet)

        # The shell needs a slot from which he can read the list of image names to switch between.
        # Use an OpAttributeSelector to create a slot containing just the filename from the OpDataSelection's DatasetInfo slot.
        opSelectFilename = OperatorWrapper(OpAttributeSelector, graph=graph)
        opSelectFilename.InputObject.connect(
            self.dataSelectionApplet.topLevelOperator.Dataset)
        opSelectFilename.AttributeName.setValue('filePath')

        self._imageNameListSlot = opSelectFilename.Result
Exemplo n.º 2
0
    def __init__(self, shell, headless, workflow_cmdline_args,
                 project_creation_workflow, *args, **kwargs):
        # Create a graph to be shared by all operators
        graph = Graph()

        super(VigraWatershedWorkflow, self).__init__(shell,
                                                     headless,
                                                     workflow_cmdline_args,
                                                     project_creation_workflow,
                                                     graph=graph,
                                                     *args,
                                                     **kwargs)
        self._applets = []

        # Create applets
        self.dataSelectionApplet = DataSelectionApplet(
            self,
            "Input Data",
            "Input Data",
            supportIlastik05Import=True,
            batchDataGui=False)
        self.watershedApplet = VigraWatershedViewerApplet(
            self, "Watershed", "Watershed")

        # Dataset inputs
        opDataSelection = self.dataSelectionApplet.topLevelOperator
        opDataSelection.DatasetRoles.setValue(['Raw Data'])

        # Expose to shell
        self._applets.append(self.dataSelectionApplet)
        self._applets.append(self.watershedApplet)
Exemplo n.º 3
0
    def __init__(self):
        super(PixelClassificationWithVigraWatershedWorkflow, self).__init__()

        self._pixelClassificationWorkflow = PixelClassificationWorkflow()

        self.dataSelectionApplet = self._pixelClassificationWorkflow.dataSelectionApplet

        self._graph = self._pixelClassificationWorkflow.graph
        graph = self._graph

        # Create applets
        self.watershedApplet = VigraWatershedViewerApplet(
            graph, "Watershed", "Watershed")

        # Connect top-level operators
        pixelClassificationApplet = self._pixelClassificationWorkflow.pcApplet
        opPixelClassification = pixelClassificationApplet.topLevelOperator

        opWatershedViewer = self.watershedApplet.topLevelOperator
        opWatershedViewer.InputImage.connect(
            opPixelClassification.CachedPredictionProbabilities)
        opWatershedViewer.RawImage.connect(opPixelClassification.InputImages)

        self._applets = []
        self._applets += self._pixelClassificationWorkflow.applets[0:4]
        self._applets.append(self.watershedApplet)
    def __init__(self, headless, workflow_cmdline_args, *args, **kwargs):
        super(PixelClassificationWithVigraWatershedWorkflow,
              self).__init__(headless,
                             workflow_cmdline_args,
                             appendBatchOperators=False,
                             *args,
                             **kwargs)

        # Create applets
        self.watershedApplet = VigraWatershedViewerApplet(
            self, "Watershed", "Watershed")

        # Expose for shell
        self._applets.append(self.watershedApplet)
Exemplo n.º 5
0
    def __init__(self, shell, headless, workflow_cmdline_args,
                 project_creation_args, *args, **kwargs):
        super(PixelClassificationWithWatershedWorkflow,
              self).__init__(shell, headless, workflow_cmdline_args,
                             project_creation_args, *args, **kwargs)

        # Create applets
        self.watershedApplet = VigraWatershedViewerApplet(
            self, "Watershed", "Watershed")

        opDataExport = self.dataExportApplet.topLevelOperator
        opDataExport.SelectionNames.setValue(
            self.EXPORT_NAMES + ["Watershed Seeds", "Watershed Labels"])

        # Expose for shell (insert before last applet, which is the batch applet)
        self._applets.insert(-2, self.watershedApplet)
    def __init__(self, shell, headless, workflow_cmdline_args,
                 project_creation_args, *args, **kwargs):
        super(PixelClassificationWithWatershedWorkflow,
              self).__init__(shell,
                             headless,
                             workflow_cmdline_args,
                             project_creation_args,
                             appendBatchOperators=False,
                             supports_anisotropic_data=False,
                             *args,
                             **kwargs)

        # Create applets
        self.watershedApplet = VigraWatershedViewerApplet(
            self, "Watershed", "Watershed")

        # Expose for shell
        self._applets.append(self.watershedApplet)
Exemplo n.º 7
0
    def __init__(self, headless, workflow_cmdline_args, *args, **kwargs):
        # Create a graph to be shared by all operators
        graph = Graph()

        super(VigraWatershedWorkflow, self).__init__(headless,
                                                     graph=graph,
                                                     *args,
                                                     **kwargs)
        self._applets = []

        # Create applets
        self.dataSelectionApplet = DataSelectionApplet(
            self,
            "Input Data",
            "Input Data",
            supportIlastik05Import=True,
            batchDataGui=False)
        self.watershedApplet = VigraWatershedViewerApplet(
            self, "Watershed", "Watershed")

        # Expose to shell
        self._applets.append(self.dataSelectionApplet)
        self._applets.append(self.watershedApplet)