32 #include "dcmtk/dcmdata/dcfilefo.h"
33 #include "dcmtk/dcmdata/dcdeftag.h"
34 #include "dcmtk/dcmdata/dcpixel.h"
35 #include "dcmtk/dcmdata/dcpxitem.h"
36 #include "dcmtk/dcmdata/dcpixseq.h"
37 #include "dcmtk/dcmrt/drtimage.h"
59 (
"Compression factor = " + std::to_string(fCompress)
60 +
" has to be a divisor of Number of voxels X = " + std::to_string(
fNoVoxelX)
61 +
" and Y " + std::to_string(
fNoVoxelY)).c_str());
66 for(
int ir = 0; ir <
fNoVoxelY; ir += fCompress ) {
67 for(
int ic = 0; ic <
fNoVoxelX; ic += fCompress ) {
69 int isumrMax =
std::min(ir+fCompress,fNoVoxelY);
70 int isumcMax =
std::min(ic+fCompress,fNoVoxelX);
71 for(
int isumr = ir; isumr < isumrMax; isumr ++ ) {
72 for(
int isumc = ic; isumc < isumcMax; isumc ++ ) {
76 meanHV /= (isumrMax-ir)*(isumcMax-ic);
91 for(
int ir = 0; ir <
fNoVoxelY/fCompress; ir++ ) {
92 for(
int ic = 0; ic <
fNoVoxelX/fCompress; ic++ ) {
94 if( ic !=
fNoVoxelX/fCompress-1) fout <<
" ";
95 if( copyNo%8 == 7 ) fout <<
G4endl;
98 if( copyNo%8 != 0 ) fout <<
G4endl;
G4int GetCompression() const
void DumpActivitiesToTextFile(std::ofstream &fout)
std::vector< size_t > fActivities
std::vector< int > fHounsfieldV
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
DicomFileMgr * theFileMgr
G4GLOB_DLL std::ostream G4cout
T min(const T t1, const T t2)
brief Return the smallest of the two arguments