GGEMS
1.1
GPU GEant4-based Monte Carlo Simulations
|
Singleton class handling convertion from analytical volume to voxelized volume. More...
#include "GGEMSVolumeCreatorManager.hh"
Public Member Functions | |
GGEMSVolumeCreatorManager (GGEMSVolumeCreatorManager const &volume_creator_manager)=delete | |
Avoid copy of the singleton by reference. More... | |
GGEMSVolumeCreatorManager & | operator= (GGEMSVolumeCreatorManager const &volume_creator_manager)=delete |
Avoid assignement of the singleton by reference. More... | |
GGEMSVolumeCreatorManager (GGEMSVolumeCreatorManager const &&volume_creator_manager)=delete | |
Avoid copy of the singleton by rvalue reference. More... | |
GGEMSVolumeCreatorManager & | operator= (GGEMSVolumeCreatorManager const &&volume_creator_manager)=delete |
Avoid copy of the singleton by rvalue reference. More... | |
void | SetElementSizes (GGfloat const &voxel_width, GGfloat const &voxel_height, GGfloat const &voxel_depth, std::string const &unit="mm") |
Set the size of the elements for the voxelized volume. More... | |
GGfloat3 | GetElementsSizes () const |
size of voxels in the voxelized volume More... | |
void | SetVolumeDimensions (GGsize const &volume_width, GGsize const &volume_height, GGsize const &volume_depth) |
Set the dimension of the volume for the voxelized volume. More... | |
GGsize3 | GetVolumeDimensions () const |
dimensions of volume More... | |
void | SetMaterial (std::string const &material="Air") |
set the material, Air by default More... | |
GGsize | GetNumberElements (void) const |
Return the total number of voxels. More... | |
std::string | GetDataType (void) const |
get the type of data More... | |
cl::Buffer * | GetVoxelizedVolume (void) const |
Return the voxelized volume on OpenCL device. More... | |
void | SetOutputImageFilename (std::string const &output_image_filename) |
Set the filename of MHD output. More... | |
void | SetRangeToMaterialDataFilename (std::string const &output_range_to_material_filename) |
Set the filename of range to material data. More... | |
void | AddLabelAndMaterial (GGfloat const &label, std::string const &material) |
add the label and the material More... | |
void | SetDataType (std::string const &data_type="MET_FLOAT") |
set the type of data More... | |
void | Initialize (void) |
Initialize the volume Creator manager. More... | |
void | Write (void) |
Save the voxelized volume to raw data in mhd file. More... | |
void | Clean (void) |
clean OpenCL data More... | |
Static Public Member Functions | |
static GGEMSVolumeCreatorManager & | GetInstance (void) |
Create at first time the Singleton. More... | |
Private Member Functions | |
GGEMSVolumeCreatorManager (void) | |
Unable the constructor for the user. More... | |
~GGEMSVolumeCreatorManager (void) | |
Unable the destructor for the user. More... | |
void | CheckParameters (void) const |
Check the mandatory parameters. More... | |
void | WriteMHDImage (void) const |
Write output MHD file. More... | |
void | WriteRangeToMaterialFile (void) |
Write the file with range to material data. More... | |
template<typename T > | |
void | AllocateImage (void) |
allocating buffer storing volume More... | |
Private Attributes | |
GGfloat3 | element_sizes_ |
GGsize3 | volume_dimensions_ |
GGsize | number_elements_ |
std::string | data_type_ |
std::string | output_image_filename_ |
std::string | output_range_to_material_filename_ |
cl::Buffer * | voxelized_volume_ |
LabelToMaterialMap | label_to_material_ |
Singleton class handling convertion from analytical volume to voxelized volume.
Definition at line 48 of file GGEMSVolumeCreatorManager.hh.
|
private |
Unable the constructor for the user.
Definition at line 39 of file GGEMSVolumeCreatorManager.cc.
|
private |
Unable the destructor for the user.
Definition at line 63 of file GGEMSVolumeCreatorManager.cc.
|
delete |
Avoid copy of the singleton by reference.
volume_creator_manager | - reference on the singleton |
|
delete |
Avoid copy of the singleton by rvalue reference.
volume_creator_manager | - rvalue reference on the singleton |
void GGEMSVolumeCreatorManager::AddLabelAndMaterial | ( | GGfloat const & | label, |
std::string const & | material | ||
) |
add the label and the material
label | - label of material |
material | - material of the volume |
Definition at line 148 of file GGEMSVolumeCreatorManager.cc.
|
private |
allocating buffer storing volume
T | - type of data |
Definition at line 253 of file GGEMSVolumeCreatorManager.hh.
|
private |
Check the mandatory parameters.
Definition at line 183 of file GGEMSVolumeCreatorManager.cc.
void GGEMSVolumeCreatorManager::Clean | ( | void | ) |
clean OpenCL data
Definition at line 74 of file GGEMSVolumeCreatorManager.cc.
|
inline |
get the type of data
Definition at line 154 of file GGEMSVolumeCreatorManager.hh.
|
inline |
size of voxels in the voxelized volume
Definition at line 116 of file GGEMSVolumeCreatorManager.hh.
|
inlinestatic |
Create at first time the Singleton.
Definition at line 67 of file GGEMSVolumeCreatorManager.hh.
|
inline |
Return the total number of voxels.
Definition at line 147 of file GGEMSVolumeCreatorManager.hh.
|
inline |
dimensions of volume
index | - index of dimension x, y or z |
Definition at line 133 of file GGEMSVolumeCreatorManager.hh.
|
inline |
Return the voxelized volume on OpenCL device.
Definition at line 161 of file GGEMSVolumeCreatorManager.hh.
void GGEMSVolumeCreatorManager::Initialize | ( | void | ) |
Initialize the volume Creator manager.
Definition at line 212 of file GGEMSVolumeCreatorManager.cc.
|
delete |
Avoid copy of the singleton by rvalue reference.
volume_creator_manager | - rvalue reference on the singleton |
|
delete |
Avoid assignement of the singleton by reference.
volume_creator_manager | - reference on the singleton |
void GGEMSVolumeCreatorManager::SetDataType | ( | std::string const & | data_type = "MET_FLOAT" | ) |
set the type of data
data_type | - type of data |
Definition at line 125 of file GGEMSVolumeCreatorManager.cc.
void GGEMSVolumeCreatorManager::SetElementSizes | ( | GGfloat const & | voxel_width, |
GGfloat const & | voxel_height, | ||
GGfloat const & | voxel_depth, | ||
std::string const & | unit = "mm" |
||
) |
Set the size of the elements for the voxelized volume.
voxel_width | - voxel width |
voxel_height | - voxel height |
voxel_depth | - voxel depth |
unit | - unit of the distance |
Definition at line 92 of file GGEMSVolumeCreatorManager.cc.
void GGEMSVolumeCreatorManager::SetMaterial | ( | std::string const & | material = "Air" | ) |
set the material, Air by default
material | - name of the material |
Definition at line 136 of file GGEMSVolumeCreatorManager.hh.
void GGEMSVolumeCreatorManager::SetOutputImageFilename | ( | std::string const & | output_image_filename | ) |
Set the filename of MHD output.
output_image_filename | - output image filename |
Definition at line 165 of file GGEMSVolumeCreatorManager.cc.
void GGEMSVolumeCreatorManager::SetRangeToMaterialDataFilename | ( | std::string const & | output_range_to_material_filename | ) |
Set the filename of range to material data.
output_range_to_material_filename | - output range to material filename |
Definition at line 174 of file GGEMSVolumeCreatorManager.cc.
void GGEMSVolumeCreatorManager::SetVolumeDimensions | ( | GGsize const & | volume_width, |
GGsize const & | volume_height, | ||
GGsize const & | volume_depth | ||
) |
Set the dimension of the volume for the voxelized volume.
volume_width | - volume width |
volume_height | - volume height |
volume_depth | - volume depth |
Definition at line 103 of file GGEMSVolumeCreatorManager.cc.
void GGEMSVolumeCreatorManager::Write | ( | void | ) |
Save the voxelized volume to raw data in mhd file.
Definition at line 232 of file GGEMSVolumeCreatorManager.cc.
|
private |
Write output MHD file.
Definition at line 266 of file GGEMSVolumeCreatorManager.cc.
|
private |
Write the file with range to material data.
Definition at line 245 of file GGEMSVolumeCreatorManager.cc.
|
private |
Type of data
Definition at line 241 of file GGEMSVolumeCreatorManager.hh.
|
private |
Size of voxels of voxelized volume
Definition at line 238 of file GGEMSVolumeCreatorManager.hh.
|
private |
Map of label to material
Definition at line 245 of file GGEMSVolumeCreatorManager.hh.
|
private |
Total number of elements
Definition at line 240 of file GGEMSVolumeCreatorManager.hh.
|
private |
Output MHD where is stored the voxelized volume
Definition at line 242 of file GGEMSVolumeCreatorManager.hh.
|
private |
Output text file with range to material data
Definition at line 243 of file GGEMSVolumeCreatorManager.hh.
|
private |
Dimension of volume X, Y, Z
Definition at line 239 of file GGEMSVolumeCreatorManager.hh.
|
private |
Voxelized volume on OpenCL device
Definition at line 244 of file GGEMSVolumeCreatorManager.hh.