Loading...
Searching...
No Matches
DicomFileMgr.hh
Go to the documentation of this file.
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"
33class DicomVFile;
34class DicomFileCT;
36class DicomFilePlan;
37class DicomFilePET;
38class DcmDataset;
39
40//typedef std::multimap<OFString,DicomVFile*> msd;
41typedef std::map<G4double,DicomFileCT*> mdct;
42typedef std::map<G4double,DicomFilePET*> mdpet;
45
46class DicomFileMgr
47{
48public:
49 static DicomFileMgr* GetInstance();
51
52private:
54
55public:
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 ){
81 }
82 G4int GetStructureNCheck() const {
83 return theStructureNCheck;
84 }
85 void SetStructureNMaxROI( G4int nsc ){
87 }
88 G4int GetStructureNMaxROI() const {
90 }
91 G4int GetCompression() const {
92 return fCompression;
93 }
95 return theFileOutName;
96 }
97
99 G4bool IsMaterialsDensity() const {
100 return bMaterialsDensity;
101 }
102
103protected:
105
106private:
108
110 // msd theFiles;
112 std::vector<DicomFileStructure*> theStructFiles;
113 std::vector<DicomFilePlan*> thePlanFiles;
115 std::map<G4double,G4String> theMaterials;
116 std::map<G4double,G4String> theMaterialsDensity;
117 std::map<G4int,G4double> theCT2Density;
118
123
124public:
125 static G4int verbose;
127};
128
129#endif
std::map< G4double, DicomFilePET * > mdpet
VerbLevel
@ errorVerb
@ silentVerb
@ testVerb
@ infoVerb
@ debugVerb
@ warningVerb
std::map< G4double, DicomFileCT * > mdct
G4int theStructureNCheck
std::map< G4double, G4String > theMaterialsDensity
size_t GetMaterialIndex(G4double Hval)
void AddCT2Density(std::vector< G4String > data)
std::vector< DicomFileStructure * > GetStructFiles() const
void SetCompression(G4String fComp)
void SetControlPointMetersets()
G4int GetStructureNMaxROI() const
G4bool bMaterialsDensity
void MergeCTFiles()
DicomFilePET * thePETFileAll
void MergePETFiles()
void SetStructureNCheck(G4int nsc)
static G4int verbose
G4int GetStructureNCheck() const
void AddMaterial(std::vector< G4String > data)
G4String theFileOutName
void ProcessFiles()
void DumpToTextFile()
static DicomFileMgr * GetInstance()
G4int GetCompression() const
G4double Hounsfield2density(Uint32 Hval)
G4String GetFileOutName() const
void AddFile(G4String fComp)
G4int theStructureNMaxROI
DicomFileCT * theCTFileAll
std::vector< DicomFilePlan * > thePlanFiles
void CheckNColumns(std::vector< G4String > wl, size_t vsizeTh)
std::map< G4int, G4double > theCT2Density
void BuildPETActivities()
void BuildCTMaterials()
void SetStructureNMaxROI(G4int nsc)
G4bool IsMaterialsDensity() const
static DicomFileMgr * theInstance
size_t GetMaterialIndexByDensity(G4double density)
void Convert(G4String fFileName)
std::vector< DicomFileStructure * > theStructFiles
std::map< G4double, G4String > theMaterials
void CheckPETSlices()
void CheckCTSlices()
void AddMaterialDensity(std::vector< G4String > data)

Applications | User Support | Publications | Collaboration