コード例 #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 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 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 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 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
 protected internal RoiData(int id, Rectangle1 rectangle1)
 {
     this._id         = id;
     this._name       = "Rectangle1";
     this._rectangle1 = rectangle1;
 }