private void backWorkLoadData_DoWork(object sender, DoWorkEventArgs e) //private void btn_load_Click(object sender, EventArgs e) { ExperimentsNames wsiIndexItem = new ExperimentsNames(); this.Invoke(new MethodInvoker(delegate() { wsiIndexItem = (ExperimentsNames)cmbBox_experiments.SelectedItem; })); int wsiIndex = wsiIndexItem.Order; richTextBox1.Invoke((MethodInvoker) delegate { richTextBox1.Text = $"Načitávam facts"; }); factorsOfMisclassification = LoadDatabase.Load_Factors(ExplanationDatabase.factOfMisclass_dir_path[wsiIndex], richTextBox1); string cancer_path = ExplanationDatabase.wsi_paths[wsiIndex]; string label_path = ExplanationDatabase.wsi_labels_paths[wsiIndex]; var cancer_img = new Bitmap(cancer_path); this.cancerBm = cancer_img; richTextBox1.Invoke((MethodInvoker) delegate { richTextBox1.Text = $"Načitávam label"; }); var label_img = new Bitmap(label_path); this.labelBm = label_img; this.memberships = LoadDatabase.LoadMemberships(wsiIndex); this.data_memberships = LoadDatabase.LoadDataMembership(); this.data_paths = LoadDatabase.LoadDataPaths(); trackBar1.Invoke((MethodInvoker) delegate { trackBar1.Visible = true; }); pcBx_cancer.Image = cancer_img; pcBx_label.Image = label_img; this.history = new ExperimentHistory(); this.wsi_name = wsiIndexItem.Name; folderPathToSaveResult = ExplanationDatabase.WSI_DATA_PATH + wsi_name + "\\results"; Directory.CreateDirectory(folderPathToSaveResult); // load sugggested point to examine this.suggestedPoints = Utilities.LoadSuggestedPoints(this.wsi_name); this.suggestedPoints.Shuffle(); }
public Form1() { InitializeComponent(); ToolTip toolTip1 = new System.Windows.Forms.ToolTip(); toolTip1.SetToolTip(this.button_class1, "tumor epithelium"); ToolTip toolTip2 = new System.Windows.Forms.ToolTip(); toolTip1.SetToolTip(this.button_class2, "homogénna kompozícia, zahŕňa tumor stroma, extra-tumoural stroma a hladký sval"); ToolTip toolTip3 = new System.Windows.Forms.ToolTip(); toolTip1.SetToolTip(this.button_class3, "obsahujúce samostatné nádorové bunky a / alebo zopár imunitných buniek"); ToolTip toolTip4 = new System.Windows.Forms.ToolTip(); toolTip1.SetToolTip(this.button_class4, "vrátane konglomerátov imunitných buniek a submukóznych lymfoidných folikulov"); ToolTip toolTip5 = new System.Windows.Forms.ToolTip(); toolTip1.SetToolTip(this.button_class5, "vrátane nekrózy, krvácania a hlienu (necrosis, hemorrhage and mucus)"); ToolTip toolTip6 = new System.Windows.Forms.ToolTip(); toolTip1.SetToolTip(this.button_class6, "normal mucosal glands"); ToolTip toolTip7 = new System.Windows.Forms.ToolTip(); toolTip1.SetToolTip(this.button_class7, "tukové tkanivo"); ToolTip toolTip8 = new System.Windows.Forms.ToolTip(); toolTip1.SetToolTip(this.button_class8, "pozadie (bez tkaniva)"); pcBx_cancer.MouseDown += pcBx_cancer_MouseDown; pcBx_cancer.MouseMove += pcBx_cancer_MouseMove; pcBx_cancer.MouseUp += pcBx_cancer_MouseUp; pcBx_label.MouseDown += pcBx_cancer_MouseDown; pcBx_label.MouseMove += pcBx_cancer_MouseMove; pcBx_label.MouseUp += pcBx_cancer_MouseUp; panel_cancer.Scroll += panel_cancer_Scroll; panel_label.Scroll += panel_label_Scroll; trackBar1.Scroll += trackBar1_Scroll; pcBx_cancer.Click += pcBx_cancer_Click; pcBx_label.Click += pcBx_cancer_Click; trackBar1.Value = 1; trackBar1.Minimum = 1; trackBar1.Maximum = 100; trackBar1.SmallChange = 1; trackBar1.Visible = false; panel_cancer.Size = new Size(MIN_SIZE + 5, MIN_SIZE + 5); panel_label.Size = new Size(MIN_SIZE + 5, MIN_SIZE + 5); pcBx_cancer.Size = new Size(MIN_SIZE, MIN_SIZE); pcBx_label.Size = new Size(MIN_SIZE, MIN_SIZE); foreach (var item in ExplanationDatabase.experimentsNames) { cmbBox_experiments.Items.Add(item); } cmbBox_experiments.DisplayMember = "Name"; cmbBox_experiments.ValueMember = "Order"; cmbBox_experiments.SelectedIndex = 6; groupBox_accuracy.Enabled = false; history = new ExperimentHistory(); this.timestamp = DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss"); this.label_TODO.Text = $"Diagnostikovaných: {this.alreadyDoneOwn.ToString()} z 25 vlastných" + $" a {this.alreadyDoneSuggested.ToString()} z 25 navrhnutých oblastí "; }