ea40a555956467d98c7d321633a73cf408d9a805,skimage/color/colorlabel.py,,_match_label_with_color,#Any#Any#Any#Any#,42
Before Change
bg_color = (0, 0, 0)
bg_color = _rgb_vector([bg_color])
unique_labels = list(set(label.flat))
// Ensure that the background label is in front to match call to `chain`.
if bg_label in unique_labels:
unique_labels.remove(bg_label)
unique_labels.insert(0, bg_label)
After Change
bg_color = _rgb_vector([bg_color])
// map labels to their ranks among all labels from small to large
unique_labels, mapped_labels = np.unique(label, return_inverse=True)
// get rank of bg_label
bg_label_rank_list = mapped_labels[label.flat == bg_label]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: scikit-image/scikit-image
Commit Name: ea40a555956467d98c7d321633a73cf408d9a805
Time: 2016-11-08
Author: yue@berkeley.edu
File Name: skimage/color/colorlabel.py
Class Name:
Method Name: _match_label_with_color
Project Name: pfnet/optuna
Commit Name: 4acb2e669d287af76b2936b42d801b7d1c818c4d
Time: 2019-12-01
Author: t.ohmae.nx01@gmail.com
File Name: examples/skimage_lbp_simple.py
Class Name:
Method Name: load_data
Project Name: NifTK/NiftyNet
Commit Name: baecce5a6fbe4576ca8348a93dc56f07e7ba84f6
Time: 2019-06-05
Author: ucabtmv@ucl.ac.uk
File Name: niftynet/contrib/csv_reader/csv_reader.py
Class Name: CSVReader
Method Name: _parse_csv