Exemplo n.º 1
0
 /// <summary>
 /// Clears all variables managing ROI objects
 /// </summary>
 public void Reset()
 {
     ROIList.Clear();
     ActiveROIIndex = -1;
     _ROIMode       = null;
     if (ModelROI != null)
     {
         ModelROI.Dispose();
     }
     ModelROI = null;
     this.NotifyIconic(EVENT_DELETED_ALL_ROIS);
 }
Exemplo n.º 2
0
        public override HalconDotNet.HRegion GetRegion()
        {
            HalconDotNet.HRegion rgInternal = new HalconDotNet.HRegion();
            rgInternal.GenCircle(_locateRow, _locateCol, _radiusInternal);

            HalconDotNet.HRegion rgExternal = new HalconDotNet.HRegion();
            rgExternal.GenCircle(_locateRow, _locateCol, _radiusExternal);

            HalconDotNet.HRegion rg = new HalconDotNet.HRegion();
            rg.Dispose();

            //计算圆环区域:半径大的圆与半径小的圆之间的差集
            rg = (_radiusExternal > _radiusInternal) ? rgExternal.Difference(rgInternal) : rgInternal.Difference(rgExternal);

            return(rg);
        }