public List <Dot_Lab> GetListDotsDrawed_Lab() { List <Dot_Lab> listDotsDrawed = new List <Dot_Lab>(); foreach (IShape shape in listShapes) { if (shape is Dot_RGB) { Dot_Lab dotLab = (shape as Dot_RGB).ToDotLab(); listDotsDrawed.Add(dotLab); } } return(listDotsDrawed); }
private List <string> SearchByColor(Dictionary <string, string> pctIndexingData, string query) { List <string> listFrameName = new List <string>(); List <Dot_Lab> listDotsDrawed_Lab = new List <Dot_Lab>(); // query : 238_101-140_255_251^^^41_99-140_255_251^^^141_98-236_28_36 string[] values = query.Split(new string[] { "^^^" }, StringSplitOptions.None); foreach (var value in values) { string[] _values = value.Split('_'); Dot_Lab dot = new Dot_Lab(new Point(int.Parse(_values[0]), int.Parse(_values[1])), 17.5f, new Rgb() { R = int.Parse(_values[2]), G = int.Parse(_values[3]), B = int.Parse(_values[4]) }.To <Lab>()); listDotsDrawed_Lab.Add(dot); } List <String> result = PCTSearching.SearchingV3_Lab(pctIndexingData, listDotsDrawed_Lab, new Size(316, 204)); return(result == null || result.Count == 0 ? null : result); }