def __init__(self,
                 graph,
                 title,
                 projectFileGroupName,
                 supportIlastik05Import=False,
                 batchDataGui=False):
        super(DataSelectionApplet, self).__init__(title)

        # Our top-level operator is wrapped to enable multi-image support.
        # All inputs are common to all inputs except for the 'Dataset' input, which is unique for each image.
        # Hence, 'Dataset' is the only 'promoted' slot.
        self._topLevelOperator = OperatorWrapper(OpDataSelection,
                                                 graph=graph,
                                                 promotedSlotNames=set(
                                                     ['Dataset']))

        self._serializableItems = [
            DataSelectionSerializer(self._topLevelOperator,
                                    projectFileGroupName)
        ]
        if supportIlastik05Import:
            self._serializableItems.append(
                Ilastik05DataSelectionDeserializer(self._topLevelOperator))

        self._gui = None
        self.batchDataGui = batchDataGui

        self._preferencesManager = DataSelectionPreferencesManager()
Esempio n. 2
0
    def __init__(self,
                 workflow,
                 title,
                 projectFileGroupName,
                 supportIlastik05Import=False,
                 batchDataGui=False,
                 force5d=False,
                 instructionText=DEFAULT_INSTRUCTIONS,
                 max_lanes=None,
                 show_axis_details=False):
        self.__topLevelOperator = OpMultiLaneDataSelectionGroup(
            parent=workflow, force5d=force5d)
        super(DataSelectionApplet, self).__init__(title,
                                                  syncWithImageIndex=False)

        self._serializableItems = [
            DataSelectionSerializer(self.topLevelOperator,
                                    projectFileGroupName)
        ]
        if supportIlastik05Import:
            self._serializableItems.append(
                Ilastik05DataSelectionDeserializer(self.topLevelOperator))

        self._instructionText = instructionText
        self._gui = None
        self._batchDataGui = batchDataGui
        self._title = title
        self._max_lanes = max_lanes
        self.busy = False
        self.show_axis_details = show_axis_details