Message: Re: DICOM: CONVERT NoCOPY TO X,Y,Z COORDINATES Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Re: DICOM: CONVERT NoCOPY TO X,Y,Z COORDINATES  

Forum: Medical Applications
Re: Question DICOM: CONVERT NoCOPY TO X,Y,Z COORDINATES (Oscar García)
Re: Feedback Re: DICOM: CONVERT NoCOPY TO X,Y,Z COORDINATES (Pedro Arce)
Re: Question Re: DICOM: CONVERT NoCOPY TO X,Y,Z COORDINATES (Oscar García)
Re: Feedback Re: DICOM: CONVERT NoCOPY TO X,Y,Z COORDINATES (Pedro Arce)
Date: 19 May, 2010
From: Oscar García <Oscar García>

Hi Pedro, thanks!:

I have been thinking in to do something like this in order to convert the NoCopy to (x,y,z) coordinates in the DicomRunAction class and export it to dicom.out:

    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; 
 } 

It should generates a file with columns NoCopy, X, Y, Z, Dose.

Thank you very much.

Oscar

 Add Message Add Message
to: "Re: DICOM: CONVERT NoCOPY TO X,Y,Z COORDINATES "

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]