ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DicomFileMgr Class Reference

#include <geant4/tree/geant4-10.6-release/examples/extended/medical/DICOM/dicomReader/include/DicomFileMgr.hh>

+ Collaboration diagram for DicomFileMgr:

Public Member Functions

 ~DicomFileMgr ()
 
std::vector< DicomFileStructure * > GetStructFiles () const
 
void SetCompression (G4String fComp)
 
void AddFile (G4String fComp)
 
void AddMaterial (std::vector< G4String > data)
 
void AddMaterialDensity (std::vector< G4String > data)
 
void AddCT2Density (std::vector< G4String > data)
 
void Convert (G4String fFileName)
 
void CheckNColumns (std::vector< G4String > wl, size_t vsizeTh)
 
void ProcessFiles ()
 
void CheckCTSlices ()
 
G4double Hounsfield2density (Uint32 Hval)
 
size_t GetMaterialIndex (G4double Hval)
 
size_t GetMaterialIndexByDensity (G4double density)
 
void BuildCTMaterials ()
 
void MergeCTFiles ()
 
void CheckPETSlices ()
 
void BuildPETActivities ()
 
void MergePETFiles ()
 
void DumpToTextFile ()
 
void SetStructureNCheck (G4int nsc)
 
G4int GetStructureNCheck () const
 
void SetStructureNMaxROI (G4int nsc)
 
G4int GetStructureNMaxROI () const
 
G4int GetCompression () const
 
G4String GetFileOutName () const
 
void SetControlPointMetersets ()
 
G4bool IsMaterialsDensity () const
 

Static Public Member Functions

static DicomFileMgrGetInstance ()
 

Public Attributes

G4bool bMaterialsDensity
 

Static Public Attributes

static int verbose = 1
 

Protected Attributes

G4int fCompression
 

Private Member Functions

 DicomFileMgr ()
 

Private Attributes

G4String theFileOutName
 
mdct theCTFiles
 
std::vector< DicomFileStructure * > theStructFiles
 
std::vector< DicomFilePlan * > thePlanFiles
 
mdpet thePETFiles
 
std::map< G4double, G4StringtheMaterials
 
std::map< G4double, G4StringtheMaterialsDensity
 
std::map< G4int, G4doubletheCT2Density
 
DicomFileCTtheCTFileAll
 
DicomFilePETthePETFileAll
 
G4int theStructureNCheck
 
G4int theStructureNMaxROI
 

Static Private Attributes

static DicomFileMgrtheInstance = 0
 

Detailed Description

Definition at line 46 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 46 of file DicomFileMgr.hh

Constructor & Destructor Documentation

DicomFileMgr::~DicomFileMgr ( )
inline

Definition at line 50 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 50 of file DicomFileMgr.hh

DicomFileMgr::DicomFileMgr ( )
private

Definition at line 50 of file DicomFileMgr.cc.

View newest version in sPHENIX GitHub at line 50 of file DicomFileMgr.cc

References fCompression, theCTFileAll, theStructureNCheck, and theStructureNMaxROI.

Referenced by GetInstance().

+ Here is the caller graph for this function:

Member Function Documentation

void DicomFileMgr::AddCT2Density ( std::vector< G4String data)

Definition at line 209 of file DicomFileMgr.cc.

View newest version in sPHENIX GitHub at line 209 of file DicomFileMgr.cc

References G4UIcommand::ConvertToDouble(), G4UIcommand::ConvertToInt(), G4cout, G4endl, and theCT2Density.

Referenced by Convert().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void DicomFileMgr::AddFile ( G4String  fComp)

Definition at line 128 of file DicomFileMgr.cc.

View newest version in sPHENIX GitHub at line 128 of file DicomFileMgr.cc

References FatalErrorInArgument, FatalException, G4Exception(), DicomVFileImage::GetMaxZ(), DicomVFileImage::ReadData(), DicomFileStructure::ReadData(), DicomFilePlan::ReadData(), DicomVFile::SetFileName(), theCTFiles, thePETFiles, thePlanFiles, and theStructFiles.

Referenced by Convert().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void DicomFileMgr::AddMaterial ( std::vector< G4String data)

Definition at line 183 of file DicomFileMgr.cc.

View newest version in sPHENIX GitHub at line 183 of file DicomFileMgr.cc

References bMaterialsDensity, G4UIcommand::ConvertToDouble(), FatalException, G4Exception(), and theMaterials.

Referenced by Convert().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void DicomFileMgr::AddMaterialDensity ( std::vector< G4String data)

Definition at line 196 of file DicomFileMgr.cc.

View newest version in sPHENIX GitHub at line 196 of file DicomFileMgr.cc

References bMaterialsDensity, G4UIcommand::ConvertToDouble(), FatalException, G4Exception(), and theMaterialsDensity.

Referenced by Convert().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void DicomFileMgr::BuildCTMaterials ( )

Definition at line 507 of file DicomFileMgr.cc.

View newest version in sPHENIX GitHub at line 507 of file DicomFileMgr.cc

References G4cout, G4endl, and theCTFiles.

Referenced by ProcessFiles().

+ Here is the caller graph for this function:

void DicomFileMgr::BuildPETActivities ( )

Definition at line 517 of file DicomFileMgr.cc.

View newest version in sPHENIX GitHub at line 517 of file DicomFileMgr.cc

References G4cout, G4endl, and thePETFiles.

Referenced by ProcessFiles().

+ Here is the caller graph for this function:

void DicomFileMgr::CheckCTSlices ( )

Definition at line 344 of file DicomFileMgr.cc.

View newest version in sPHENIX GitHub at line 344 of file DicomFileMgr.cc

References E, G4cerr, G4cout, G4endl, DicomVFileImage::GetLocation(), DicomVFileImage::GetMaxZ(), DicomVFileImage::GetMinZ(), one, DicomVFileImage::SetMaxZ(), DicomVFileImage::SetMinZ(), theCTFiles, and two.

Referenced by ProcessFiles().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void DicomFileMgr::CheckNColumns ( std::vector< G4String wl,
size_t  vsizeTh 
)

Definition at line 103 of file DicomFileMgr.cc.

View newest version in sPHENIX GitHub at line 103 of file DicomFileMgr.cc

References FatalErrorInArgument, G4cerr, G4endl, G4Exception(), and nlohmann::to_string().

Referenced by Convert().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void DicomFileMgr::CheckPETSlices ( )

Definition at line 425 of file DicomFileMgr.cc.

View newest version in sPHENIX GitHub at line 425 of file DicomFileMgr.cc

References E, G4cerr, G4cout, G4endl, DicomVFileImage::GetLocation(), DicomVFileImage::GetMaxZ(), DicomVFileImage::GetMinZ(), one, DicomVFileImage::SetMaxZ(), DicomVFileImage::SetMinZ(), thePETFiles, and two.

Referenced by ProcessFiles().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void DicomFileMgr::Convert ( G4String  fFileName)

Definition at line 59 of file DicomFileMgr.cc.

View newest version in sPHENIX GitHub at line 59 of file DicomFileMgr.cc

References AddCT2Density(), AddFile(), AddMaterial(), AddMaterialDensity(), CheckNColumns(), FatalErrorInArgument, fin, G4cout, G4endl, G4Exception(), G4tgrFileIn::GetInstance(), G4tgrFileIn::GetWordsInLine(), ProcessFiles(), SetCompression(), and theFileOutName.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void DicomFileMgr::DumpToTextFile ( )

Definition at line 553 of file DicomFileMgr.cc.

View newest version in sPHENIX GitHub at line 553 of file DicomFileMgr.cc

References bMaterialsDensity, DicomVFileImage::DumpHeaderToTextFile(), G4cout, G4endl, GetStructFiles(), theCTFileAll, theCTFiles, theFileOutName, theMaterials, theMaterialsDensity, thePETFileAll, thePETFiles, and thePlanFiles.

Referenced by ProcessFiles().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4int DicomFileMgr::GetCompression ( ) const
inline

Definition at line 91 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 91 of file DicomFileMgr.hh

References fCompression.

Referenced by DicomFilePET::BuildActivities(), DicomFileCT::BuildMaterials(), DicomFileCT::BuildStructureIDs(), DicomFilePET::DumpActivitiesToTextFile(), DicomFileCT::DumpDensitiesToTextFile(), DicomVFileImage::DumpHeaderToTextFile(), DicomFileCT::DumpMateIDsToTextFile(), DicomFileCT::DumpStructureIDsToTextFile(), and DicomVFileImage::Print().

+ Here is the caller graph for this function:

G4String DicomFileMgr::GetFileOutName ( ) const
inline

Definition at line 94 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 94 of file DicomFileMgr.hh

References theFileOutName.

Referenced by DicomDetectorConstruction::ReadPhantomDataNew().

+ Here is the caller graph for this function:

DicomFileMgr * DicomFileMgr::GetInstance ( void  )
static

Definition at line 41 of file DicomFileMgr.cc.

View newest version in sPHENIX GitHub at line 41 of file DicomFileMgr.cc

References DicomFileMgr(), and theInstance.

Referenced by DicomFileCT::BuildStructureIDs(), DicomVFileImage::DicomVFileImage(), main(), and DicomDetectorConstruction::ReadPhantomDataNew().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

size_t DicomFileMgr::GetMaterialIndex ( G4double  Hval)

Definition at line 272 of file DicomFileMgr.cc.

View newest version in sPHENIX GitHub at line 272 of file DicomFileMgr.cc

References FatalException, G4Exception(), theMaterials, and nlohmann::to_string().

Referenced by DicomFileCT::BuildMaterials().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

size_t DicomFileMgr::GetMaterialIndexByDensity ( G4double  density)

Definition at line 292 of file DicomFileMgr.cc.

View newest version in sPHENIX GitHub at line 292 of file DicomFileMgr.cc

References FatalException, G4Exception(), theMaterialsDensity, and nlohmann::to_string().

Referenced by DicomFileCT::BuildMaterials().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::vector<DicomFileStructure*> DicomFileMgr::GetStructFiles ( ) const
inline

Definition at line 56 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 56 of file DicomFileMgr.hh

References theStructFiles.

Referenced by DicomFileCT::BuildStructureIDs(), DicomFileCT::DumpStructureIDsToTextFile(), and DumpToTextFile().

+ Here is the caller graph for this function:

G4int DicomFileMgr::GetStructureNCheck ( ) const
inline

Definition at line 82 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 82 of file DicomFileMgr.hh

References theStructureNCheck.

Referenced by DicomFileCT::BuildStructureIDs().

+ Here is the caller graph for this function:

G4int DicomFileMgr::GetStructureNMaxROI ( ) const
inline

Definition at line 88 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 88 of file DicomFileMgr.hh

References theStructureNMaxROI.

Referenced by DicomFileCT::BuildStructureIDs().

+ Here is the caller graph for this function:

G4double DicomFileMgr::Hounsfield2density ( Uint32  Hval)

Definition at line 217 of file DicomFileMgr.cc.

View newest version in sPHENIX GitHub at line 217 of file DicomFileMgr.cc

References FatalException, G4Exception(), theCT2Density, and nlohmann::to_string().

Referenced by DicomFileCT::BuildMaterials().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4bool DicomFileMgr::IsMaterialsDensity ( ) const
inline

Definition at line 99 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 99 of file DicomFileMgr.hh

References bMaterialsDensity.

Referenced by DicomFileCT::BuildMaterials().

+ Here is the caller graph for this function:

void DicomFileMgr::MergeCTFiles ( )

Definition at line 527 of file DicomFileMgr.cc.

View newest version in sPHENIX GitHub at line 527 of file DicomFileMgr.cc

References G4cout, G4endl, theCTFileAll, and theCTFiles.

Referenced by ProcessFiles().

+ Here is the caller graph for this function:

void DicomFileMgr::MergePETFiles ( )

Definition at line 540 of file DicomFileMgr.cc.

View newest version in sPHENIX GitHub at line 540 of file DicomFileMgr.cc

References G4cout, G4endl, thePETFileAll, and thePETFiles.

Referenced by ProcessFiles().

+ Here is the caller graph for this function:

void DicomFileMgr::ProcessFiles ( )

Definition at line 311 of file DicomFileMgr.cc.

View newest version in sPHENIX GitHub at line 311 of file DicomFileMgr.cc

References BuildCTMaterials(), BuildPETActivities(), CheckCTSlices(), CheckPETSlices(), DumpToTextFile(), G4cout, G4endl, G4Exception(), JustWarning, MergeCTFiles(), MergePETFiles(), theCTFiles, and thePETFiles.

Referenced by Convert().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void DicomFileMgr::SetCompression ( G4String  fComp)

Definition at line 122 of file DicomFileMgr.cc.

View newest version in sPHENIX GitHub at line 122 of file DicomFileMgr.cc

References G4UIcommand::ConvertToDouble(), and fCompression.

Referenced by Convert().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void DicomFileMgr::SetControlPointMetersets ( )
void DicomFileMgr::SetStructureNCheck ( G4int  nsc)
inline

Definition at line 79 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 79 of file DicomFileMgr.hh

References theStructureNCheck.

void DicomFileMgr::SetStructureNMaxROI ( G4int  nsc)
inline

Definition at line 85 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 85 of file DicomFileMgr.hh

References theStructureNMaxROI.

Member Data Documentation

G4bool DicomFileMgr::bMaterialsDensity

Definition at line 126 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 126 of file DicomFileMgr.hh

Referenced by AddMaterial(), AddMaterialDensity(), DumpToTextFile(), and IsMaterialsDensity().

G4int DicomFileMgr::fCompression
protected

Definition at line 104 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 104 of file DicomFileMgr.hh

Referenced by DicomFileMgr(), GetCompression(), and SetCompression().

std::map<G4int,G4double> DicomFileMgr::theCT2Density
private

Definition at line 117 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 117 of file DicomFileMgr.hh

Referenced by AddCT2Density(), and Hounsfield2density().

DicomFileCT* DicomFileMgr::theCTFileAll
private

Definition at line 119 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 119 of file DicomFileMgr.hh

Referenced by DicomFileMgr(), DumpToTextFile(), and MergeCTFiles().

mdct DicomFileMgr::theCTFiles
private

Definition at line 111 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 111 of file DicomFileMgr.hh

Referenced by AddFile(), BuildCTMaterials(), CheckCTSlices(), DumpToTextFile(), MergeCTFiles(), and ProcessFiles().

G4String DicomFileMgr::theFileOutName
private

Definition at line 109 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 109 of file DicomFileMgr.hh

Referenced by Convert(), DumpToTextFile(), and GetFileOutName().

DicomFileMgr * DicomFileMgr::theInstance = 0
staticprivate

Definition at line 107 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 107 of file DicomFileMgr.hh

Referenced by GetInstance().

std::map<G4double,G4String> DicomFileMgr::theMaterials
private

Definition at line 115 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 115 of file DicomFileMgr.hh

Referenced by AddMaterial(), DumpToTextFile(), and GetMaterialIndex().

std::map<G4double,G4String> DicomFileMgr::theMaterialsDensity
private

Definition at line 116 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 116 of file DicomFileMgr.hh

Referenced by AddMaterialDensity(), DumpToTextFile(), and GetMaterialIndexByDensity().

DicomFilePET* DicomFileMgr::thePETFileAll
private

Definition at line 120 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 120 of file DicomFileMgr.hh

Referenced by DumpToTextFile(), and MergePETFiles().

mdpet DicomFileMgr::thePETFiles
private

Definition at line 114 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 114 of file DicomFileMgr.hh

Referenced by AddFile(), BuildPETActivities(), CheckPETSlices(), DumpToTextFile(), MergePETFiles(), and ProcessFiles().

std::vector<DicomFilePlan*> DicomFileMgr::thePlanFiles
private

Definition at line 113 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 113 of file DicomFileMgr.hh

Referenced by AddFile(), and DumpToTextFile().

std::vector<DicomFileStructure*> DicomFileMgr::theStructFiles
private

Definition at line 112 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 112 of file DicomFileMgr.hh

Referenced by AddFile(), and GetStructFiles().

G4int DicomFileMgr::theStructureNCheck
private

Definition at line 121 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 121 of file DicomFileMgr.hh

Referenced by DicomFileMgr(), GetStructureNCheck(), and SetStructureNCheck().

G4int DicomFileMgr::theStructureNMaxROI
private

Definition at line 122 of file DicomFileMgr.hh.

View newest version in sPHENIX GitHub at line 122 of file DicomFileMgr.hh

Referenced by DicomFileMgr(), GetStructureNMaxROI(), and SetStructureNMaxROI().


The documentation for this class was generated from the following files: