42 : fNoVoxelX(0),fNoVoxelY(0),fNoVoxelZ(0),
43 fMinX(0),fMinY(0),fMinZ(0),
44 fMaxX(0),fMaxY(0),fMaxZ(0),
45 fFilename(fname),fSliceLocation(0)
65 G4cout <<
" DicomPhantomZSliceHeader reading number of materials "
69 for(
G4int im = 0; im < nmate; im++ ){
70 fin >> mateindex >> matename;
77 G4Exception(
"DicomPhantomZSliceHeader::DicomPhantomZSliceHeader",
78 "A material is found in file that is not built in the C++ code",
89 <<
" " << fNoVoxelZ <<
G4endl;
97 G4cout <<
" Extension in X " <<
fMinX <<
" " << fMaxX << G4endl
98 <<
" Extension in Y " <<
fMinY <<
" " << fMaxY << G4endl
99 <<
" Extension in Z " <<
fMinZ <<
" " << fMaxZ <<
G4endl;
109 std::vector<G4Material*>::const_iterator matite;
110 for( matite = matTab->begin(); matite != matTab->end(); ++matite ) {
111 if( (*matite)->GetName() == mateName ) {
return true; }
136 G4cerr <<
"DicomPhantomZSliceHeader error adding two slice headers:\
137 !!! Different number of voxels: "
142 G4Exception(
"DicomPhantomZSliceHeader::DicomPhantomZSliceHeader",
148 G4cerr <<
"DicomPhantomZSliceHeader error adding two slice headers:\
149 !!! Different extensions: "
155 G4Exception(
"DicomPhantomZSliceHeader::operator+",
"",
162 G4cerr <<
"DicomPhantomZSliceHeader error adding two slice headers:\
163 !!! Different number of materials: " <<
fMaterialNames.size() <<
" =? "
164 << fMaterialNames2.size() <<
G4endl;
165 G4Exception(
"DicomPhantomZSliceHeader::operator+",
"",
170 G4cerr <<
"DicomPhantomZSliceHeader error adding two slice headers:\
171 !!! Different material number " << ii <<
" : "
173 << fMaterialNames2[ii] <<
G4endl;
174 G4Exception(
"DicomPhantomZSliceHeader::operator+",
"",
184 G4cerr <<
"DicomPhantomZSliceHeader error adding two slice headers:!!!\
185 Slices are not contiguous in Z "
189 G4Exception(
"DicomPhantomZSliceHeader::operator+",
"",
208 G4cout <<
"DicomPhantomZSliceHeader::Dumping Z Slice data to "
221 G4String descript =
"DicomPhantomZSliceHeader::DumpToFile: could not open "
236 for(
unsigned int i = 0; i <
fMateIDs.size(); ++i)
239 for(
unsigned int i = 0; i <
fValues.size(); ++i)
253 G4String descript =
"DicomPhantomZSliceHeader::DumpToFile: could not open "
266 G4String descript =
"String : " + str1 +
" supposed to be integer";
267 G4Exception(
"DicomPhantomZSliceHeader::ReadDataFromFile - error in \
268 formatting: missing material index",
"",
FatalException,descript.c_str());
270 G4int index = G4s2n<G4int>(str1);
271 if(index > nMaterials || index < 0) {
272 G4String descript =
"Index : " + str1;
273 G4Exception(
"DicomPhantomZSliceHeader::ReadDataFromFile - error:\
284 in >> tmpMinX >> tmpMaxX;
285 in >> tmpMinY >> tmpMaxY;
286 in >> tmpMinZ >> tmpMaxZ;