File indexing completed on 2025-02-23 09:22:03
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
0036
0037
0038
0039
0040
0041
0042
0043 #ifndef NeuronLoadDataFile_H
0044 #define NeuronLoadDataFile_H 1
0045
0046 #include "G4Colour.hh"
0047 #include "G4Material.hh"
0048 #include "G4RotationMatrix.hh"
0049 #include "G4SystemOfUnits.hh"
0050 #include "G4ThreeVector.hh"
0051 #include "G4VSolid.hh"
0052 #include "G4VisAttributes.hh"
0053
0054 #include <vector>
0055
0056
0057 #include "G4Box.hh" // bounding volume
0058 #include "G4Cons.hh" // stubby spine, filopodia
0059 #include "G4Ellipsoid.hh" // soma compartments
0060 #include "G4EllipticalCone.hh"
0061 #include "G4EllipticalTube.hh"
0062 #include "G4Hype.hh" // thin spine neck
0063 #include "G4Orb.hh" // mushroom spine
0064 #include "G4Para.hh"
0065 #include "G4Polycone.hh"
0066 #include "G4Polyhedra.hh"
0067 #include "G4Sphere.hh" // soma compartments
0068 #include "G4Tet.hh"
0069 #include "G4Torus.hh"
0070 #include "G4Trap.hh"
0071 #include "G4Trd.hh"
0072 #include "G4Tubs.hh" // axon, dendrite compartments
0073 #include "G4TwistedBox.hh"
0074 #include "G4TwistedTrap.hh"
0075 #include "G4TwistedTrd.hh"
0076 #include "G4TwistedTubs.hh"
0077 #include "G4VPVParameterisation.hh"
0078
0079
0080
0081
0082 class NeuronLoadDataFile
0083
0084
0085
0086
0087
0088
0089 {
0090 public:
0091 NeuronLoadDataFile();
0092 ~NeuronLoadDataFile() = default;
0093
0094 void SingleNeuronSWCfile(const G4String& filename);
0095 void NeuralNetworkDATAfile(const G4String& filename);
0096
0097
0098 void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume* physVol) const;
0099
0100 void ComputeDimensions(G4Tubs& cylinderComp, const G4int copyNo,
0101 const G4VPhysicalVolume*) const;
0102 G4double GetwidthB() const { return fwidthB; }
0103 G4double GetheightB() const { return fheightB; }
0104 G4double GetdepthB() const { return fdepthB; }
0105 G4double GetdiagnlLength() const { return fdiagnlLength; }
0106 G4double GetshiftX() const { return fshiftX; }
0107 G4double GetshiftY() const { return fshiftY; }
0108 G4double GetshiftZ() const { return fshiftZ; }
0109 G4double GetTypeN(G4int i) { return fTypeN[i]; }
0110
0111 G4int GetnbSomacomp() const { return fnbSomacomp; }
0112 G4double GetMassSomacomp(G4int i) const { return fMassSomacomp[i]; }
0113 G4double GetMassSomaTot() { return fMassSomaTot; }
0114 G4ThreeVector GetPosSomacomp(G4int i) const { return fPosSomacomp[i]; }
0115 G4double GetRadSomacomp(G4int i) const { return fRadSomacomp[i]; }
0116
0117 G4int GetnbDendritecomp() const { return fnbDendritecomp; }
0118 G4double GetMassDendcomp(G4int i) const { return fMassDendcomp[i]; }
0119 G4double GetMassDendTot() { return fMassDendTot; }
0120 G4ThreeVector GetPosDendcomp(G4int i) const { return fPosDendcomp[i]; }
0121 G4double GetRadDendcomp(G4int i) const { return fRadDendcomp[i]; }
0122 G4double GetHeightDendcomp(G4int i) const { return fHeightDendcomp[i]; }
0123 G4double GetDistADendSoma(G4int i) const { return fDistADendSoma[i]; }
0124 G4double GetDistBDendSoma(G4int i) const { return fDistBDendSoma[i]; }
0125 G4RotationMatrix GetRotDendcomp(G4int i) const { return fRotDendcomp[i]; }
0126
0127 G4int GetnbAxoncomp() const { return fnbAxoncomp; }
0128 G4double GetMassAxoncomp(G4int i) const { return fMassAxoncomp[i]; }
0129 G4double GetMassAxonTot() const { return fMassAxonTot; }
0130 G4ThreeVector GetPosAxoncomp(G4int i) const { return fPosAxoncomp[i]; }
0131 G4double GetRadAxoncomp(G4int i) const { return fRadAxoncomp[i]; }
0132 G4double GetHeightAxoncomp(G4int i) const { return fHeightAxoncomp[i]; }
0133 G4double GetDistAxonsoma(G4int i) const { return fDistAxonsoma[i]; }
0134 G4RotationMatrix GetRotAxoncomp(G4int i) const { return fRotAxoncomp[i]; }
0135
0136 G4int GetnbSpinecomp() const { return fnbSpinecomp; }
0137 G4double GetMassSpinecomp(G4int i) const { return fMassSpinecomp[i]; }
0138 G4double GetMassSpineTot() const { return fMassSpineTot; }
0139 G4ThreeVector GetPosSpinecomp(G4int i) const { return fPosSpinecomp[i]; }
0140 G4double GetRadSpinecomp(G4int i) const { return fRadSpinecomp[i]; }
0141 G4double GetHeightSpinecomp(G4int i) const { return fHeightSpinecomp[i]; }
0142 G4double GetDistSpinesoma(G4int i) { return fDistSpinesoma[i]; }
0143 G4RotationMatrix GetRotSpinecomp(G4int i) const { return fRotSpinecomp[i]; }
0144
0145 G4int GetnbNeuroncomp() const { return fnbNeuroncomp; }
0146
0147 G4double GetTotVolNeuron() const { return fTotVolNeuron; }
0148 G4double GetTotSurfNeuron() const { return fTotSurfNeuron; }
0149 G4double GetTotMassNeuron() const { return fTotMassNeuron; }
0150 G4double GetTotVolSlice() const { return fTotVolSlice; }
0151 G4double GetTotSurfSlice() const { return fTotSurfSlice; }
0152 G4double GetTotMassSlice() const { return fTotMassSlice; }
0153 G4double GetTotVolMedium() const { return fTotVolMedium; }
0154 G4double GetTotSurfMedium() const { return fTotSurfMedium; }
0155 G4double GetTotMassMedium() const { return fTotMassMedium; }
0156
0157 private:
0158
0159 G4String fNeuronFileNameSWC;
0160 G4String fNeuronFileNameDATA;
0161
0162 G4int fnbSomacomp{0};
0163 G4int fnbDendritecomp{0};
0164 G4int fnbAxoncomp{0};
0165 G4int fnbSpinecomp{0};
0166 G4int fnbNeuroncomp{0};
0167
0168 std::vector<G4int> fTypeN;
0169
0170
0171 G4double fshiftX{0.0};
0172 G4double fshiftY{0.0};
0173 G4double fshiftZ{0.0};
0174 G4double fwidthB{0.0};
0175 G4double fheightB{0.0};
0176 G4double fdepthB{0.0};
0177 G4double fdiagnlLength{0.0};
0178
0179 G4double fMassSomaTot{0.0};
0180 G4double fMassDendTot{0.0};
0181 G4double fMassAxonTot{0.0};
0182 G4double fMassSpineTot{0.0};
0183
0184 G4double fTotVolNeuron{0.0};
0185 G4double fTotSurfNeuron{0.0};
0186 G4double fTotMassNeuron{0.0};
0187 G4double fTotVolSlice{0.0};
0188 G4double fTotSurfSlice{0.0};
0189 G4double fTotMassSlice{0.0};
0190 G4double fTotVolMedium{0.0};
0191 G4double fTotSurfMedium{0.0};
0192 G4double fTotMassMedium{0.0};
0193
0194 std::vector<G4ThreeVector> fPosSomacomp;
0195 std::vector<G4double> fRadSomacomp;
0196 std::vector<G4double> fMassSomacomp;
0197
0198 std::vector<G4double> fRadDendcomp;
0199 std::vector<G4double> fDistADendSoma;
0200 std::vector<G4double> fDistBDendSoma;
0201 std::vector<G4double> fHeightDendcomp;
0202 std::vector<G4double> fMassDendcomp;
0203 std::vector<G4ThreeVector> fPosDendcomp;
0204 std::vector<G4RotationMatrix> fRotDendcomp;
0205
0206 std::vector<G4double> fRadAxoncomp;
0207 std::vector<G4double> fHeightAxoncomp;
0208 std::vector<G4double> fDistAxonsoma;
0209 std::vector<G4double> fMassAxoncomp;
0210 std::vector<G4ThreeVector> fPosAxoncomp;
0211 std::vector<G4RotationMatrix> fRotAxoncomp;
0212
0213 std::vector<G4double> fRadSpinecomp;
0214 std::vector<G4double> fHeightSpinecomp;
0215 std::vector<G4double> fDistSpinesoma;
0216 std::vector<G4double> fMassSpinecomp;
0217 std::vector<G4ThreeVector> fPosSpinecomp;
0218 std::vector<G4RotationMatrix> fRotSpinecomp;
0219
0220 std::vector<G4double> fRadNeuroncomp;
0221 std::vector<G4double> fHeightNeuroncomp;
0222 std::vector<G4double> fDistNeuronsoma;
0223 std::vector<G4double> fMassNeuroncomp;
0224 std::vector<G4ThreeVector> fPosNeuroncomp;
0225 std::vector<G4RotationMatrix> fRotNeuroncomp;
0226 };
0227
0228 #endif