51 fNucleusMaterial1 = nucleus1;
52 fCytoplasmMaterial1 = cytoplasm1;
53 fNucleusMaterial2 = nucleus2;
54 fCytoplasmMaterial2 = cytoplasm2;
55 fNucleusMaterial3 = nucleus3;
56 fCytoplasmMaterial3 = cytoplasm3;
59 G4int shiftX, shiftY, shiftZ;
61 G4double denCyto1, denCyto2, denCyto3, denNucl1, denNucl2, denNucl3;
79 fMap = fopen(
"phantom.dat",
"r");
85 ncols = fscanf(fMap,
"%i %i %i",&fPhantomTotalPixels,&fNucleusTotalPixels,&fCytoplasmTotalPixels);
87 fMaterial =
new G4double[fPhantomTotalPixels];
88 fMass =
new G4double[fPhantomTotalPixels];
89 fTissueType =
new G4int[fPhantomTotalPixels];
94 ncols = fscanf(fMap,
"%lf %lf %lf",&fDimCellBoxX,&fDimCellBoxY,&fDimCellBoxZ);
101 if (nlines == 2) ncols = fscanf(fMap,
"%i %i %i",&shiftX,&shiftY,&shiftZ);
103 if (nlines == 3) ncols = fscanf(fMap,
"%lf %lf %lf",&denCyto1, &denCyto2, &denCyto3);
105 if (nlines == 4) ncols = fscanf(fMap,
"%lf %lf %lf",&denNucl1, &denNucl2, &denNucl3);
107 if (nlines > 4) ncols = fscanf(fMap,
"%lf %lf %lf %lf %lf %lf",&x,&y,&z,&mat,&den,&tmp);
109 if (ncols < 0)
break;
116 fMapCell[nlines-5]=
v;
117 fMaterial[nlines-5]=
mat;
122 if( fMaterial[nlines-5] == 2 )
124 if( fMass[nlines-5] == 1 )
126 fTissueType[nlines-5]=2;
128 if( fMass[nlines-5] == 2 )
130 fTissueType[nlines-5]=2;
132 if( fMass[nlines-5] == 3 )
134 fTissueType[nlines-5]=2;
138 else if( fMaterial[nlines-5] == 1 )
140 if( fMass[nlines-5] == 1 )
142 fTissueType[nlines-5]=1;
144 if( fMass[nlines-5] == 2 )
146 fTissueType[nlines-5]=2;
148 if( fMass[nlines-5] == 3 )
150 fTissueType[nlines-5]=1;
161 fNucleusMass = fNucleusMass + density * fDimCellBoxX * fDimCellBoxY * fDimCellBoxZ ;
169 fCytoplasmMass = fCytoplasmMass + density * fDimCellBoxX * fDimCellBoxY * fDimCellBoxZ ;
182 fNucleusAttributes1->SetForceSolid(
false);
186 fNucleusAttributes2->SetForceSolid(
false);
190 fNucleusAttributes3->SetForceSolid(
false);
196 fCytoplasmAttributes1->SetForceSolid(
false);
200 fCytoplasmAttributes2->SetForceSolid(
false);
204 fCytoplasmAttributes3->SetForceSolid(
false);
229 fMapCell[copyNo].
x()*fDimCellBoxX,
230 fMapCell[copyNo].
y()*fDimCellBoxY,
231 fMapCell[copyNo].
z()*fDimCellBoxZ
252 if(
fMass[copyNo] == 1 )
257 if(
fMass[copyNo] == 2 )
262 if(
fMass[copyNo] == 3 )
271 if(
fMass[copyNo] == 1 )
276 if(
fMass[copyNo] == 2 )
282 if(
fMass[copyNo] == 3 )