Esempio n. 1
0
        public async Task TestCalibrationsData()
        {
            string filename = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "TestCalibrationsData.h5");

            Console.WriteLine(filename);
            if (File.Exists(filename))
            {
                File.Delete(filename);
            }

            kama = new KamaAcquisitionFile(filename, AcquisitionInterface.Simulator, Logger);
            ProcedureInfo info = new ProcedureInfo
            {
                Age         = 18,
                FirstName   = "First",
                LastName    = "Last",
                ExamDate    = DateTime.Now,
                Procedure   = "test",
                ProcedureID = "ID",
                Patient     = new PatientInfo()
            };

            kama.SavePatientInfo(info);
            kama.UpdateSystemInformation("32423423", new[] { "11", "12" });
            string data = File.ReadAllText(calibrationPath);
            CalibrationsSystemInformation calib = CalibrationsSystemInformation.FromJson(data);

            kama.AddCalibrationsData(calib);
            await kama.StopProcedure();

            File.Delete(filename);
        }
 public void AddCalibrationsData(CalibrationsSystemInformation calibrationsSystemInformation)
 {
     CalibrationGroup.AddCalibrationsData(calibrationsSystemInformation);
     CalibrationGroup.FlushDataAndCloseObject();
 }