Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
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;
45 
47 {
48 public:
49  static DicomFileMgr* GetInstance();
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();
80  theStructureNCheck = nsc;
81  }
83  return theStructureNCheck;
84  }
86  theStructureNMaxROI = nsc;
87  }
89  return theStructureNMaxROI;
90  }
92  return fCompression;
93  }
95  return theFileOutName;
96  }
97 
100  return bMaterialsDensity;
101  }
102 
103 protected:
105 
106 private:
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 
124 public:
125  static int verbose;
127 };
128 
129 #endif
void BuildPETActivities()
G4int GetStructureNCheck() const
Definition: DicomFileMgr.hh:82
void CheckPETSlices()
G4int theStructureNMaxROI
static DicomFileMgr * GetInstance()
Definition: DicomFileMgr.cc:41
static DicomFileMgr * theInstance
void SetCompression(G4String fComp)
void CheckCTSlices()
G4int GetCompression() const
Definition: DicomFileMgr.hh:91
size_t GetMaterialIndex(G4double Hval)
static int verbose
G4String GetFileOutName() const
Definition: DicomFileMgr.hh:94
std::map< G4double, G4String > theMaterialsDensity
void Convert(G4String fFileName)
Definition: DicomFileMgr.cc:59
DicomFilePET * thePETFileAll
void ProcessFiles()
G4int theStructureNCheck
void MergeCTFiles()
void AddMaterialDensity(std::vector< G4String > data)
const XML_Char const XML_Char * data
Definition: expat.h:268
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
size_t GetMaterialIndexByDensity(G4double density)
std::map< G4double, G4String > theMaterials
void DumpToTextFile()
VerbLevel
Definition: DicomFileMgr.hh:43
std::vector< DicomFileStructure * > GetStructFiles() const
Definition: DicomFileMgr.hh:56
G4int fCompression
void AddFile(G4String fComp)
G4double Hounsfield2density(Uint32 Hval)
void SetControlPointMetersets()
int G4int
Definition: G4Types.hh:78
std::map< G4double, DicomFileCT * > mdct
Definition: DicomFileMgr.hh:38
std::map< G4double, DicomFilePET * > mdpet
Definition: DicomFileMgr.hh:42
void AddCT2Density(std::vector< G4String > data)
std::map< G4int, G4double > theCT2Density
G4String theFileOutName
std::vector< DicomFileStructure * > theStructFiles
G4bool bMaterialsDensity
void SetStructureNCheck(G4int nsc)
Definition: DicomFileMgr.hh:79
G4int GetStructureNMaxROI() const
Definition: DicomFileMgr.hh:88
std::vector< DicomFilePlan * > thePlanFiles
void AddMaterial(std::vector< G4String > data)
void MergePETFiles()
void CheckNColumns(std::vector< G4String > wl, size_t vsizeTh)
void BuildCTMaterials()
G4bool IsMaterialsDensity() const
Definition: DicomFileMgr.hh:99
DicomFileCT * theCTFileAll
void SetStructureNMaxROI(G4int nsc)
Definition: DicomFileMgr.hh:85