|
// Handler for Blob Tool ran event. If Blob results have changed then update the
// Count & Region graphic.
private void BlobTool_Ran(object sender, EventArgs e)
{
CogGraphicInteractiveCollection ResultGraphics = new CogGraphicInteractiveCollection();
if (!RunningAll)
{
cogDisplay1.InteractiveGraphics.Clear();
cogDisplay1.StaticGraphics.Clear();
}
if (BlobTool.Results == null)
BlobCountText.Text = "N/A";
else
{
BlobCountText.Text = BlobTool.Results.GetBlobs(true).Count.ToString();
BlobCountText.Refresh();
foreach (CogBlobResult BlobResult in BlobTool.Results.GetBlobs(true))
ResultGraphics.Add(BlobResult.CreateResultGraphics(CogBlobResultGraphicConstants.Boundary |
CogBlobResultGraphicConstants.TipText));
cogDisplay1.InteractiveGraphics.AddList(ResultGraphics,"main",false);
}
} |
|