示例#1
0
        public override System.Drawing.Point GetNextPointOnXAxis(ImageInstance theImage, ref System.Drawing.Point theNextPoint)
        {
            if (!mCompletedFirstROI)
            {
                // first iterate through the FirstROI blindly
                mFirstROI.GetNextPointOnXAxis(theImage, ref theNextPoint);
                if (theNextPoint.X != -1 && theNextPoint.Y != -1)
                {
                    return(theNextPoint);
                }

                // once we hit the end of FirstROI, check if the first point in SecondROI is outside of FirstROI, if so, use it
                mCompletedFirstROI = true;
                theNextPoint       = mSecondROI.GetFirstPointOnXAxis(theImage, ref theNextPoint);
                if (!mFirstROI.ContainsPoint(theImage, theNextPoint))
                {
                    return(theNextPoint);
                }
            }
            // after using up FirstROI and the first point of SecondROI, then iterate through SecondROI and weed out any duplicate point
            do
            {
                mSecondROI.GetNextPointOnXAxis(theImage, ref theNextPoint);
            } while (theNextPoint.X != -1 && theNextPoint.Y != -1 && mFirstROI.ContainsPoint(theImage, theNextPoint));
            return(theNextPoint);
        }
 public override System.Drawing.Point GetFirstPointOnXAxis(ImageInstance theImage, ref System.Drawing.Point theFirstPoint)
 {
     mMainROI.GetFirstPointOnXAxis(theImage, ref theFirstPoint);
     while (theFirstPoint.X != -1 && theFirstPoint.Y != -1 && mHoleROI.ContainsPoint(theImage, theFirstPoint))
     {
         mMainROI.GetNextPointOnXAxis(theImage, ref theFirstPoint);
     }
     return(theFirstPoint);
 }
 public override bool ContainsPoint(ImageInstance theImage, System.Drawing.Point thePoint)
 {
     return(mMainROI.ContainsPoint(theImage, thePoint) && !mHoleROI.ContainsPoint(theImage, thePoint));
 }
示例#4
0
 public override bool ContainsPoint(ImageInstance theImage, System.Drawing.Point thePoint)
 {
     return(mFirstROI.ContainsPoint(theImage, thePoint) || mSecondROI.ContainsPoint(theImage, thePoint));
 }
示例#5
0
 public override bool ContainsPoint(ImageInstance theImage, System.Drawing.Point thePoint)
 {
     return(mMainROI.ContainsPoint(theImage, thePoint) && !mColorException.Matches(theImage.GetColor(thePoint.X, thePoint.Y)));
 }