gVirtualXRay  2.0.10
VirtualX-RayImagingLibraryonGPU
StepWedgeMesh.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (c) 2024-present, Prof Franck P. Vidal (franck.vidal@stfc.ac.uk),
4 UK Research and Innovation, All rights reserved.
5 Copyright (c) 2024-present, Mr Nalin Gupta, UK Research and Innovation,
6 All rights reserved.
7 
8 Redistribution and use in source and binary forms, with or without modification,
9 are permitted provided that the following conditions are met:
10 
11 1. Redistributions of source code must retain the above copyright notice,
12 this list of conditions and the following disclaimer.
13 
14 2. Redistributions in binary form must reproduce the above copyright notice,
15 this list of conditions and the following disclaimer in the documentation and/or
16 other materials provided with the distribution.
17 
18 3. Neither the name of the Bangor University nor the names of its contributors
19 may be used to endorse or promote products derived from this software without
20 specific prior written permission.
21 
22 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
23 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
24 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 
33 */
34 
35 
36 #ifndef __StepWedgeMesh_h
37 #define __StepWedgeMesh_h
38 
39 
68 //******************************************************************************
69 // Include
70 //******************************************************************************
71 #ifndef __gVirtualXRayConfig_h
73 #endif
74 
75 #ifndef __PolygonMesh_h
77 #endif
78 
79 #ifndef __ConstantValues_h
81 #endif
82 
83 
84 //******************************************************************************
85 // namespace
86 //******************************************************************************
87 namespace gVirtualXRay {
88 
89 
90 //==============================================================================
95 //==============================================================================
96 template<typename T> class StepWedgeMesh: public PolygonMesh
97 //------------------------------------------------------------------------------
98 {
99 //******************************************************************************
100 public:
101  //--------------------------------------------------------------------------
103  /*
104  * @param aNumberOfSteps: the number of steps in the stepwedge (default value: 10)
105  * @param aTotalLength: the length of the step wedge, i.e. its length along the X-axis (default value: 10)
106  * @param aWidth: the width of the step wedge, i.e. its length along the Y-axis (default value: 1)
107  * @param aFirstStepHeight: the height of the first step on the step wedge, i.e. its length along the Z-axis (default value: 1)
108  * @param anOtherStepHeight: the height of the rest of the steps on the step wedge, i.e. its length along the Z-axis (default value: 0.1)
109  */
110  //--------------------------------------------------------------------------
111  StepWedgeMesh(unsigned int aNumberOfSteps = 2,
112  T aTotalLength = 10.0 * cm,
113  T aWidth = 1.0 * cm,
114  T aFirstStepHeight = 1.0 * cm,
115  T anOtherStepHeight = 0.1 * cm,
116  int anIndexDataType = 0);
117 
118 
119  //--------------------------------------------------------------------------
121  /*
122  * @param aNumberOfSteps: the number of steps in the stepwedge (default value: 10)
123  * @param aTotalLength: the length of the step wedge, i.e. its length along the X-axis (default value: 10)
124  * @param aWidth: the width of the step wedge, i.e. its length along the Y-axis (default value: 1)
125  * @param aFirstStepHeight: the height of the first step on the step wedge, i.e. its length along the Z-axis (default value: 1)
126  * @param anOtherStepHeight: the height of the rest of the steps on the step wedge, i.e. its length along the Z-axis (default value: 0.1)
127  */
128  //--------------------------------------------------------------------------
129  void create(unsigned int aNumberOfSteps = 2,
130  T aTotalLength = 10.0 * cm,
131  T aWidth = 1.0 * cm,
132  T aFirstStepHeight = 1.0 * cm,
133  T anOtherStepHeight = 0.1 * cm,
134  int anIndexDataType = 0);
135 };
136 
137 
138 } // namespace gVirtualXRay
139 
140 
141 //******************************************************************************
142 #include "StepWedgeMesh.inl"
143 
144 
145 #endif // __StepWedgeMesh_h
void create(unsigned int aNumberOfSteps=2, T aTotalLength=10.0 *cm, T aWidth=1.0 *cm, T aFirstStepHeight=1.0 *cm, T anOtherStepHeight=0.1 *cm, int anIndexDataType=0)
Create a new step wedge.
Class to handle 3D meshes of step wedges.
PolygonMesh is a class to handle polygon (triangles) meshes.
Definition: PolygonMesh.h:114
const double cm
centimeter
Definition: Units.h:106
StepWedgeMesh is a class to handle 3D meshes of step wedges.
Definition: StepWedgeMesh.h:96
Constant values, such as the Z number of different atoms, etc.
Class to handle polygon (triangles) meshes.
StepWedgeMesh(unsigned int aNumberOfSteps=2, T aTotalLength=10.0 *cm, T aWidth=1.0 *cm, T aFirstStepHeight=1.0 *cm, T anOtherStepHeight=0.1 *cm, int anIndexDataType=0)
Default constructor.