public static void RunAnalysis(PathSet PS, StructureSet SS, double rxlevel) { double rxdoselevel; double rtogindex; double lomaxscheib; double vantreits; PS.DoseSpace = Matrix.Normalize(PS.DoseSpace); AnalysisInfo ai = new AnalysisInfo(); RX = rxlevel; int startingz = PS.SlicePositions[0] - (PS.DoseCalculationThickness / 2); AnalyzeLesionCoverage(PS.DoseSpace,SS.fj_Tumor,startingz); ai.RxLevel = RX; ai.LesionVolume = lesionvolume; ai.Rx_Volume = totalvolcoveredbyrx; ai.RxLesion_Volume = lesioncoveragebyrx; ai.RTOG = totalvolcoveredbyrx / lesionvolume; ai.LomaxScheib = lesioncoveragebyrx / totalvolcoveredbyrx; ai.VantReits = (lesioncoveragebyrx * lesioncoveragebyrx) / (lesionvolume * totalvolcoveredbyrx); ai.TestName = System.DateTime.Now.ToShortTimeString(); AIList.Add(ai); }
private void CreatePreviewDose(PathSet PS) { foreach (RasterPath rp in PS.RasterPaths) { rp.Calculate2DDoseSpace(DK.midplane); rp.CreateSliceInfo(); } }
private void CreatePathSet() { PS = new PathSet(SS.fj_Tumor,Convert.ToInt16(txt_slicethickness.Text),Convert.ToInt16(txt_slicethickness.Text), DK, SS); AttachPSHandlers(); tabControl1.SelectedIndex = 3; slider2.Minimum = 0; slider2.Maximum = PS.NumSlices - 1; if (DK != null) PS.DK = DK; if (SS != null) PS.SS = SS; }
private void PopulateDataGrid(PathSet ps) { dataGrid1.Items.Clear(); for (int i = 0; i < ps.RasterPaths.Count; i++) { RasterPath rp = (RasterPath)ps.RasterPaths[i]; rp.info.SliceNumber = i + 1; dataGrid1.Items.Add(rp.info); } }
private void LoadDS_menu_Click_1(object sender, RoutedEventArgs e) { Microsoft.Win32.OpenFileDialog loadDS = new Microsoft.Win32.OpenFileDialog(); loadDS.Title = "Select the Dosespace text file"; loadDS.Filter = "Text files (.txt)|*.txt"; if (loadDS.ShowDialog() != false) { PS = new PathSet(loadDS.FileName); } }
private static void FindTumorVolume(PathSet PS) { //UNDONE: A menu-based option to show the volume of the current structure set. //Make sure it uses a binary matrix, then multiply it by the standard reference dose //using element-multiply, and THEN count it. This will the most realistic. }