41 volume_header_filename_(volume_header_filename),
42 range_filename_(range_filename)
44 GGcout(
"GGEMSVoxelizedSolid",
"GGEMSVoxelizedSolid", 3) <<
"GGEMSVoxelizedSolid creating..." <<
GGendl;
65 if (!data_reg_type.empty()) {
66 if (data_reg_type ==
"DOSIMETRY") {
70 std::ostringstream oss(std::ostringstream::out);
71 oss <<
"False registration type name!!!" << std::endl;
72 oss <<
"Registration type is :" << std::endl;
73 oss <<
" - DOSIMETRY" << std::endl;
80 GGcout(
"GGEMSVoxelizedSolid",
"GGEMSVoxelizedSolid", 3) <<
"GGEMSVoxelizedSolid created!!!" <<
GGendl;
89 GGcout(
"GGEMSVoxelizedSolid",
"GGEMSVoxelizedSolid", 3) <<
"GGEMSVoxelizedSolid erasing..." <<
GGendl;
91 GGcout(
"GGEMSVoxelizedSolid",
"GGEMSVoxelizedSolid", 3) <<
"GGEMSVoxelizedSolid erased!!!" <<
GGendl;
100 GGcout(
"GGEMSVoxelizedSolid",
"InitializeKernel", 3) <<
"Initializing kernel for voxelized solid..." <<
GGendl;
106 std::string openCL_kernel_path = OPENCL_KERNEL_PATH;
107 std::string particle_solid_distance_filename = openCL_kernel_path +
"/ParticleSolidDistanceGGEMSVoxelizedSolid.cl";
108 std::string project_to_filename = openCL_kernel_path +
"/ProjectToGGEMSVoxelizedSolid.cl";
109 std::string track_through_filename = openCL_kernel_path +
"/TrackThroughGGEMSVoxelizedSolid.cl";
123 GGcout(
"GGEMSVoxelizedSolid",
"Initialize", 3) <<
"Initializing voxelized solid..." <<
GGendl;
143 for (
GGint i = 0; i < 4; ++i) {
208 GGcout(
"GGEMSVoxelizedSolid",
"PrintInfos", 0) <<
GGendl;
209 GGcout(
"GGEMSVoxelizedSolid",
"PrintInfos", 0) <<
"GGEMSVoxelizedSolid Infos:" <<
GGendl;
210 GGcout(
"GGEMSVoxelizedSolid",
"PrintInfos", 0) <<
"--------------------------" <<
GGendl;
211 GGcout(
"GGEMSMaterials",
"PrintInfos", 0) <<
"Material on device: " << opencl_manager.
GetDeviceName(device_index) <<
GGendl;
212 GGcout(
"GGEMSVoxelizedSolid",
"PrintInfos", 0) <<
"* Dimension: " << solid_data_device->number_of_voxels_xyz_.x <<
" " << solid_data_device->number_of_voxels_xyz_.y <<
" " << solid_data_device->number_of_voxels_xyz_.z <<
GGendl;
213 GGcout(
"GGEMSVoxelizedSolid",
"PrintInfos", 0) <<
"* Number of voxels: " << solid_data_device->number_of_voxels_ <<
GGendl;
214 GGcout(
"GGEMSVoxelizedSolid",
"PrintInfos", 0) <<
"* Size of voxels: (" << solid_data_device->voxel_sizes_xyz_.x /
mm <<
"x" << solid_data_device->voxel_sizes_xyz_.y/
mm <<
"x" << solid_data_device->voxel_sizes_xyz_.z/
mm <<
") mm3" <<
GGendl;
215 GGcout(
"GGEMSVoxelizedSolid",
"PrintInfos", 0) <<
"* Oriented bounding box (OBB) in local position:" <<
GGendl;
216 GGcout(
"GGEMSVoxelizedSolid",
"PrintInfos", 0) <<
" - X: " << solid_data_device->obb_geometry_.border_min_xyz_.x <<
" <-> " << solid_data_device->obb_geometry_.border_max_xyz_.x <<
GGendl;
217 GGcout(
"GGEMSVoxelizedSolid",
"PrintInfos", 0) <<
" - Y: " << solid_data_device->obb_geometry_.border_min_xyz_.y <<
" <-> " << solid_data_device->obb_geometry_.border_max_xyz_.y <<
GGendl;
218 GGcout(
"GGEMSVoxelizedSolid",
"PrintInfos", 0) <<
" - Z: " << solid_data_device->obb_geometry_.border_min_xyz_.z <<
" <-> " << solid_data_device->obb_geometry_.border_max_xyz_.z <<
GGendl;
219 GGcout(
"GGEMSVoxelizedSolid",
"PrintInfos", 0) <<
" - Transformation matrix:" <<
GGendl;
220 GGcout(
"GGEMSVoxelizedSolid",
"PrintInfos", 0) <<
" [" <<
GGendl;
221 GGcout(
"GGEMSVoxelizedSolid",
"PrintInfos", 0) <<
" " << solid_data_device->obb_geometry_.matrix_transformation_.m0_[0] <<
" " << solid_data_device->obb_geometry_.matrix_transformation_.m0_[1] <<
" " << solid_data_device->obb_geometry_.matrix_transformation_.m0_[2] <<
" " << solid_data_device->obb_geometry_.matrix_transformation_.m0_[3] <<
GGendl;
222 GGcout(
"GGEMSVoxelizedSolid",
"PrintInfos", 0) <<
" " << solid_data_device->obb_geometry_.matrix_transformation_.m1_[0] <<
" " << solid_data_device->obb_geometry_.matrix_transformation_.m1_[1] <<
" " << solid_data_device->obb_geometry_.matrix_transformation_.m1_[2] <<
" " << solid_data_device->obb_geometry_.matrix_transformation_.m1_[3] <<
GGendl;
223 GGcout(
"GGEMSVoxelizedSolid",
"PrintInfos", 0) <<
" " << solid_data_device->obb_geometry_.matrix_transformation_.m2_[0] <<
" " << solid_data_device->obb_geometry_.matrix_transformation_.m2_[1] <<
" " << solid_data_device->obb_geometry_.matrix_transformation_.m2_[2] <<
" " << solid_data_device->obb_geometry_.matrix_transformation_.m2_[3] <<
GGendl;
224 GGcout(
"GGEMSVoxelizedSolid",
"PrintInfos", 0) <<
" " << solid_data_device->obb_geometry_.matrix_transformation_.m3_[0] <<
" " << solid_data_device->obb_geometry_.matrix_transformation_.m3_[1] <<
" " << solid_data_device->obb_geometry_.matrix_transformation_.m3_[2] <<
" " << solid_data_device->obb_geometry_.matrix_transformation_.m3_[3] <<
GGendl;
225 GGcout(
"GGEMSVoxelizedSolid",
"PrintInfos", 0) <<
" ]" <<
GGendl;
226 GGcout(
"GGEMSVoxelizedSolid",
"PrintInfos", 0) <<
"* Solid index: " << solid_data_device->solid_id_ <<
GGendl;
227 GGcout(
"GGEMSVoxelizedSolid",
"PrintInfos", 0) <<
GGendl;
240 GGcout(
"GGEMSVoxelizedSolid",
"LoadVolumeImage", 3) <<
"Loading volume image from mhd file..." <<
GGendl;
257 if (!kDataType.compare(
"MET_CHAR")) {
260 else if (!kDataType.compare(
"MET_UCHAR")) {
261 ConvertImageToLabel<GGuchar>(raw_filename,
range_filename_, materials);
263 else if (!kDataType.compare(
"MET_SHORT")) {
264 ConvertImageToLabel<GGshort>(raw_filename,
range_filename_, materials);
266 else if (!kDataType.compare(
"MET_USHORT")) {
267 ConvertImageToLabel<GGushort>(raw_filename,
range_filename_, materials);
269 else if (!kDataType.compare(
"MET_INT")) {
272 else if (!kDataType.compare(
"MET_UINT")) {
275 else if (!kDataType.compare(
"MET_FLOAT")) {
276 ConvertImageToLabel<GGfloat>(raw_filename,
range_filename_, materials);