File indexing completed on 2025-01-31 09:22:33
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 #ifndef CellParameterisation_H
0036 #define CellParameterisation_H 1
0037
0038 #include "G4VPVParameterisation.hh"
0039 #include "G4VisAttributes.hh"
0040
0041
0042
0043 class CellParameterisation : public G4VPVParameterisation
0044 {
0045 public:
0046
0047 explicit CellParameterisation
0048 (G4Material* nucleus1, G4Material* cytoplasm1,
0049 G4Material* nucleus2, G4Material* cytoplasm2,
0050 G4Material* nucleus3, G4Material* cytoplasm3
0051 );
0052
0053 ~CellParameterisation() override;
0054
0055 void ComputeTransformation (const G4int copyNo,G4VPhysicalVolume* physVol) const override;
0056
0057 void ComputeDimensions(G4Box&,
0058 const G4int,
0059 const G4VPhysicalVolume* ) const override;
0060
0061 void ComputeDimensions(G4Tubs &,
0062 const G4int,
0063 const G4VPhysicalVolume *) const override {}
0064
0065 void ComputeDimensions(G4Trd &,
0066 const G4int,
0067 const G4VPhysicalVolume *) const override {}
0068
0069 void ComputeDimensions(G4Trap &,
0070 const G4int,
0071 const G4VPhysicalVolume *) const override {}
0072
0073 void ComputeDimensions(G4Cons &,
0074 const G4int,
0075 const G4VPhysicalVolume *) const override{}
0076
0077 void ComputeDimensions(G4Sphere &,
0078 const G4int,
0079 const G4VPhysicalVolume *) const override{}
0080
0081 void ComputeDimensions(G4Ellipsoid &,
0082 const G4int,
0083 const G4VPhysicalVolume *) const override{}
0084
0085 void ComputeDimensions(G4Orb &,
0086 const G4int,
0087 const G4VPhysicalVolume *) const override{}
0088
0089 void ComputeDimensions(G4Torus &,
0090 const G4int,
0091 const G4VPhysicalVolume *) const override{}
0092
0093 void ComputeDimensions(G4Para &,
0094 const G4int,
0095 const G4VPhysicalVolume *) const override{}
0096
0097 void ComputeDimensions(G4Polycone &,
0098 const G4int,
0099 const G4VPhysicalVolume *) const override{}
0100
0101 void ComputeDimensions(G4Polyhedra &,
0102 const G4int,
0103 const G4VPhysicalVolume *) const override{}
0104
0105 void ComputeDimensions(G4Hype &,
0106 const G4int,
0107 const G4VPhysicalVolume *) const override{}
0108
0109 G4int GetNoBoxes() const {return fPhantomTotalPixels;}
0110
0111 G4Material* ComputeMaterial(const G4int copyNo,
0112 G4VPhysicalVolume* physVol,
0113 const G4VTouchable*) override;
0114
0115
0116
0117 G4int GetPhantomTotalPixels() const {return fPhantomTotalPixels;}
0118 G4int GetNucleusTotalPixels() const {return fNucleusTotalPixels;}
0119 G4int GetCytoplasmTotalPixels() const {return fCytoplasmTotalPixels;}
0120 G4double GetPixelSizeX() const {return fDimCellBoxX;}
0121 G4double GetPixelSizeY() const {return fDimCellBoxY;}
0122 G4double GetPixelSizeZ() const {return fDimCellBoxZ;}
0123 G4double GetCytoplasmMass() const {return fCytoplasmMass;}
0124 G4double GetNucleusMass() const {return fNucleusMass;}
0125
0126 G4ThreeVector GetVoxelThreeVector(G4int i) const {return fMapCell[i];}
0127 G4double GetMaterialVector(G4int i) const {return fMaterial[i];}
0128 G4double GetMassVector(G4int i) const {return fMass[i];}
0129 G4int GetTissueType(G4int i) const {return fTissueType[i];}
0130
0131
0132
0133 static CellParameterisation * Instance()
0134 {
0135 return gInstance;
0136 }
0137
0138 private:
0139 static CellParameterisation* gInstance;
0140
0141 G4Material * fNucleusMaterial1;
0142 G4Material * fCytoplasmMaterial1;
0143 G4Material * fNucleusMaterial2;
0144 G4Material * fCytoplasmMaterial2;
0145 G4Material * fNucleusMaterial3;
0146 G4Material * fCytoplasmMaterial3;
0147
0148 G4VisAttributes * fNucleusAttributes1;
0149 G4VisAttributes * fCytoplasmAttributes1;
0150 G4VisAttributes * fNucleusAttributes2;
0151 G4VisAttributes * fCytoplasmAttributes2;
0152 G4VisAttributes * fNucleusAttributes3;
0153 G4VisAttributes * fCytoplasmAttributes3;
0154
0155 G4ThreeVector * fMapCell;
0156
0157 G4double * fMaterial;
0158 G4double * fMass;
0159 G4double fDimCellBoxX;
0160 G4double fDimCellBoxY;
0161 G4double fDimCellBoxZ;
0162 G4double fNucleusMass;
0163 G4double fCytoplasmMass;
0164
0165 G4int * fTissueType;
0166 G4int fPhantomTotalPixels;
0167 G4int fNucleusTotalPixels;
0168 G4int fCytoplasmTotalPixels;
0169 };
0170 #endif
0171
0172