private void componentesLigadosToolStripMenuItem_Click(object sender, EventArgs e) { if (img == null) { return; } //copy Undo Image imgUndo = img.Copy(); Image <Gray, int> imgFinal = ImageClass.GetConnectedComponents(img); ShowIMG.ShowIMGStatic(img, imgFinal); }