|
@@ -413,7 +413,7 @@ namespace OTSModelSharp.ServiceCenter
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
- public void GetImageWithBlackColoredParts(List<COTSParticleClr> analysitParts, ref Bitmap a_pBmpOut)
|
|
|
+ public void GetImageWithBlackColoredParts(List<COTSParticleClr> analysitParts,COTSImageProcParam a_pImgProcessParam,double a_pixelSize, ref Bitmap a_pBmpOut)
|
|
|
{
|
|
|
|
|
|
|
|
@@ -446,12 +446,22 @@ namespace OTSModelSharp.ServiceCenter
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ }
|
|
|
+ Graphics graphics = Graphics.FromImage(a_pBmpOut);
|
|
|
+
|
|
|
+ // 绘制一个红色矩形
|
|
|
+ Pen pen = new Pen(Color.Red, 1);
|
|
|
+ var overlap = a_pImgProcessParam.GetOverlapParam();
|
|
|
+ if (overlap > 0)
|
|
|
+ {
|
|
|
+ int overlapPixels = (int)(overlap / a_pixelSize);
|
|
|
+ graphics.DrawRectangle(pen, overlapPixels, overlapPixels, a_pBmpOut.Width - 2 * overlapPixels, a_pBmpOut.Height - 2 * overlapPixels);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
-
|
|
|
return;
|
|
|
}
|
|
|
- public void GetImageWithSTDColoredParts(List<COTSParticleClr> analysitParts, ref Bitmap a_pBmpOut)
|
|
|
+ public void GetImageWithSTDColoredParts(List<COTSParticleClr> analysitParts, COTSImageProcParam a_pImgProcessParam, double a_pixelSize, ref Bitmap a_pBmpOut)
|
|
|
{
|
|
|
|
|
|
|
|
@@ -486,7 +496,17 @@ namespace OTSModelSharp.ServiceCenter
|
|
|
|
|
|
}
|
|
|
|
|
|
+ Graphics graphics = Graphics.FromImage(a_pBmpOut);
|
|
|
|
|
|
+ // 绘制一个红色矩形
|
|
|
+ Pen pen = new Pen(Color.Red, 1);
|
|
|
+ var overlap = a_pImgProcessParam.GetOverlapParam();
|
|
|
+ if (overlap > 0)
|
|
|
+ {
|
|
|
+ int overlapPixels = (int)(overlap / a_pixelSize);
|
|
|
+ graphics.DrawRectangle(pen, overlapPixels, overlapPixels, a_pBmpOut.Width - 2 * overlapPixels, a_pBmpOut.Height - 2 * overlapPixels);
|
|
|
+
|
|
|
+ }
|
|
|
return;
|
|
|
}
|
|
|
|