DICOM: Copy No. to (x,y,z)
2010. 7. 19. 16:06ㆍmemo
const G4double NSlice=(NVoxelX)*(NVoxelY);
if( DoseDeposit && DoseDeposit->GetMap()->size() != 0 ) {
std::ostream *myout = &G4cout;
PrintHeader(myout);
std::map<G4int,G4double*>::
iterator itr = DoseDeposit->GetMap()->begin();
for(; itr != DoseDeposit->GetMap()->end(); itr++) {
G4int Slice= int(itr->first/NSlice)+1;
G4double Z=(2.*Slice-1.)*HalfZ-HalfZ*NVoxelZ;
G4double NXYef=itr->first-(Slice-1)*NSlice;
G4double NY= int(NXYef/NVoxelX);
G4double Y=(NY+0.5)*(HalfY*2.)-HalfY*NVoxelY;
G4double NX= NXYef-NY*NVoxelX;
G4double X= (NX+0.5)*(HalfX*2.)-HalfX*NVoxelX;
fileout << " " << itr->first << " " << std::setprecision(6) << X << " " << Y << " " << Z << " " << *(itr->second) << G4endl;
}
if( DoseDeposit && DoseDeposit->GetMap()->size() != 0 ) {
std::ostream *myout = &G4cout;
PrintHeader(myout);
std::map<G4int,G4double*>::
for(; itr != DoseDeposit->GetMap()->end(); itr++) {
G4int Slice= int(itr->first/NSlice)+1;
G4double Z=(2.*Slice-1.)*HalfZ-HalfZ*
G4double NXYef=itr->first-(Slice-1)*
G4double NY= int(NXYef/NVoxelX);
G4double Y=(NY+0.5)*(HalfY*2.)-HalfY*
G4double NX= NXYef-NY*NVoxelX;
G4double X= (NX+0.5)*(HalfX*2.)-HalfX*
fileout << " " << itr->first << " " << std::setprecision(6) << X << " " << Y << " " << Z << " " << *(itr->second) << G4endl;
}
*credit goes to Oscar Garcia