source: trunk/examples/extended/medical/DICOM/include/DicomNestedPhantomParameterisation.hh @ 1292

Last change on this file since 1292 was 1230, checked in by garnier, 15 years ago

update to geant4.9.3

File size: 5.2 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
5// * The  Geant4 software  is  copyright of the Copyright Holders  of *
6// * the Geant4 Collaboration.  It is provided  under  the terms  and *
7// * conditions of the Geant4 Software License,  included in the file *
8// * LICENSE and available at  http://cern.ch/geant4/license .  These *
9// * include a list of copyright holders.                             *
10// *                                                                  *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work  make  any representation or  warranty, express or implied, *
14// * regarding  this  software system or assume any liability for its *
15// * use.  Please see the license in the file  LICENSE  and URL above *
16// * for the full disclaimer and the limitation of liability.         *
17// *                                                                  *
18// * This  code  implementation is the result of  the  scientific and *
19// * technical work of the GEANT4 collaboration.                      *
20// * By using,  copying,  modifying or  distributing the software (or *
21// * any work based  on the software)  you  agree  to acknowledge its *
22// * use  in  resulting  scientific  publications,  and indicate your *
23// * acceptance of all terms of the Geant4 Software license.          *
24// ********************************************************************
25//
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>
34
35#include "G4Types.hh"
36#include "G4ThreeVector.hh"
37#include "G4VNestedParameterisation.hh"
38
39class G4VPhysicalVolume;
40class G4VTouchable; 
41class G4VSolid;
42class G4Material;
43
44// CSG Entities which may be parameterised/replicated
45//
46class G4Box;
47class G4Tubs;
48class G4Trd;
49class G4Trap;
50class G4Cons;
51class G4Sphere;
52class G4Orb;
53class G4Torus;
54class G4Para;
55class G4Polycone;
56class G4Polyhedra;
57class G4Hype;
58
59class DicomNestedPhantomParameterisation : public G4VNestedParameterisation
60{
61  public:
62
63    DicomNestedPhantomParameterisation(const G4ThreeVector& voxelSize,
64                                       std::vector<G4Material*>& mat);
65    virtual ~DicomNestedPhantomParameterisation(); 
66
67    G4Material* ComputeMaterial(G4VPhysicalVolume *currentVol,
68                                const G4int repNo, 
69                                const G4VTouchable *parentTouch );
70      // Must cope with parentTouch for navigator's SetupHierarchy
71
72    G4int       GetNumberOfMaterials() const;
73    G4Material* GetMaterial(G4int idx) const;
74      // Needed to define materials for instances of Nested Parameterisation
75      // Current convention: each call should return the materials
76      // of all instances with the same mother/ancestor volume
77
78    size_t GetMaterialIndex( size_t nx, size_t ny, size_t nz) const;
79    size_t GetMaterialIndex( size_t copyNo) const;
80    void SetMaterialIndices( size_t* matInd ) { fMaterialIndices = matInd; }
81    void SetNoVoxel( size_t nx, size_t ny, size_t nz );
82
83    void ComputeTransformation(const G4int no,
84                                     G4VPhysicalVolume *currentPV) const;
85
86    // Additional standard Parameterisation methods,
87    // which can be optionally defined, in case solid is used.
88
89    void ComputeDimensions(G4Box &, const G4int,
90                                    const G4VPhysicalVolume *) const;
91
92  private:  // Dummy declarations to get rid of warnings ...
93
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 {}
116
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
123};
124
125#endif
Note: See TracBrowser for help on using the repository browser.