Beispiel #1
0
 public SegParamsInnerStructuresForm(List <string> imageFilenames, SegmentationParameters parametersWholeTissue, SegmentationParameters parametersInnerTissue)
 {
     InitializeComponent();
     this.filenames    = imageFilenames;
     this.selectedFile = imageFilenames.FirstOrDefault();
     this.image        = ReadWriteUtils.ReadOpenCVImageFromFile <Bgr, byte>(this.selectedFile);
     this.segmentationParametersInnerTissue = parametersInnerTissue;
     this.segmentationParametersWholeTissue = parametersWholeTissue;
 }
Beispiel #2
0
        public SegParamsWholeTissueForm(List <string> imageFilnames, SegmentationParameters parameters)
        {
            InitializeComponent();

            this.segmentationParameters = parameters;
            this.filenames    = imageFilnames;
            this.selectedFile = imageFilnames.FirstOrDefault();
            this.image        = ReadWriteUtils.ReadOpenCVImageFromFile <Bgr, byte>(this.selectedFile);

            InitializeButtons();
        }
Beispiel #3
0
        private void SetSegmentationParameters()
        {
            segmentationParameters = new SegmentationParameters();
            if (checkBoxContourSize.Checked)
            {
                segmentationParameters.ManualContourSizeRestriction = true;
                segmentationParameters.MinContourSize = (int)numericUpDownMin.Value;
                segmentationParameters.MaxContourSize = (int)numericUpDownMax.Value;
            }
            if (radioButtonThresholdManually.Checked)
            {
                segmentationParameters.UseOtsu   = false;
                segmentationParameters.Threshold = trackBar1.Value;
            }
            segmentationParameters.Channel = comboBoxChannel.SelectedIndex;
            int index = comboBoxColorspace.SelectedIndex;

            segmentationParameters.Colorspace = (ColorSpace)index;
        }