def on_btnChooseWeights_clicked(self):
        dlg = OverlaySelectionDialog(self.ilastik,  singleSelection = True)
        answer = dlg.exec_()
        
        if len(answer) > 0:
            overlay = answer[0]
            self.parent.labelWidget.overlayWidget.addOverlayRef(overlay.getRef())
            
            volume = overlay._data[0,:,:,:,0]
            
            borderIndicator = QtGui.QInputDialog.getItem(self.ilastik, "Select border indicator type", "Select the border probability type : \n (Normal: bright pixels mean high border probability, Inverted: dark pixels mean high border probability) ",  ["Normal",  "Inverted"],  editable = False)
            borderIndicator = str(borderIndicator[0])
            if borderIndicator == "Normal":
                weights = volume[:,:,:]
            elif borderIndicator == "Inverted":            
                weights = self.parent.project.dataMgr.Automatic_Segmentation.invertPotential(volume)
            weights = self.parent.project.dataMgr.Automatic_Segmentation.normalizePotential(weights)

            self.weights = weights
dataset/ETHPy150Open ilastik/ilastik-0.5/ilastik/modules/automatic_segmentation/gui/automaticSegmentationRibbon.py/AutoSegmentationTab.on_btnChooseWeights_clicked/original