Beispiel #1
0
        private void SaveToDatabase(DicomDataset dataset, string filePath)
        {
            Patient patient = Patient.FromDataset(dataset);

            IDBHelper dbHelper = DBHelperFacotry.GetDBHelper();

            dbHelper.AddOrUpdatePatient(ref patient);

            Study study = Study.FromDataset(dataset);

            study.Patient = patient;

            Series series = Series.FromDataset(dataset);

            series.Study = study;

            Image image = Image.FromDataset(dataset);

            image.FilePath = filePath;
            image.Series   = series;

            //add to database
            dbHelper.AddImage(ref image);
        }