|
GGEMS
1.1
GPU GEant4-based Monte Carlo Simulations
|
Go to the documentation of this file.
41 GGcout(
"GGEMSSystem",
"GGEMSSystem", 3) <<
"GGEMSSystem creating..." <<
GGendl;
56 GGcout(
"GGEMSSystem",
"GGEMSSystem", 3) <<
"GGEMSSystem created!!!" <<
GGendl;
65 GGcout(
"GGEMSSystem",
"~GGEMSSystem", 3) <<
"GGEMSSystem erasing..." <<
GGendl;
67 GGcout(
"GGEMSSystem",
"~GGEMSSystem", 3) <<
"GGEMSSystem erased!!!" <<
GGendl;
126 GGcout(
"GGEMSSystem",
"CheckParameters", 3) <<
"Checking the mandatory parameters..." <<
GGendl;
129 std::ostringstream oss(std::ostringstream::out);
130 oss <<
"In system parameters, number of module in x and y axis (local axis) has to be > 0!!!";
135 std::ostringstream oss(std::ostringstream::out);
136 oss <<
"In system parameters, number of detection elements in x, y and z axis (local axis) has to be > 0!!!";
141 std::ostringstream oss(std::ostringstream::out);
142 oss <<
"In system parameters, size of detection elements (local axis) has to be > 0.0 mm!!!";
147 std::ostringstream oss(std::ostringstream::out);
148 oss <<
"In system parameters, a material has to be defined!!!";
161 GGcout(
"GGEMSSystem",
"SaveResults", 2) <<
"Saving results in MHD format..." <<
GGendl;
170 std::memset(output, 0, total_dim.
x_*total_dim.
y_*total_dim.
z_*
sizeof(
GGint));
202 std::memset(output, 0, total_dim.
x_*total_dim.
y_*total_dim.
z_*
sizeof(
GGint));
212 if (found_mhd == std::string::npos) {
213 scatter_output_filename +=
"-scatter.mhd";
216 scatter_output_filename = scatter_output_filename.substr(0, found_mhd) +
"-scatter.mhd";
I/O class handling MHD file.
Structure storing 3 GGsize values.
void SetNumberOfModules(GGsize const &n_module_x, GGsize const &n_module_y)
set the number of module in X, Y of local axis of detector
void SetDataType(std::string const &data_type)
set the type of data
void StoreScatter(bool const &is_scatter)
set to true to activate scatter registration
GGsize3 number_of_detection_elements_inside_module_xyz_
void SetElementSizes(GGfloat3 const &element_sizes)
set the size of the elements
std::string output_basename_
virtual void CheckParameters(void) const
void ReleaseDeviceBuffer(cl::Buffer *const device_ptr, T *host_ptr, GGsize const &thread_index)
Get the device pointer on host to write on it. Mandatory after a GetDeviceBufferWrite ou GetDeviceBuf...
cl::Buffer * GetScatterHistogram(GGsize const &thread_index) const
return the point on scatter histogram
void SetNumberOfDetectionElementsInsideModule(GGsize const &n_detection_element_x, GGsize const &n_detection_element_y, GGsize const &n_detection_element_z)
set the number of detection elements in X and Y and Z
virtual void CheckParameters(void) const
void Write(cl::Buffer *image, GGsize const &thread_index) const
Write mhd header/raw file.
void SetOutputFileName(std::string const &basename)
set the output filename (*.mhd)
GGsize number_activated_devices_
GGEMSSystem(std::string const &system_name)
GGEMSSystem constructor.
GGsize GetNumberOfMaterials(void) const
Get the number of materials in the phantom.
GGEMS class for solid. This class store geometry about phantom or detector.
Parent GGEMS class for navigator.
cl::Buffer * GetHistogram(GGsize const &thread_index) const
return the point on histogram
GGEMSMaterials * materials_
void SetMaterialName(std::string const &material_name)
set the name of the material
void SetDimensions(GGsize3 const &dimensions)
set the dimensions of the image
void SetSizeOfDetectionElements(GGfloat const &size_of_detection_element_x, GGfloat const &size_of_detection_element_y, GGfloat const &size_of_detection_element_z, std::string const &unit="mm")
set the detection elements in each direction
T * GetDeviceBuffer(cl::Buffer *device_ptr, GGsize const &size, GGsize const &thread_index)
Get the device pointer on host to write on it. ReleaseDeviceBuffer must be used after this method!...
#define GGendl
overload C++ std::endl
Singleton class storing all informations about OpenCL and managing GPU/CPU devices,...
void SaveResults(void)
save all results from solid
GGfloat3 size_of_detection_elements_xyz_
virtual ~GGEMSSystem(void)
GGEMSSystem destructor.
Child GGEMS class managing detector system in GGEMS.
void AddMaterial(std::string const &material_name)
Add a material associated to a phantom.
I/O class handling MHD image file.
void ThrowException(std::string const &class_name, std::string const &method_name, std::string const &message)
Throw a C++ exception.
GGsize2 number_of_modules_xy_
T DistanceUnit(T const &value, std::string const &unit)
Choose best distance unit.
static GGEMSOpenCLManager & GetInstance(void)
Create at first time the Singleton.