ClearCanvas.ImageViewer.RoiGraphics.Roi.IsBoundingBoxInImage C# (CSharp) Method

IsBoundingBoxInImage() private method

Checks whether or not the region of interest's bounding box intersects the image.
private IsBoundingBoxInImage ( ) : bool
return bool
		private bool IsBoundingBoxInImage()
		{
			RectangleF boundingBox = BoundingBox;

			if (FloatComparer.AreEqual(0, boundingBox.Width) || FloatComparer.AreEqual(0, boundingBox.Height))
				return false;

			if (boundingBox.Left < 0 ||
			    boundingBox.Top < 0 ||
			    boundingBox.Right > (ImageColumns - 1) ||
			    boundingBox.Bottom > (ImageRows - 1))
				return false;

			return true;
		}