gVirtualXRay  2.0.10
VirtualX-RayImagingLibraryonGPU
AttenuationCoefficient.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (c) 2017, Dr Franck P. Vidal (franck.p.vidal@fpvidal.net),
4 http://www.fpvidal.net/
5 All rights reserved.
6 
7 Redistribution and use in source and binary forms, with or without modification,
8 are permitted provided that the following conditions are met:
9 
10 1. Redistributions of source code must retain the above copyright notice,
11 this list of conditions and the following disclaimer.
12 
13 2. Redistributions in binary form must reproduce the above copyright notice,
14 this list of conditions and the following disclaimer in the documentation and/or
15 other materials provided with the distribution.
16 
17 3. Neither the name of the Bangor University nor the names of its contributors
18 may be used to endorse or promote products derived from this software without
19 specific prior written permission.
20 
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 
32 */
33 
34 
35 #ifndef __AttenuationCoefficient_h
36 #define __AttenuationCoefficient_h
37 
38 
66 //******************************************************************************
67 // Include
68 //******************************************************************************
69 #ifndef __gVirtualXRayConfig_h
71 #endif
72 
73 #include <iostream>
74 
75 #ifndef __Types_h
76 #include "gVirtualXRay/Types.h"
77 #endif
78 
79 
80 //******************************************************************************
81 // namespace
82 //******************************************************************************
83 namespace gVirtualXRay {
84 
85 
86 //******************************************************************************
87 // Class declaration
88 //******************************************************************************
89 class AttenuationCoefficient;
90 
91 
92 //******************************************************************************
93 // Function declaration
94 //******************************************************************************
95 
96 
97 //------------------------------------------------------------------------------
99 
104 //------------------------------------------------------------------------------
105 std::istream& operator>>(std::istream& is, AttenuationCoefficient& obj);
106 
107 
108 //------------------------------------------------------------------------------
110 
115 //------------------------------------------------------------------------------
116 std::ostream& operator<<(std::ostream& os, const AttenuationCoefficient& obj);
117 
118 
119 //==============================================================================
125 //==============================================================================
127 //------------------------------------------------------------------------------
128 {
129 //******************************************************************************
130 public:
131  //--------------------------------------------------------------------------
133 
138  //--------------------------------------------------------------------------
139  AttenuationCoefficient(const RATIONAL_NUMBER& anEnergy = 0,
140  const RATIONAL_NUMBER& anAttenuationCoefficient = 0);
141 
142 
143  //--------------------------------------------------------------------------
145 
148  //--------------------------------------------------------------------------
149  RATIONAL_NUMBER getEnergy() const;
150 
151 
152  //--------------------------------------------------------------------------
154 
157  //--------------------------------------------------------------------------
159 
160 
161 //******************************************************************************
162 protected:
165 
166 
169 
170 
171  //**************************************************************************
172  // Friend operators
173  //**************************************************************************
174  friend std::istream& operator>>(std::istream &is,
176 
177  friend std::ostream& operator<<(std::ostream &os,
178  const AttenuationCoefficient &obj);
179 };
180 
181 
182 } // namespace gVirtualXRay
183 
184 
185 //******************************************************************************
187 
188 
189 #endif // __AttenuationCoefficient_h
AttenuationCoefficient(const RATIONAL_NUMBER &anEnergy=0, const RATIONAL_NUMBER &anAttenuationCoefficient=0)
Default constructor.
Type declarations.
friend std::ostream & operator<<(std::ostream &os, const AttenuationCoefficient &obj)
operator<<
RATIONAL_NUMBER getAttenuationCoefficient() const
Accessor on the attenuation coefficient.
std::istream & operator>>(std::istream &anInputSream, gVirtualXRay::AtomicElement &anElement)
operator >>
RATIONAL_NUMBER getEnergy() const
Accessor on the energy.
Class to manage an attenuation coefficient.
RATIONAL_NUMBER m_mu
Attenuation coefficient corresponding to m_energy.
AttenuationCoefficient is a class to handle an attenuation coefficient.
float RATIONAL_NUMBER
Type of data used to store real numbers.
Definition: Types.h:107
friend std::istream & operator>>(std::istream &is, AttenuationCoefficient &obj)
operator>>
std::ostream & operator<<(std::ostream &anOutputSream, const gVirtualXRay::AtomicElement &anElement)
operator <<