80 inline std::ostream&
operator<<(std::ostream& anOuputStream,
83 anOuputStream <<
"m_use_HU: " << anInstance.
m_use_HU << std::endl;
84 anOuputStream <<
"m_use_element: " << anInstance.
m_use_element << std::endl;
85 anOuputStream <<
"m_use_mixture: " << anInstance.
m_use_mixture << std::endl;
86 anOuputStream <<
"m_use_element: " << anInstance.
m_use_element << std::endl;
90 anOuputStream <<
"m_HU: " << anInstance.
m_HU << std::endl;
91 anOuputStream <<
"m_Z_number: " << anInstance.
m_Z_number << std::endl;
94 anOuputStream <<
"m_mixture: " << anInstance.
m_mixture << std::endl;
95 anOuputStream <<
"m_density: " << anInstance.
getDensity() << std::endl;
96 anOuputStream <<
"m_label: " << anInstance.
m_label << std::endl;
106 m_use_element(false),
107 m_use_mixture(false),
108 m_use_mass_attenuation_coefficient(false),
109 m_use_linear_attenuation_coefficient(false),
112 m_mass_attenuation_coefficient(0.0),
113 m_linear_attenuation_coefficient(0.0),
124 m_use_mixture(false),
125 m_use_mass_attenuation_coefficient(false),
126 m_use_linear_attenuation_coefficient(false),
129 m_mass_attenuation_coefficient(0.0),
130 m_linear_attenuation_coefficient(0.0),
132 m_label(
std::string(
"Element: ") +
ElementSet::getInstance().getElement(Z).getName())
142 m_use_element(false),
144 m_use_mass_attenuation_coefficient(false),
145 m_use_linear_attenuation_coefficient(false),
148 m_mass_attenuation_coefficient(0.0),
149 m_linear_attenuation_coefficient(0.0),
150 m_mixture(aWeightSet),
152 m_label(
std::string(
"Mixture: ") + m_mixture.getLabel())
162 m_use_element(false),
164 m_use_mass_attenuation_coefficient(false),
165 m_use_linear_attenuation_coefficient(false),
168 m_mass_attenuation_coefficient(0.0),
169 m_linear_attenuation_coefficient(0.0),
170 m_mixture(aWeightSet),
172 m_label(
std::string(
"Mixture: ") + m_mixture.getLabel())
182 m_use_element(false),
184 m_use_mass_attenuation_coefficient(false),
185 m_use_linear_attenuation_coefficient(false),
188 m_mass_attenuation_coefficient(0.0),
189 m_linear_attenuation_coefficient(0.0),
192 m_label(
std::string(
"Mixture: ") + m_mixture.getLabel())
290 m_label += std::to_string(aCoefficient);
299 double inv_cm = 1.0 /
cm;
306 m_label += std::to_string(aCoefficient / inv_cm);
379 return (getLinearAttenuationCoefficient(anEnergy));
395 return (!((*
this) == aTestData));
403 std::string composition;
404 std::string prefix(
"Compound: ");
405 size_t prefix_length(prefix.length());
407 std::cout <<
m_label.length() <<
"\t" << prefix_length << std::endl;
408 if (
m_label.length() < prefix_length)
410 std::cout <<
m_label.substr(0, prefix_length) <<
" == " << prefix <<
" ? " << int(
m_label.substr(0, prefix_length) == prefix) << std::endl;
411 if (
m_label.substr(0, prefix_length) == prefix)
413 composition =
m_label.substr(prefix_length,
m_label.length() - prefix_length);
414 std::cout << composition << std::endl;
418 throw "NOT WORKING YET";
427 std::vector<int> return_value;
433 return_value.push_back(ite.first);
445 std::vector<double> return_value;
451 return_value.push_back(ite.second);
std::vector< int > getMixtureElementSet() const
Accessor on the element Z number set of the mixture of the polygon mesh.
bool useHounsfieldValue() const
bool useLinearAttenuationCoefficient() const
unsigned short m_Z_number
ElementSet is a class to manage a table of elements in material.
std::string getCompound() const
Accessor on the compound description of the polygon mesh.
double m_linear_attenuation_coefficient
bool m_use_linear_attenuation_coefficient
const std::string & getLabel() const
bool operator!=(const PhotonCrossSection &aTestData) const
PhotonCrossSection is a class to manage photon cross sections of elements, compounds and mixtures...
const double cm
centimeter
std::ostream & operator<<(std::ostream &anOutputSream, const gVirtualXRay::AtomicElement &anElement)
operator <<
void setMixture(const std::map< int, double > &aWeightSet)
std::vector< double > getMixtureWeightSet() const
Accessor on the element weight set of the mixture of the polygon mesh.
const std::string & getLabel() const
bool useMassAttenuationCoefficient() const
Mixture is a class to manage a mixture (e.g. Ti90Al6V4).
double getDensity() const
bool useHounsfieldUnit() const
const std::map< int, double > & getWeightSet() const
bool m_use_mass_attenuation_coefficient
double getMu(double anEnergy) const
double m_mass_attenuation_coefficient
void setDensity(double aDensity)