Exemple #1
0
        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");
            }
        }
Exemple #2
0
        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");
        }