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)
85 G4cout <<
" DicomPhantomZSliceHeader reading number of materials "
89 for(
G4int im = 0; im < nmate; im++ ){
90 fin >> mateindex >> matename;
92 G4cout <<
" DicomPhantomZSliceHeader reading material " << im <<
" : "
93 << mateindex <<
" " << matename <<
G4endl;
97 G4Exception(
"DicomPhantomZSliceHeader::DicomPhantomZSliceHeader",
98 "A material is found in file that is not built in the C++ code",
109 <<
" " << fNoVoxelZ <<
G4endl;
117 G4cout <<
" Extension in X " <<
fMinX <<
" " << fMaxX << G4endl
118 <<
" Extension in Y " <<
fMinY <<
" " << fMaxY << G4endl
119 <<
" Extension in Z " <<
fMinZ <<
" " << fMaxZ <<
G4endl;
129 std::vector<G4Material*>::const_iterator matite;
130 for( matite = matTab->begin(); matite != matTab->end(); ++matite ) {
131 if( (*matite)->GetName() == mateName ) {
return true; }
151 G4cerr <<
"DicomPhantomZSliceHeader error adding two slice headers:\
152 !!! Different number of voxels: "
157 G4Exception(
"DicomPhantomZSliceHeader::DicomPhantomZSliceHeader",
163 G4cerr <<
"DicomPhantomZSliceHeader error adding two slice headers:\
164 !!! Different extensions: "
170 G4Exception(
"DicomPhantomZSliceHeader::operator+",
"",
177 G4cerr <<
"DicomPhantomZSliceHeader error adding two slice headers:\
178 !!! Different number of materials: " <<
fMaterialNames.size() <<
" =? "
179 << fMaterialNames2.size() <<
G4endl;
180 G4Exception(
"DicomPhantomZSliceHeader::operator+",
"",
185 G4cerr <<
"DicomPhantomZSliceHeader error adding two slice headers:\
186 !!! Different material number " << ii <<
" : "
188 << fMaterialNames2[ii] <<
G4endl;
189 G4Exception(
"DicomPhantomZSliceHeader::operator+",
"",
199 G4cerr <<
"DicomPhantomZSliceHeader error adding two slice headers: !!!\
200 Slices are not contiguous in Z "
204 G4Exception(
"DicomPhantomZSliceHeader::operator+",
"",
223 G4cout <<
"DicomPhantomZSliceHeader::Dumping Z Slice data to "
236 G4String descript =
"DicomPhantomZSliceHeader::DumpToFile: could not open "
265 G4String descript =
"DicomPhantomZSliceHeader::DumpToFile: could not open "
274 for(
G4int i = 0; i < nMaterials; ++i) {
278 G4String descript =
"String : " + str1 +
" supposed to be integer";
279 G4Exception(
"DicomPhantomZSliceHeader::ReadDataFromFile - error in \
280 formatting: missing material index",
"",
FatalException,descript.c_str());
282 G4int index = G4s2n<G4int>(str1);
283 if(index > nMaterials || index < 0) {
284 G4String descript =
"Index : " + str1;
285 G4Exception(
"DicomPhantomZSliceHeader::ReadDataFromFile - error:\
296 in >> tmpMinX >> tmpMaxX;
297 in >> tmpMinY >> tmpMaxY;
298 in >> tmpMinZ >> tmpMaxZ;
static G4MaterialTable * GetMaterialTable()
std::vector< G4Material * > G4MaterialTable
G4GLOB_DLL std::ostream G4cout
G4double GetRadialTolerance() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
static G4GeometryTolerance * GetInstance()
G4GLOB_DLL std::ostream G4cerr