예제 #1
0
        /// <summary>
        /// 获取当前选中ROI的信息
        /// </summary>
        /// <returns></returns>
        protected internal System.Collections.Generic.List <double> smallestActiveROI(out string name, out int index)
        {
            name = "";
            int activeROIIdx = this.getActiveROIIdx();

            index = activeROIIdx;
            if (activeROIIdx > -1)
            {
                ROI  region = this.getActiveROI();
                Type type   = region.GetType();
                name = type.Name;

                HTuple smallest = region.getModelData();
                System.Collections.Generic.List <double> resual = new System.Collections.Generic.List <double>();
                for (int i = 0; i < smallest.Length; i++)
                {
                    resual.Add(smallest[i].D);
                }

                return(resual);
            }
            else
            {
                return(null);
            }
        }
예제 #2
0
        protected internal ROI smallestActiveROI(out System.Collections.Generic.List <double> data, out int index)
        {
            int activeROIIdx = this.getActiveROIIdx();

            index = activeROIIdx;
            data  = new System.Collections.Generic.List <double>();

            if (activeROIIdx > -1)
            {
                ROI  region = this.getActiveROI();
                Type type   = region.GetType();

                HTuple smallest = region.getModelData();

                for (int i = 0; i < smallest.Length; i++)
                {
                    data.Add(smallest[i].D);
                }

                return(region);
            }
            else
            {
                return(null);
            }
        }
예제 #3
0
        /*****************************/
        /// <summary>
        /// 在指定位置显示ROI--Rectangle1
        /// </summary>
        /// <param name="row1"></param>
        /// <param name="col1"></param>
        /// <param name="row2"></param>
        /// <param name="col2"></param>
        /// <param name="rois"></param>
        public void displayRect1(string color, double row1, double col1, double row2, double col2)
        {
            setROIShape(new ROIRectangle1());

            if (roiMode != null)                         //either a new ROI object is created
            {
                roiMode.createRectangle1(row1, col1, row2, col2);
                roiMode.Type  = roiMode.GetType().Name;
                roiMode.Color = color;
                ROIList.Add(roiMode);
                roiMode      = null;
                activeROIidx = ROIList.Count - 1;
                viewController.repaint("blue");

                NotifyRCObserver(ROIController.EVENT_CREATED_ROI);
            }
        }