public void GetOutputImages() { SuperTomograph tomograph = IoC.Container.GetInstance <SuperTomograph>(); TomographConfiguration configuration = new TomographConfiguration { InputImagePath = _samplePath, Alpha = (float)Math.PI / 360, Phi = (float)Math.PI / 1.07f, DetectorsCount = 360, Filter = true, OutputImagesCount = 10 }; tomograph.Configuration = configuration; var images = tomograph.OutputImages.ToList(); Assert.IsNotEmpty(images); for (int i = 0; i < images.Count; i++) { images[i].Save(_projectDirectory + @"outputImages\" + $"output{i+1}.bmp"); } }
public void GetDicom() { SuperTomograph tomograph = IoC.Container.GetInstance <SuperTomograph>(); DicomInformation dicomInformation = new DicomInformation() { PatientName = "Jan Kowalski", PatientAddress = "Poznan, Akacjowa 13", PatientBirthDate = new DateTime(1987, 12, 12), PatientSex = "M", PatientAge = "30", PatientWeight = "80", StudyDate = DateTime.Now, StudyDescription = "Jakis tam opis" }; tomograph.DicomInformation = dicomInformation; var imageLoader = new EmguCVImageLoader(); var outputImages = new List <Image <Gray, byte> >(); var outputImage = imageLoader.LoadImage(_projectDirectory + "dicomTest.bmp"); outputImages.Add(outputImage); tomograph.OutputImages = outputImages; var dicom = tomograph.Dicom; Assert.IsNotNull(dicom); dicom.Save(_projectDirectory + "dicom.dcm"); }
public void LoadImage() { SuperTomograph tomograph = IoC.Container.GetInstance <SuperTomograph>(); tomograph.Configuration.InputImagePath = _samplePath; Image <Gray, byte> image = tomograph.InputImage; Assert.IsNotNull(image); }
public void GetSinogram() { SuperTomograph tomograph = IoC.Container.GetInstance <SuperTomograph>(); TomographConfiguration configuration = new TomographConfiguration { InputImagePath = _samplePath, Alpha = (float)Math.PI / 360, Phi = (float)Math.PI / 1.07f, DetectorsCount = 360 }; tomograph.Configuration = configuration; Image <Gray, byte> image = tomograph.Sinogram; Assert.IsNotNull(image); image.Save(_projectDirectory + "sinogram.bmp"); }