示例#1
0
        protected internal RoiData(int id, ROI roi)
        {
            this._id = id;
            HTuple m_roiData = null;

            m_roiData = roi.getModelData();

            switch (roi.Type)
            {
            case "ROIRectangle1":
                this._name = "Rectangle1";

                if (m_roiData != null)
                {
                    this._rectangle1       = new Config.Rectangle1(m_roiData[0].D, m_roiData[1].D, m_roiData[2].D, m_roiData[3].D);
                    this._rectangle1.Color = roi.Color;
                }
                break;

            case "ROIRectangle2":
                this._name = "Rectangle2";

                if (m_roiData != null)
                {
                    this._rectangle2       = new Config.Rectangle2(m_roiData[0].D, m_roiData[1].D, m_roiData[2].D, m_roiData[3].D, m_roiData[4].D);
                    this._rectangle2.Color = roi.Color;
                }
                break;

            case "ROICircle":
                this._name = "Circle";

                if (m_roiData != null)
                {
                    this._circle       = new Config.Circle(m_roiData[0].D, m_roiData[1].D, m_roiData[2].D);
                    this._circle.Color = roi.Color;
                }
                break;

            case "ROILine":
                this._name = "Line";

                if (m_roiData != null)
                {
                    this._line       = new Config.Line(m_roiData[0].D, m_roiData[1].D, m_roiData[2].D, m_roiData[3].D);
                    this._line.Color = roi.Color;
                }
                break;

            default:
                break;
            }
        }
示例#2
0
 public RoiData(int id, Config.Line line)
 {
     this._id   = id;
     this._name = "Line";
     this._line = line;
 }
示例#3
0
 protected internal RoiData(int id, Config.Line line)
 {
     this._id   = id;
     this._name = "Line";
     this._line = line;
 }