Exemplo n.º 1
0
        public VisGrainDataCollection(Collection <ClassifierReport> reportType, Collection <ClassifierReport> reportSize, List <VisRectangleContour> listRect)
        {
            Items = new List <VisGrainData>();
            int countSize = reportSize.Count;
            int countType = reportType.Count;
            int count     = 0;

            if (countSize > countType)
            {
                count = countSize;
            }
            else
            {
                count = countType;
            }

            for (int i = 0; i < count; i++)
            {
                ClassifierReport rSize     = reportSize[i];
                ClassifierReport rType     = reportType[i];
                VisGrainSize     grainSize = new VisGrainSize {
                    Name = rSize.BestClassName, ScoreClassification = rSize.ClassificationScore, ScoreIdentification = rSize.IdentificationScore
                };
                VisGrainType grainType = new VisGrainType {
                    Name = rType.BestClassName, ScoreClassification = rType.ClassificationScore, ScoreIdentification = rType.IdentificationScore
                };
                VisGrainData grainData = new VisGrainData(grainType, grainSize, listRect[i]);
                Items.Add(grainData);
            }

            Message = "";
        }
 public VisGrainSizeCollection(Collection <ClassifierReport> reports)
 {
     Items = new List <VisGrainSize>();
     foreach (ClassifierReport r in reports)
     {
         VisGrainSize v = new VisGrainSize {
             Name = r.BestClassName, ScoreClassification = r.ClassificationScore, ScoreIdentification = r.IdentificationScore
         };
         Items.Add(v);
     }
     Message = "";
 }
Exemplo n.º 3
0
 public VisGrainData(VisGrainType grainType, VisGrainSize grainSize, VisRectangleContour rect)
 {
     GrainType = grainType;
     GrainSize = grainSize;
     Shape     = rect;
 }
Exemplo n.º 4
0
 public VisGrainData(VisGrainType grainType, VisGrainSize grainSize)
 {
     GrainType = grainType;
     GrainSize = grainSize;
 }