Exemplo n.º 1
0
        public void ObtainScatteringCoefficientsTest()
        {
            const uint testWavelength1 = 660;
            const uint testWavelength2 = 940;

            var validReturnData1 = new ScatteringCoefficients()
            {
                MuSkin   = 31.004324624854842,
                MuBone   = 18.771740745896697,
                MuMuscle = 8.643699764668847
            };

            var validReturnData2 = new ScatteringCoefficients
            {
                MuSkin   = 18.757697501740985,
                MuBone   = 14.572647582340004,
                MuMuscle = 5.139623591212953
            };

            var coefficients = Coefficients.ObtainScatteringCoefficients(testWavelength1);

            Assert.Equal(validReturnData1.MuSkin, coefficients.MuSkin);
            Assert.Equal(validReturnData1.MuBone, coefficients.MuBone);
            Assert.Equal(validReturnData1.MuMuscle, coefficients.MuMuscle);

            coefficients = Coefficients.ObtainScatteringCoefficients(testWavelength2);

            Assert.Equal(validReturnData2.MuSkin, coefficients.MuSkin);
            Assert.Equal(validReturnData2.MuBone, coefficients.MuBone);
            Assert.Equal(validReturnData2.MuMuscle, coefficients.MuMuscle);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var absorption             = Coefficients.ObtainAbsorptionCoefficients(660);
            var scatteringCoefficients = Coefficients.ObtainScatteringCoefficients(660);

            var data400 = Scatter.Scatterlight(450, 0.1, 0.3, 0.05, 0.05, 1, 3, 0.150, 0.9);
            var data660 = Scatter.Scatterlight(660, 0.1, 0.3, 0.05, 0.05, 1, 3, 0.150, 0.9);
            var data900 = Scatter.Scatterlight(900, 0.1, 0.3, 0.05, 0.05, 1, 3, 0.150, 0.9);

            var datas = new List <ScatterData>
            {
                data400,
                data660,
                data900
            };
            var wavelengths = new List <int> {
                450, 660, 900
            };

            CalculateRatio(datas, wavelengths);
        }