b71c79b8bb87791082c23837e472d97a7bfab712,ilastik/applets/labeling/labelingGui.py,LabelingGui,_addNewLabel,#LabelingGui#,476
Before Change
Add a new label to the label list GUI control.
Return the new number of labels in the control.
numLabels = len(self._labelControlUi.labelListModel)
if numLabels >= len(self._colorTable16)-1:
// If the color table isn"t large enough to handle all our labels,
// append a random color
randomColor = QColor(numpy.random.randint(0,255), numpy.random.randint(0,255), numpy.random.randint(0,255))
self._colorTable16.append( randomColor.rgba() )
color = QColor()
color.setRgba(self._colorTable16[numLabels+1]) // First entry is transparent (for zero label)
label = Label(self._getNextLabelName(), color)
After Change
label = Label( self.getNextLabelName(), self.getNextLabelColor() )
label.nameChanged.connect(self._updateLabelShortcuts)
label.nameChanged.connect(self.onLabelNameChanged)
label.colorChanged.connect(self.onLabelColorChanged)
newRow = self._labelControlUi.labelListModel.rowCount()
self._labelControlUi.labelListModel.insertRow( newRow, label )
newColorIndex = self._labelControlUi.labelListModel.index(newRow, 0)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: ilastik/ilastik
Commit Name: b71c79b8bb87791082c23837e472d97a7bfab712
Time: 2012-11-16
Author: bergs@janelia.hhmi.org
File Name: ilastik/applets/labeling/labelingGui.py
Class Name: LabelingGui
Method Name: _addNewLabel
Project Name: ilastik/ilastik
Commit Name: 8861dfa21d1cfd487b7a6eb7508885f084f58e6c
Time: 2019-07-10
Author: tomaz.vieira@embl.de
File Name: ilastik/applets/dataSelection/datasetInfoEditorWidget.py
Class Name: DatasetInfoEditorWidget
Method Name: __init__
Project Name: ilastik/ilastik
Commit Name: 05fefb031b5668b8e823298257d907b67d8a2ca0
Time: 2012-09-05
Author: bergs@janelia.hhmi.org
File Name: ilastik/applets/vigraWatershedViewer/opVigraWatershedViewer.py
Class Name: OpVigraWatershedViewer
Method Name: setupOutputs