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();
        }
示例#2
0
        private void openPatientsMsgWindow(String fileNamePath)
        {
            String fileName = Path.GetFileName(fileNamePath);

            if (!validateExtention(Path.GetExtension(fileName)))
            {
                MessageBox.Show("文件格式不合格,请选择压缩包文件", "提示:");

                return;
            }
            //string folder = Path.Combine(AirPatientForm.RegistryDAO.AirwayBaseFolder, Path.GetFileNameWithoutExtension(filename).Replace(" ", ""));
            string folder = Path.Combine(AirwayPatients.BaseFolder, Path.GetFileNameWithoutExtension(fileName).Replace(" ", ""));

            if (!Directory.Exists(folder))
            {
                Directory.CreateDirectory(folder);
            }

            string filenam1e = Path.Combine(folder, "airwaypatient.xml");

            if (!File.Exists(filenam1e))
            {
                string args = string.Format("x -o\"{0}\" -y -sn \"{1}\"", folder, fileNamePath);
                var    psi  = new ProcessStartInfo(System.Windows.Forms.Application.StartupPath + @"\HaoZipC.exe", args);
                Process.Start(psi).WaitForExit();
            }

            if (!File.Exists(filenam1e))
            {
                MessageBox.Show(@"压缩文件中未找到文件 : airwaypatient.xml");
                return;
            }

            AirwayPatient patient = AirwayPatient.Load(filenam1e);

            patient.OrderID = _dataID;
            patient.Save(filenam1e);

            DirectoryInfo origDicomDirectory        = new DirectoryInfo(patient.DicomFolder);
            DirectoryInfo origLungcareDataDirectory =
                new DirectoryInfo(Path.GetDirectoryName(patient.AirwayVTP_FileName));

            string localDicomFolder           = Path.Combine(folder, origDicomDirectory.Name);
            string localLungCareDataDirectory = Path.Combine(folder, origLungcareDataDirectory.Name);

            patient.AirwayVTP_FileName         = patient.AirwayVTP_FileName.ReplaceFolder(localLungCareDataDirectory);
            patient.AirwayNetwork_VTP_FileName = patient.AirwayNetwork_VTP_FileName.ReplaceFolder(localLungCareDataDirectory);
            patient.吸气末期MhdFileName            = patient.吸气末期MhdFileName.ReplaceFolder(localLungCareDataDirectory);
            patient.SegmentedMhd_FileName      = patient.SegmentedMhd_FileName.ReplaceFolder(localLungCareDataDirectory);
            patient.LungRegion_VTP             = patient.LungRegion_VTP.ReplaceFolder(localLungCareDataDirectory);
            patient.LungRegion_MHD             = patient.LungRegion_MHD.ReplaceFolder(localLungCareDataDirectory);

            patient.DicomFolder = localDicomFolder;

            if (AirwayPatients.FindById(patient.PatientId) != null)
            {
                AirwayPatients.UpdatePatient(patient);
            }
            else
            {
                AirwayPatients patients = AirwayPatients.TestLoad();
                patients.Insert(0, patient);
                AirwayPatients.TestSave(patients);
            }

            vtkImageData _rawCTMetaImage = patient.吸气末期MhdFileName.ReadMetaImage();

            MainWindowMA CTRefineMainForm = new MainWindowMA(patient,
                                                             LungCare.SupportPlatform.Entities.OrientationEnum.Axial,
                                                             _rawCTMetaImage, patient.SegmentedMhd_FileName);

            CTRefineMainForm.ShowDialog();
        }