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
DicomFileMgr.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file DicomFileMgr.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
#ifndef DicomFileMgr__HH
27
#define DicomFileMgr__HH
28
#include <vector>
29
#include <map>
30
#include "
globals.hh
"
31
32
#include "dcmtk/dcmdata/dcfilefo.h"
33
class
DicomVFile
;
34
class
DicomFileCT
;
35
class
DicomFileStructure
;
36
class
DicomFilePlan
;
37
class
DicomFilePET
;
38
class
DcmDataset;
39
40
//typedef std::multimap<OFString,DicomVFile*> msd;
41
typedef
std::map<G4double,DicomFileCT*>
mdct
;
42
typedef
std::map<G4double,DicomFilePET*>
mdpet
;
43
enum
VerbLevel
{
silentVerb
= -1,
errorVerb
= 0,
warningVerb
= 1,
infoVerb
=2,
debugVerb
=3,
44
testVerb
=4};
45
46
class
DicomFileMgr
47
{
48
public
:
49
static
DicomFileMgr
*
GetInstance
();
50
~DicomFileMgr
(){};
51
52
private
:
53
DicomFileMgr
();
54
55
public
:
56
std::vector<DicomFileStructure*>
GetStructFiles
()
const
{
57
return
theStructFiles
;
58
}
59
60
void
SetCompression
(
G4String
fComp );
61
void
AddFile
(
G4String
fComp );
62
void
AddMaterial
( std::vector<G4String>
data
);
63
void
AddMaterialDensity
( std::vector<G4String>
data
);
64
void
AddCT2Density
( std::vector<G4String>
data
);
65
66
void
Convert
(
G4String
fFileName );
67
void
CheckNColumns
(std::vector<G4String> wl,
size_t
vsizeTh );
68
void
ProcessFiles
();
69
void
CheckCTSlices
();
70
G4double
Hounsfield2density
(Uint32 Hval);
71
size_t
GetMaterialIndex
(
G4double
Hval );
72
size_t
GetMaterialIndexByDensity
(
G4double
density );
73
void
BuildCTMaterials
();
74
void
MergeCTFiles
();
75
void
CheckPETSlices
();
76
void
BuildPETActivities
();
77
void
MergePETFiles
();
78
void
DumpToTextFile
();
79
void
SetStructureNCheck
(
G4int
nsc ){
80
theStructureNCheck
= nsc;
81
}
82
G4int
GetStructureNCheck
()
const
{
83
return
theStructureNCheck
;
84
}
85
void
SetStructureNMaxROI
(
G4int
nsc ){
86
theStructureNMaxROI
= nsc;
87
}
88
G4int
GetStructureNMaxROI
()
const
{
89
return
theStructureNMaxROI
;
90
}
91
G4int
GetCompression
()
const
{
92
return
fCompression
;
93
}
94
G4String
GetFileOutName
()
const
{
95
return
theFileOutName
;
96
}
97
98
void
SetControlPointMetersets
();
99
G4bool
IsMaterialsDensity
()
const
{
100
return
bMaterialsDensity
;
101
}
102
103
protected
:
104
G4int
fCompression
;
105
106
private
:
107
static
DicomFileMgr
*
theInstance
;
108
109
G4String
theFileOutName
;
110
// msd theFiles;
111
mdct
theCTFiles
;
112
std::vector<DicomFileStructure*>
theStructFiles
;
113
std::vector<DicomFilePlan*>
thePlanFiles
;
114
mdpet
thePETFiles
;
115
std::map<G4double,G4String>
theMaterials
;
116
std::map<G4double,G4String>
theMaterialsDensity
;
117
std::map<G4int,G4double>
theCT2Density
;
118
119
DicomFileCT
*
theCTFileAll
;
120
DicomFilePET
*
thePETFileAll
;
121
G4int
theStructureNCheck
;
122
G4int
theStructureNMaxROI
;
123
124
public
:
125
static
int
verbose
;
126
G4bool
bMaterialsDensity
;
127
};
128
129
#endif
geant4
tree
geant4-10.6-release
examples
extended
medical
DICOM
dicomReader
include
DicomFileMgr.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:07
using
1.8.2 with
ECCE GitHub integration