private void dilateAndErodeToolStripMenuItem_Click(object sender, EventArgs e) { if (image != null) { DetermineAstrocytes dest = new DetermineAstrocytes(image); dest.MathMorphology(outputImage).CopyTo(outputImage); imageBox1.Image = outputImage; imageBox1.Refresh(); } }
private void RefreshCanny() { setChannel(); if (image != null) { Mat destImage = new Mat(); image.CopyTo(destImage); determineAstrocytes = new DetermineAstrocytes(destImage, minThreshold, maxThreshold, channel); determineAstrocytes.getOutputImage().CopyTo(outputImage); imageBox1.Image = outputImage; //imageBox1.Image = determineAstrocytes.getOutputImage(); //imageBox1.Image = determineAstrocytes.getOutputImageOverSourceImage(); imageBox1.Refresh(); } }
private void grayscaleToolStripMenuItem_Click(object sender, EventArgs e) { if (image != null) { DetermineAstrocytes dest = new DetermineAstrocytes(image); Mat destImage = new Mat(); destImage = dest.Grayscale(outputImage); if (destImage != null) { destImage.CopyTo(outputImage); imageBox1.Image = outputImage; imageBox1.Refresh(); } } }
private void findContoursToolStripMenuItem_Click(object sender, EventArgs e) { if (image != null) { DetermineAstrocytes dest = new DetermineAstrocytes(image); Mat destImage = new Mat(); destImage = dest.FindContours(outputImage); if (destImage != null) { label2.Text = dest.getTotalNumberOfAstrocytes().ToString(); int[] numberOfAstrocytes = dest.getNumberOfAstrocytes(); label4.Text = numberOfAstrocytes[0].ToString(); label6.Text = numberOfAstrocytes[1].ToString(); label8.Text = numberOfAstrocytes[2].ToString(); label10.Text = numberOfAstrocytes[3].ToString(); label12.Text = numberOfAstrocytes[4].ToString(); label14.Text = numberOfAstrocytes[5].ToString(); destImage.CopyTo(outputImage); imageBox1.Image = outputImage; imageBox1.Refresh(); } } }