47 std::vector<G4Material*>& mat,
51 fdX(voxelSize.
x()), fdY(voxelSize.y()), fdZ(voxelSize.
z()),
52 fnX(fnX_), fnY(fnY_), fnZ(fnZ_),
65 void DicomNestedPhantomParameterisation::ReadColourData()
93 fColours[
"Default"] = blankAtt;
96 G4String colourFile =
"ColourMap.dat";
97 std::ifstream fin(colourFile.c_str());
100 G4double cred, cgreen, cblue, copacity;
102 for(
G4int ii = 0; ii < nMate; ii++ ){
103 fin >> mateName >> cred >> cgreen >> cblue >> copacity;
104 G4Colour colour( cred, cgreen, cblue, copacity );
107 fColours[mateName] = visAtt;
113 SetNoVoxel(
unsigned int nx,
unsigned int ny,
unsigned int nz )
128 if(parentTouch==0)
return fMaterials[0];
136 G4int copyID = ix + fnX*iy + fnX*fnY*iz;
140 mate = fMaterials[matIndex];
143 G4String mateName = fMaterials.at(matIndex)->GetName();
144 std::string::size_type iuu = mateName.find(
"__");
145 if( iuu != std::string::npos ) {
146 mateName = mateName.substr( 0, iuu );
149 if(0 < fColours.count(mateName)) {
151 SetVisAttributes(fColours.find(mateName)->second);
154 SetVisAttributes(fColours.begin()->second);
166 return fMaterialIndices[copyNo];
176 return fMaterials.size();
186 return fMaterials[i];
199 +1.)*fdZ - fdZ*fnZ));
void ComputeDimensions(G4Box &, const G4int, const G4VPhysicalVolume *) const
void SetZHalfLength(G4double dz)
void ComputeTransformation(const G4int no, G4VPhysicalVolume *currentPV) const
CLHEP::Hep3Vector G4ThreeVector
static G4VVisManager * GetConcreteInstance()
unsigned int GetMaterialIndex(unsigned int nx, unsigned int ny, unsigned int nz) const
void SetVisibility(G4bool=true)
void SetTranslation(const G4ThreeVector &v)
G4LogicalVolume * GetLogicalVolume() const
virtual G4int GetReplicaNumber(G4int depth=0) const
void SetYHalfLength(G4double dy)
void SetXHalfLength(G4double dx)
void SetNoVoxel(unsigned int nx, unsigned int ny, unsigned int nz)
G4int GetNumberOfMaterials() const
DicomNestedPhantomParameterisation(const G4ThreeVector &voxelSize, std::vector< G4Material * > &mat, G4int fnZ_=0, G4int fnY_=0, G4int fnX_=0)
~DicomNestedPhantomParameterisation()
G4Material * ComputeMaterial(G4VPhysicalVolume *currentVol, const G4int repNo, const G4VTouchable *parentTouch)
Definition of the DicomNestedPhantomParameterisation class.
G4Material * GetMaterial(G4int idx) const