38 G4int PhantomConfiguration::fPhantomTotalPixels = 0;
39 G4int PhantomConfiguration::fNucleusTotalPixels = 0;
40 G4int PhantomConfiguration::fCytoplasmTotalPixels = 0;
41 G4float PhantomConfiguration::fDx = 0;
42 G4float PhantomConfiguration::fDy = 0;
43 G4float PhantomConfiguration::fDz = 0;
44 G4float PhantomConfiguration::fNucleusMass = 0;
45 G4float PhantomConfiguration::fCytoplasmMass = 0;
56 delete[] fVoxelThreeVector;
65 G4float denCyto1, denCyto2, denCyto3, denNucl1, denNucl2, denNucl3;
71 fPhantomTotalPixels=0;
72 fNucleusTotalPixels=0;
73 fCytoplasmTotalPixels=0;
81 fMap = fopen(
"phantom.dat",
"r");
83 fscanf(fMap,
"%i %i %i",&fPhantomTotalPixels, &fNucleusTotalPixels, &fCytoplasmTotalPixels);
84 fscanf(fMap,
"%f %f %f",&fDx, &fDy, &fDz);
85 fscanf(fMap,
"%f %f %f",&tmp, &tmp, &tmp);
86 fscanf(fMap,
"%f %f %f",&denCyto1, &denCyto2, &denCyto3);
87 fscanf(fMap,
"%f %f %f",&denNucl1, &denNucl2, &denNucl3);
94 for (
G4int i=0; i<fPhantomTotalPixels; i++)
96 fscanf(fMap,
"%f %f %f %i %i %f",&vx, &vy, &vz, &mat, &den, &tmp);
98 if (std::abs(mat-2)<1.e-30)
100 if (std::abs(den-1)<1.e-30) density = denNucl1*(
g/
cm3);
101 if (std::abs(den-2)<1.e-30) density = denNucl2*(
g/
cm3);
102 if (std::abs(den-3)<1.e-30) density = denNucl3*(
g/
cm3);
103 fNucleusMass = fNucleusMass + density * fDx * fDy * fDz ;
106 if (std::abs(mat-1)<1.e-30)
108 if (std::abs(den-1)<1e-30) density = denCyto1*(
g/
cm3);
109 if (std::abs(den-2)<1e-30) density = denCyto2*(
g/
cm3);
110 if (std::abs(den-3)<1e-30) density = denCyto3*(
g/
cm3);
111 fCytoplasmMass = fCytoplasmMass + density * fDx * fDy * fDz ;
115 fVoxelThreeVector[i] =
v;