47 std::vector<G4Material*>& mat,
51 fdX(voxelSize.x()), fdY(voxelSize.y()), fdZ(voxelSize.z()),
52 fnX(fnX_), fnY(fnY_), fnZ(fnZ_),
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 );
113 SetNoVoxel(
unsigned int nx,
unsigned int ny,
unsigned int nz )
144 std::string::size_type iuu = mateName.find(
"__");
145 if( iuu != std::string::npos ) {
146 mateName = mateName.substr( 0, iuu );
151 SetVisAttributes(
fColours.find(mateName)->second);
154 SetVisAttributes(
fColours.begin()->second);
size_t * fMaterialIndices
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)
std::map< G4String, G4VisAttributes * > fColours
void SetTranslation(const G4ThreeVector &v)
G4LogicalVolume * GetLogicalVolume() const
std::vector< G4Material * > fMaterials
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