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)
86 G4cout <<
" DicomPhantomZSliceHeader reading number of materials "
90 for(
G4int im = 0; im < nmate; im++ ){
91 fin >> mateindex >> matename;
98 G4Exception(
"DicomPhantomZSliceHeader::DicomPhantomZSliceHeader",
99 "A material is found in file that is not built in the C++ code",
110 <<
" " << fNoVoxelZ <<
G4endl;
118 G4cout <<
" Extension in X " <<
fMinX <<
" " << fMaxX << G4endl
119 <<
" Extension in Y " <<
fMinY <<
" " << fMaxY << G4endl
120 <<
" Extension in Z " <<
fMinZ <<
" " << fMaxZ <<
G4endl;
130 std::vector<G4Material*>::const_iterator matite;
131 for( matite = matTab->begin(); matite != matTab->end(); ++matite ) {
132 if( (*matite)->GetName() == mateName ) {
return true; }
157 G4cerr <<
"DicomPhantomZSliceHeader error adding two slice headers:\
158 !!! Different number of voxels: "
163 G4Exception(
"DicomPhantomZSliceHeader::DicomPhantomZSliceHeader",
169 G4cerr <<
"DicomPhantomZSliceHeader error adding two slice headers:\
170 !!! Different extensions: "
176 G4Exception(
"DicomPhantomZSliceHeader::operator+",
"",
183 G4cerr <<
"DicomPhantomZSliceHeader error adding two slice headers:\
184 !!! Different number of materials: " <<
fMaterialNames.size() <<
" =? "
185 << fMaterialNames2.size() <<
G4endl;
186 G4Exception(
"DicomPhantomZSliceHeader::operator+",
"",
191 G4cerr <<
"DicomPhantomZSliceHeader error adding two slice headers:\
192 !!! Different material number " << ii <<
" : "
194 << fMaterialNames2[ii] <<
G4endl;
195 G4Exception(
"DicomPhantomZSliceHeader::operator+",
"",
205 G4cerr <<
"DicomPhantomZSliceHeader error adding two slice headers:!!!\
206 Slices are not contiguous in Z "
210 G4Exception(
"DicomPhantomZSliceHeader::operator+",
"",
229 G4cout <<
"DicomPhantomZSliceHeader::Dumping Z Slice data to "
242 G4String descript =
"DicomPhantomZSliceHeader::DumpToFile: could not open "
257 for(
unsigned int i = 0; i <
fMateIDs.size(); ++i)
260 for(
unsigned int i = 0; i <
fValues.size(); ++i)
274 G4String descript =
"DicomPhantomZSliceHeader::DumpToFile: could not open "
283 for(
G4int i = 0; i < nMaterials; ++i) {
287 G4String descript =
"String : " + str1 +
" supposed to be integer";
288 G4Exception(
"DicomPhantomZSliceHeader::ReadDataFromFile - error in \
289 formatting: missing material index",
"",
FatalException,descript.c_str());
291 G4int index = G4s2n<G4int>(str1);
292 if(index > nMaterials || index < 0) {
293 G4String descript =
"Index : " + str1;
294 G4Exception(
"DicomPhantomZSliceHeader::ReadDataFromFile - error:\
305 in >> tmpMinX >> tmpMaxX;
306 in >> tmpMinY >> tmpMaxY;
307 in >> tmpMinZ >> tmpMaxZ;
T max(const T t1, const T t2)
brief Return the largest of the two arguments
static G4MaterialTable * GetMaterialTable()
G4double GetRadialTolerance() const
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
G4GLOB_DLL std::ostream G4cerr
std::vector< G4Material * > G4MaterialTable
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout
static G4GeometryTolerance * GetInstance()
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
static G4NistManager * Instance()