public SnapshotWindow(AirwayPatient SelectedPatient, int index, LesionEntity lesion) { InitializeComponent(); _lesionEntity = lesion; Position = lesion.position; _SelectedPatient = SelectedPatient; _segmentDirectory = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(_SelectedPatient.AirwayVTP_FileName), "Snapshot", lesion.Index.ToString()); if (!Directory.Exists(_segmentDirectory)) { Directory.CreateDirectory(_segmentDirectory); } axialAll.MouseButtonClick += axialAll_MouseButtonClick; axialPart.MouseButtonClick += axialPart_MouseButtonClick; axial3D.MouseButtonClick += axial3D_MouseButtonClick; coronalAll.MouseButtonClick += coronalAll_MouseButtonClick; coronalPart.MouseButtonClick += coronalPart_MouseButtonClick; coronal3D.MouseButtonClick += coronal3D_MouseButtonClick; sagitalAll.MouseButtonClick += sagitalAll_MouseButtonClick; sagitalPart.MouseButtonClick += sagitalPart_MouseButtonClick; sagital3D.MouseButtonClick += sagital3D_MouseButtonClick; LoadLesionSnapshot(); }
public SnapshotWindow(AirwayPatient SelectedPatient) { InitializeComponent(); _SelectedPatient = SelectedPatient; _segmentDirectory = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(_SelectedPatient.AirwayVTP_FileName), "Snapshot"); if (!Directory.Exists(_segmentDirectory)) { Directory.CreateDirectory(_segmentDirectory); } axialAll.MouseButtonClick += axialAll_MouseButtonClick; axialPart.MouseButtonClick += axialPart_MouseButtonClick; axial3D.MouseButtonClick += axial3D_MouseButtonClick; coronalAll.MouseButtonClick += coronalAll_MouseButtonClick; coronalPart.MouseButtonClick += coronalPart_MouseButtonClick; coronal3D.MouseButtonClick += coronal3D_MouseButtonClick; sagitalAll.MouseButtonClick += sagitalAll_MouseButtonClick; sagitalPart.MouseButtonClick += sagitalPart_MouseButtonClick; sagital3D.MouseButtonClick += sagital3D_MouseButtonClick; _lesionEntity = new LesionEntity(); }
public LesionButtonUserControl(int index, LesionEntity lesion) { InitializeComponent(); _index = index; _lesion = lesion; _position = lesion.position; btn.Content = _index; }
//private void AddNewLesion(double[] position) //{ // LesionButtonUserControl lesion1 = new LesionButtonUserControl(_maxIndex + 1 , position); // lesion1.AirwayPatient = AirwayPatient; // lesion1.StartSnapshotEvent += lesion1_StartSnapshotEvent; // bb.Children.Add(lesion1); // ++_maxIndex; //} private void AddNewLesion(LesionEntity lesion) { LesionButtonUserControl lesion1 = new LesionButtonUserControl(_maxIndex + 1, lesion); lesion1.AirwayPatient = AirwayPatient; lesion1.StartSnapshotEvent += lesion1_StartSnapshotEvent; bb.Children.Add(lesion1); ++_maxIndex; }
void btnAddLesion_Click(object sender, EventArgs e) { MainWindowMA main = this.Owner as MainWindowMA; LesionEntity lesion = new LesionEntity(); lesion.position = main._position; lesion.Index = _maxIndex + 1; AddNewLesion(lesion); //throw new NotImplementedException(); }
public void AddOneLesionSlice(LesionEntity lesionEntity) { ++lesionNumber; //添加Axial方向的截图到PPT _Slide lesionAxialSlide = powerPointDAO.AddNewSlide(); powerPointDAO.AddText("病灶 " + lesionNumber.ToString(), lesionAxialSlide, 30, 30, 300, 40); powerPointDAO.AddText("轴状位", lesionAxialSlide, 530, 30, 300, 40); if (!string.IsNullOrEmpty(lesionEntity.AxialCTImageFile)) { powerPointDAO.AddImage(lesionEntity.AxialCTImageFile, lesionAxialSlide, 30, 80, lesionSize, lesionSize); } if (!string.IsNullOrEmpty(lesionEntity.AxialCTDetailImageFile)) { powerPointDAO.AddImage(lesionEntity.AxialCTDetailImageFile, lesionAxialSlide, 260, 80, lesionSize, lesionSize); } if (!string.IsNullOrEmpty(lesionEntity.Axial3DImageFile)) { powerPointDAO.AddImage(lesionEntity.Axial3DImageFile, lesionAxialSlide, 490, 80, lesionSize, lesionSize); } //添加Sagital方向的截图到PPT _Slide lesionSagitalSlide = powerPointDAO.AddNewSlide(); powerPointDAO.AddText("矢状位", lesionSagitalSlide, 530, 30, 300, 40); if (!string.IsNullOrEmpty(lesionEntity.SagitalCTImageFile)) { powerPointDAO.AddImage(lesionEntity.SagitalCTImageFile, lesionSagitalSlide, 30, 80, lesionSize, lesionSize); } if (!string.IsNullOrEmpty(lesionEntity.SagitalCTDetailImageFile)) { powerPointDAO.AddImage(lesionEntity.SagitalCTDetailImageFile, lesionSagitalSlide, 260, 80, lesionSize, lesionSize); } if (!string.IsNullOrEmpty(lesionEntity.Sagital3DImageFile)) { powerPointDAO.AddImage(lesionEntity.Sagital3DImageFile, lesionSagitalSlide, 490, 80, lesionSize, lesionSize); } //添加Coronal方向的截图到PPT _Slide lesionCoronalSlide = powerPointDAO.AddNewSlide(); powerPointDAO.AddText("冠状位", lesionCoronalSlide, 530, 30, 300, 40); if (!string.IsNullOrEmpty(lesionEntity.CoronalCTImageFile)) { powerPointDAO.AddImage(lesionEntity.CoronalCTImageFile, lesionCoronalSlide, 30, 80, lesionSize, lesionSize); } if (!string.IsNullOrEmpty(lesionEntity.CoronalCTDetailImageFile)) { powerPointDAO.AddImage(lesionEntity.CoronalCTDetailImageFile, lesionCoronalSlide, 260, 80, lesionSize, lesionSize); } if (!string.IsNullOrEmpty(lesionEntity.Coronal3DImageFile)) { powerPointDAO.AddImage(lesionEntity.Coronal3DImageFile, lesionCoronalSlide, 490, 80, lesionSize, lesionSize); } }