Changeset 1230 for trunk/examples/extended/medical/DICOM/include
- Timestamp:
- Jan 8, 2010, 3:02:48 PM (14 years ago)
- Location:
- trunk/examples/extended/medical/DICOM/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/extended/medical/DICOM/include/DicomDetectorConstruction.hh
r807 r1230 79 79 // construct the patient volumes. This method should be implemented for each of the derived classes 80 80 81 void SetScorer(G4LogicalVolume* voxel_logic); 82 81 83 protected: 82 84 G4Material* air; -
trunk/examples/extended/medical/DICOM/include/DicomNestedPhantomParameterisation.hh
r807 r1230 24 24 // ******************************************************************** 25 25 // 26 #ifndef RE02NESTEDPARAMETERISATION_HH 27 #define RE02NESTEDPARAMETERISATION_HH 26 // $Id: DicomNestedPhantomParameterisation.hh,v 1.3 2009/01/27 10:44:58 gcosmo Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 // 29 // -------------------------------------------------------------------- 30 #ifndef DICOMNESTEDPARAMETERISATION_HH 31 #define DICOMNESTEDPARAMETERISATION_HH 32 33 #include <vector> 28 34 29 35 #include "G4Types.hh" 36 #include "G4ThreeVector.hh" 30 37 #include "G4VNestedParameterisation.hh" 31 #include "G4ThreeVector.hh"32 #include <vector>33 38 34 39 class G4VPhysicalVolume; … … 52 57 class G4Hype; 53 58 54 class DicomNestedPhantomParameterisation : public G4VNestedParameterisation59 class DicomNestedPhantomParameterisation : public G4VNestedParameterisation 55 60 { 56 public: // with description61 public: 57 62 58 63 DicomNestedPhantomParameterisation(const G4ThreeVector& voxelSize, 59 64 std::vector<G4Material*>& mat); 60 65 virtual ~DicomNestedPhantomParameterisation(); 61 66 62 // Methods required in derived classes 63 // ----------------------------------- 64 virtual G4Material* ComputeMaterial(G4VPhysicalVolume *currentVol, 65 const G4int repNo, 66 const G4VTouchable *parentTouch=0 67 ); 68 // Required method, as it is the reason for this class. 69 // Must cope with parentTouch=0 for navigator's SetupHierarchy 67 G4Material* ComputeMaterial(G4VPhysicalVolume *currentVol, 68 const G4int repNo, 69 const G4VTouchable *parentTouch ); 70 // Must cope with parentTouch for navigator's SetupHierarchy 70 71 71 virtualG4int GetNumberOfMaterials() const;72 virtualG4Material* GetMaterial(G4int idx) const;72 G4int GetNumberOfMaterials() const; 73 G4Material* GetMaterial(G4int idx) const; 73 74 // Needed to define materials for instances of Nested Parameterisation 74 // Current convention: each call should return the materials 75 // of all instances with the same mother/ancestor volume. 75 // Current convention: each call should return the materials 76 // of all instances with the same mother/ancestor volume 77 76 78 size_t GetMaterialIndex( size_t nx, size_t ny, size_t nz) const; 77 79 size_t GetMaterialIndex( size_t copyNo) const; 78 void SetMaterialIndices( size_t* matInd ){ 79 fMaterialIndices = matInd; } 80 void SetMaterialIndices( size_t* matInd ) { fMaterialIndices = matInd; } 80 81 void SetNoVoxel( size_t nx, size_t ny, size_t nz ); 81 82 82 virtual void ComputeTransformation(const G4int no, 83 G4VPhysicalVolume *currentPV) const; 84 85 // Methods optional in derived classes 86 // ----------------------------------- 83 void ComputeTransformation(const G4int no, 84 G4VPhysicalVolume *currentPV) const; 87 85 88 86 // Additional standard Parameterisation methods, 89 // 87 // which can be optionally defined, in case solid is used. 90 88 91 virtual void ComputeDimensions(G4Box &, 92 const G4int, 93 const G4VPhysicalVolume *) const; 89 void ComputeDimensions(G4Box &, const G4int, 90 const G4VPhysicalVolume *) const; 94 91 95 private: // Dummy declarations to get rid of warnings ... 96 void ComputeDimensions (G4Trd&,const G4int,const G4VPhysicalVolume*) 97 const {} 98 void ComputeDimensions (G4Trap&,const G4int,const G4VPhysicalVolume*) 99 const {} 100 void ComputeDimensions (G4Cons&,const G4int,const G4VPhysicalVolume*) 101 const {} 102 void ComputeDimensions (G4Sphere&,const G4int,const G4VPhysicalVolume*) 103 const {} 104 void ComputeDimensions (G4Orb&,const G4int,const G4VPhysicalVolume*) 105 const {} 106 void ComputeDimensions (G4Torus&,const G4int,const G4VPhysicalVolume*) 107 const {} 108 void ComputeDimensions (G4Para&,const G4int,const G4VPhysicalVolume*) 109 const {} 110 void ComputeDimensions (G4Hype&,const G4int,const G4VPhysicalVolume*) 111 const {} 112 void ComputeDimensions (G4Tubs&,const G4int,const G4VPhysicalVolume*) 113 const {} 114 void ComputeDimensions (G4Polycone&,const G4int,const G4VPhysicalVolume*) 115 const {} 116 void ComputeDimensions (G4Polyhedra&,const G4int,const G4VPhysicalVolume*) 117 const {} 92 private: // Dummy declarations to get rid of warnings ... 118 93 119 private: 120 G4double fdX,fdY,fdZ; 121 G4int fnX,fnY,fnZ; 122 123 // 124 std::vector<G4Material*> fMaterials; 94 void ComputeDimensions (G4Trd&, const G4int, 95 const G4VPhysicalVolume*) const {} 96 void ComputeDimensions (G4Trap&, const G4int, 97 const G4VPhysicalVolume*) const {} 98 void ComputeDimensions (G4Cons&, const G4int, 99 const G4VPhysicalVolume*) const {} 100 void ComputeDimensions (G4Sphere&, const G4int, 101 const G4VPhysicalVolume*) const {} 102 void ComputeDimensions (G4Orb&, const G4int, 103 const G4VPhysicalVolume*) const {} 104 void ComputeDimensions (G4Torus&, const G4int, 105 const G4VPhysicalVolume*) const {} 106 void ComputeDimensions (G4Para&, const G4int, 107 const G4VPhysicalVolume*) const {} 108 void ComputeDimensions (G4Hype&, const G4int, 109 const G4VPhysicalVolume*) const {} 110 void ComputeDimensions (G4Tubs&, const G4int, 111 const G4VPhysicalVolume*) const {} 112 void ComputeDimensions (G4Polycone&, const G4int, 113 const G4VPhysicalVolume*) const {} 114 void ComputeDimensions (G4Polyhedra&, const G4int, 115 const G4VPhysicalVolume*) const {} 125 116 126 size_t* fMaterialIndices; 127 // Index in fMaterials that correspond to each voxel. 117 private: 118 119 G4double fdX,fdY,fdZ; 120 G4int fnX,fnY,fnZ; 121 std::vector<G4Material*> fMaterials; 122 size_t* fMaterialIndices; // Index in materials corresponding to each voxel 128 123 }; 129 124
Note: See TracChangeset
for help on using the changeset viewer.