43 : fNoVoxelX(0),fNoVoxelY(0),fNoVoxelZ(0),
44 fMinX(0),fMinY(0),fMinZ(0),
45 fMaxX(0),fMaxY(0),fMaxZ(0),
46 fFilename(fname),fSliceLocation(0)
85 G4cout <<
" DicomPhantomZSliceHeader reading number of materials " << nmate <<
G4endl;
88 for(
G4int im = 0; im < nmate; im++ ){
89 fin >> mateindex >> matename;
91 G4cout <<
" DicomPhantomZSliceHeader reading material " << im <<
" : "
92 << mateindex <<
" " << matename <<
G4endl;
96 G4Exception(
"DicomPhantomZSliceHeader::DicomPhantomZSliceHeader",
97 "A material is found in file that is not built in the C++ code",
115 G4cout <<
" Extension in X " <<
fMinX <<
" " << fMaxX << G4endl
116 <<
" Extension in Y " <<
fMinY <<
" " << fMaxY << G4endl
117 <<
" Extension in Z " <<
fMinZ <<
" " << fMaxZ <<
G4endl;
127 std::vector<G4Material*>::const_iterator matite;
128 for( matite = matTab->begin(); matite != matTab->end(); ++matite ) {
129 if( (*matite)->GetName() == mateName ) {
return true; }
148 G4cerr <<
"DicomPhantomZSliceHeader error adding two slice headers:\
149 !!! Different number of voxels: "
154 G4Exception(
"DicomPhantomZSliceHeader::DicomPhantomZSliceHeader",
160 G4cerr <<
"DicomPhantomZSliceHeader error adding two slice headers:\
161 !!! Different extensions: "
173 G4cerr <<
"DicomPhantomZSliceHeader error adding two slice headers:\
174 !!! Different number of materials: " <<
fMaterialNames.size() <<
" =? "
175 << fMaterialNames2.size() <<
G4endl;
180 G4cerr <<
"DicomPhantomZSliceHeader error adding two slice headers:\
181 !!! Different material number " << ii <<
" : " <<
fMaterialNames[ii] <<
" =? "
182 << fMaterialNames2[ii] <<
G4endl;
192 G4cerr <<
"DicomPhantomZSliceHeader error adding two slice headers: !!!\
193 Slices are not contiguous in Z "
227 G4String descript =
"DicomPhantomZSliceHeader::DumpToFile: could not open "+
fFilename;
256 G4String descript =
"DicomPhantomZSliceHeader::DumpToFile: could not open "+
fFilename;
264 for(
G4int i = 0; i < nMaterials; ++i) {
268 G4String descript =
"String : " + str1 +
" supposed to be integer";
269 G4Exception(
"DicomPhantomZSliceHeader::ReadDataFromFile - error in \
270 formatting: missing material index",
"",
FatalException,descript.c_str());
272 G4int index = g4s2n<G4int>(str1);
273 if(index > nMaterials || index < 0) {
274 G4String descript =
"Index : " + str1;
275 G4Exception(
"DicomPhantomZSliceHeader::ReadDataFromFile - error:\
286 in >> tmpMinX >> tmpMaxX;
287 in >> tmpMinY >> tmpMaxY;
288 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