ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
DicomNestedPhantomParameterisation.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file DicomNestedPhantomParameterisation.hh
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
//
29
//
30
31
#ifndef DICOMNESTEDPARAMETERISATION_HH
32
#define DICOMNESTEDPARAMETERISATION_HH
33
34
#include <vector>
35
#include <map>
36
37
#include "
G4Types.hh
"
38
#include "
G4ThreeVector.hh
"
39
#include "
G4VNestedParameterisation.hh
"
40
41
class
G4VPhysicalVolume
;
42
class
G4VTouchable
;
43
class
G4VSolid
;
44
class
G4Material
;
45
class
G4VisAttributes
;
46
47
// CSG Entities which may be parameterised/replicated
48
//
49
class
G4Box
;
50
class
G4Tubs
;
51
class
G4Trd
;
52
class
G4Trap
;
53
class
G4Cons
;
54
class
G4Sphere
;
55
class
G4Ellipsoid
;
56
class
G4Orb
;
57
class
G4Torus
;
58
class
G4Para
;
59
class
G4Polycone
;
60
class
G4Polyhedra
;
61
class
G4Hype
;
62
64
65
class
DicomNestedPhantomParameterisation
:
public
G4VNestedParameterisation
66
{
67
public
:
68
typedef
std::map<G4String, G4VisAttributes*>
ColourMap_t
;
69
70
static
G4String
defaultColorFile
;
71
72
public
:
73
74
DicomNestedPhantomParameterisation
(
const
G4ThreeVector
& voxelSize,
75
std::vector<G4Material*>&
mat
,
76
G4int
fnZ_ = 0,
G4int
fnY_ = 0,
G4int
fnX_ = 0,
77
G4String
colorFile =
defaultColorFile
);
78
~DicomNestedPhantomParameterisation
();
79
80
G4Material
*
ComputeMaterial
(
G4VPhysicalVolume
*currentVol,
81
const
G4int
repNo,
82
const
G4VTouchable
*parentTouch );
83
// Must cope with parentTouch for navigator's SetupHierarchy
84
85
G4int
GetNumberOfMaterials
()
const
;
86
G4Material
*
GetMaterial
(
G4int
idx
)
const
;
87
// Needed to define materials for instances of Nested Parameterisation
88
// Current convention: each call should return the materials
89
// of all instances with the same mother/ancestor volume
90
91
//unsigned int GetMaterialIndex( unsigned int nx, unsigned int ny,
92
// unsigned int nz) const;
93
unsigned
int
GetMaterialIndex
(
unsigned
int
copyNo)
const
;
94
void
SetMaterialIndices
(
size_t
* matInd ) {
fMaterialIndices
= matInd; }
95
void
SetNoVoxel
(
unsigned
int
nx,
unsigned
int
ny,
unsigned
int
nz );
96
97
void
ComputeTransformation
(
const
G4int
no,
98
G4VPhysicalVolume
*currentPV)
const
;
99
100
// Additional standard Parameterisation methods,
101
// which can be optionally defined, in case solid is used.
102
void
ComputeDimensions
(
G4Box
&,
const
G4int
,
103
const
G4VPhysicalVolume
*)
const
;
104
105
const
ColourMap_t
&
GetColourMap
()
const
{
return
fColours
; }
106
ColourMap_t
&
GetColourMap
() {
return
fColours
; }
107
108
private
:
// Dummy declarations to get rid of warnings ...
109
110
void
ComputeDimensions
(
G4Trd
&,
const
G4int
,
111
const
G4VPhysicalVolume
*)
const
{}
112
void
ComputeDimensions
(
G4Trap
&,
const
G4int
,
113
const
G4VPhysicalVolume
*)
const
{}
114
void
ComputeDimensions
(
G4Cons
&,
const
G4int
,
115
const
G4VPhysicalVolume
*)
const
{}
116
void
ComputeDimensions
(
G4Sphere
&,
const
G4int
,
117
const
G4VPhysicalVolume
*)
const
{}
118
void
ComputeDimensions
(
G4Ellipsoid
&,
const
G4int
,
119
const
G4VPhysicalVolume
*)
const
{}
120
void
ComputeDimensions
(
G4Orb
&,
const
G4int
,
121
const
G4VPhysicalVolume
*)
const
{}
122
void
ComputeDimensions
(
G4Torus
&,
const
G4int
,
123
const
G4VPhysicalVolume
*)
const
{}
124
void
ComputeDimensions
(
G4Para
&,
const
G4int
,
125
const
G4VPhysicalVolume
*)
const
{}
126
void
ComputeDimensions
(
G4Hype
&,
const
G4int
,
127
const
G4VPhysicalVolume
*)
const
{}
128
void
ComputeDimensions
(
G4Tubs
&,
const
G4int
,
129
const
G4VPhysicalVolume
*)
const
{}
130
void
ComputeDimensions
(
G4Polycone
&,
const
G4int
,
131
const
G4VPhysicalVolume
*)
const
{}
132
void
ComputeDimensions
(
G4Polyhedra
&,
const
G4int
,
133
const
G4VPhysicalVolume
*)
const
{}
134
135
void
ReadColourData
(
G4String
);
136
137
using
G4VNestedParameterisation::ComputeMaterial
;
138
139
private
:
140
141
G4double
fdX
,
fdY
,
fdZ
;
142
G4int
fnX
,
fnY
,
fnZ
;
143
std::vector<G4Material*>
fMaterials
;
144
size_t
*
fMaterialIndices
;
// Index in materials corresponding to each voxel
145
ColourMap_t
fColours
;
146
std::map<G4int, G4VisAttributes*>
mColours
;
147
std::vector<G4double>
fpZ
;
148
};
149
150
#endif
geant4
tree
geant4-10.6-release
examples
extended
medical
DICOM
include
DicomNestedPhantomParameterisation.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:07
using
1.8.2 with
ECCE GitHub integration