123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- using OpenCvSharp;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace PaintDotNet.DedicatedAnalysis.GrainSizeStandard.IntegrationClass
- {
- class GrainSizeStandardModel
- {
- /// <summary>
- /// 找到当前的参数数据
- /// </summary>
- /// <param name="menuId"></param>
- /// <returns></returns>
- public GrainSizeStandardModel cloneListParamModel()
- {
- GrainSizeStandardModel newMod = new GrainSizeStandardModel();
- newMod.linePointList.AddRange(this.linePointList);
- newMod.massLabelPointsList.AddRange(this.massLabelPointsList);
- foreach (var itemkey in this.massLabelPoints.Keys)
- newMod.massLabelPoints.Add(itemkey, this.massLabelPoints[itemkey]);
- //newMod.ListParam = new List<GrainSizeAnalysisModel>();
- //foreach (var item in this.ListParam)
- // if (item.menuId == menuId)
- // newMod.ListParam.Add(item.cloneModel());
- return newMod;
- }
- public GrainSizeStandardModel cloneModel()
- {
- GrainSizeStandardModel newMod = new GrainSizeStandardModel();
- newMod.linePointList.AddRange(this.linePointList);
- newMod.within = this.within;
- newMod.massLabelPointsList.AddRange(this.massLabelPointsList);
- foreach (var itemkey in this.massLabelPoints.Keys)
- newMod.massLabelPoints.Add(itemkey, this.massLabelPoints[itemkey]);
- newMod.currentNccompSelectList.AddRange(this.currentNccompSelectList);
- newMod.currentNccompSelect.AddRange(this.currentNccompSelect);
- if (this.currentStatsArray != null)
- newMod.currentStatsArray = (Mat[])this.currentStatsArray.Clone();
- if (this.currentStats != null)
- newMod.currentStats = this.currentStats.Clone();
- if (this.currentLabelMatArray != null)
- newMod.currentLabelMatArray = (Mat[])this.currentLabelMatArray.Clone();
- if (this.currentLabelMat != null)
- newMod.currentLabelMat = this.currentLabelMat.Clone();
- return newMod;
- }
- /// <summary>
- /// 图形上所有的点
- /// </summary>
- public List<PointF> linePointList = new List<PointF>();
- /// <summary>
- /// 矩形内的连通域
- /// </summary>
- public int within = 0;
- /// <summary>
- /// 用于编号的坐标点集合,value为: aec_length(物理长度) + [1内部] + [label_x] + [label_y] + aec(晶粒面积)-多视场
- /// </summary>
- public List<Dictionary<int, List<double>>> massLabelPointsList = new List<Dictionary<int, List<double>>>();
- /// <summary>
- /// 用于编号的坐标点集合,value为: 备用数据 + [1内部] + [label_x] + [label_y],key为label
- /// </summary>
- public Dictionary<int, List<double>> massLabelPoints = new Dictionary<int, List<double>>();
- /// <summary>
- /// 视场内符合条件的连通域label集合-多视场
- /// </summary>
- public List<ArrayList> currentNccompSelectList = new List<ArrayList>();
- /// <summary>
- /// 视场内符合条件的连通域label集合
- /// </summary>
- public ArrayList currentNccompSelect = new ArrayList();
- /// <summary>
- /// Nx5 matrix (CV_32S) of statistics: x0, y0, width0, height0, area0-多视场
- /// </summary>
- public Mat[] currentStatsArray;
- /// <summary>
- /// Nx5 matrix (CV_32S) of statistics: x0, y0, width0, height0, area0
- /// </summary>
- public Mat currentStats;
- /// <summary>
- /// 存储连通域数据-多视场
- /// </summary>
- public Mat[] currentLabelMatArray;
- /// <summary>
- /// 存储连通域数据
- /// </summary>
- public Mat currentLabelMat;
- }
- }
|