/// <summary> /// Constructor to create the chromophore spectrum /// </summary> /// <param name="wavelengths">A list of wavelengths</param> /// <param name="spectrum">A list of spectral values</param> /// <param name="name">The name of the chromophore absorber</param> /// <param name="coeffType">The chromophore coefficient type</param> /// <param name="absUnits">The absorption coefficient units</param> /// <param name="molarUnit">The molar units</param> /// <param name="wavelengthUnit">The wavelength units</param> public ChromophoreSpectrum(List <double> wavelengths, List <double> spectrum, string name, ChromophoreCoefficientType coeffType, AbsorptionCoefficientUnit absUnits, MolarUnit molarUnit, WavelengthUnit wavelengthUnit) { ChromophoreCoefficientType = coeffType; AbsorptionCoefficientUnit = absUnits; WavelengthUnit = wavelengthUnit; MolarUnit = molarUnit; Name = name; Spectrum = spectrum; Wavelengths = wavelengths; }
private ChromophoreSpectrum CreateChromophoreSpectrum() { string name = "Melanin"; AbsorptionCoefficientUnit muaUnit = AbsorptionCoefficientUnit.InverseMillimeters; MolarUnit molarUnit = MolarUnit.None; ChromophoreCoefficientType coeffType = ChromophoreCoefficientType.FractionalAbsorptionCoefficient; // populate list of wavelengths List <double> wavelengths = new List <double>(); wavelengths.Add(0.0); wavelengths.Add(1.0); wavelengths.Add(2.0); // populate list of values List <double> values = new List <double>(); values.Add(0.1); values.Add(1.1); values.Add(2.1); return(new ChromophoreSpectrum(wavelengths, values, name, coeffType, muaUnit, molarUnit, WavelengthUnit.Nanometers)); }
private ChromophoreSpectrumDictionary CreateDictionary() { string name = "Melanin"; AbsorptionCoefficientUnit muaUnit = AbsorptionCoefficientUnit.InverseMillimeters; MolarUnit molarUnit = MolarUnit.MicroMolar; ChromophoreCoefficientType coeffType = ChromophoreCoefficientType.FractionalAbsorptionCoefficient; // populate list of wavelengths List <double> wavelengths = new List <double>(); wavelengths.Add(0.0); wavelengths.Add(1.0); wavelengths.Add(2.0); // populate list of values List <double> values = new List <double>(); values.Add(0.1); values.Add(1.1); values.Add(2.1); ChromophoreSpectrum chromophoreSpectrum = new ChromophoreSpectrum(wavelengths, values, name, coeffType, muaUnit, molarUnit, WavelengthUnit.Nanometers); var testDictionary = new ChromophoreSpectrumDictionary(); testDictionary.Add(chromophoreSpectrum.Name, chromophoreSpectrum); name = "HbO2"; muaUnit = AbsorptionCoefficientUnit.InverseMillimeters; molarUnit = MolarUnit.MicroMolar; coeffType = ChromophoreCoefficientType.MolarAbsorptionCoefficient; chromophoreSpectrum = new ChromophoreSpectrum(wavelengths, values, name, coeffType, muaUnit, molarUnit, WavelengthUnit.Nanometers); testDictionary.Add(chromophoreSpectrum.Name, chromophoreSpectrum); return(testDictionary); }
/// <summary> /// Creates a chromophore with a particular value. Name is used to reference the spectral database. /// </summary> /// <param name="name">Name of the chromophore</param> /// <param name="concentration">Concentration</param> /// <param name="chromophoreCoefficientType">Chromophore coefficient type defined by the Enum <see cref="Vts.ChromophoreCoefficientType">ChromophoreCoefficientType</see></param> public ChromophoreAbsorber(string name, double concentration, ChromophoreCoefficientType chromophoreCoefficientType) { Name = name; Concentration = concentration; ChromophoreCoefficientType = chromophoreCoefficientType; }
/// <summary> /// Constructor to create the chromophore spectrum starting with empty lists /// </summary> /// <param name="name">The name of the chromophore absorber</param> /// <param name="coeffType">The chromophore coefficient type</param> /// <param name="absUnits">The absorption coefficient units</param> /// <param name="molarUnit">The molar units</param> /// <param name="wavelengthUnit">The wavelength units</param> public ChromophoreSpectrum(string name, ChromophoreCoefficientType coeffType, AbsorptionCoefficientUnit absUnits, MolarUnit molarUnit, WavelengthUnit wavelengthUnit) : this(new List <double>(), new List <double>(), name, coeffType, absUnits, molarUnit, wavelengthUnit) { }