[gate-users] ASCII File format
D.J. van der Laan
d.j.vanderlaan at tnw.tudelft.nl
Thu May 26 09:02:25 CEST 2005
Hi Graeme,
This helps. Thanks!
Jan
Graeme O'Keefe wrote:
> Hi Jan,
>
> I am writing a sorter at the moment to convert gate ASCII output to
> Philips UGM format sinograms.
>
> I have the sinogram storage sorted out but a small problem with the
> (xPosA, xPosB) mapping to (rho, phi).
>
> Maybe someone has done it already, if not, it may be of use to some
> people out there, I'll let you know when I've 'sorted' it out.
>
> I had the same problem with the ASCII output for cylindrical PET, here
> is what I found.
>
> In GateCoincidenceDigi.cc, you will find:
> # GateCoicidenceDigi.cc
> #std::ofstream& operator<<(std::ofstream& flux, GateCoincidenceDigi* digi)
> #{
> # GatePulse pulse;
> # for (G4int iP=0; iP<2; iP++) {
> # pulse = digi->GetPulse(iP);
> # flux
> #1 << " " << std::setw(7) << pulse.GetRunID()
> #2 << " " << std::setw(7) << pulse.GetEventID()
> #3 << " " << std::setw(5) << pulse.GetSourceID()
> #4 << " " << std::resetiosflags(std::ios::floatfield) <<
> std::setiosflags(std::ios::scientific) << std::setprecision(3) <<
> pulse.GetSourcePosition().x()/mm
> #5 << " " << std::resetiosflags(std::ios::floatfield) <<
> std::setiosflags(std::ios::scientific) << std::setprecision(3) <<
> pulse.GetSourcePosition().y()/mm
> #6 << " " << std::resetiosflags(std::ios::floatfield) <<
> std::setiosflags(std::ios::scientific) << std::setprecision(3) <<
> pulse.GetSourcePosition().z()/mm
> #7 << " " << std::resetiosflags(std::ios::floatfield) <<
> std::setiosflags(std::ios::scientific) << std::setprecision(23) <<
> pulse.GetTime()/s
> #8 << " " << std::resetiosflags(std::ios::floatfield) <<
> std::setiosflags(std::ios::scientific) << std::setprecision(3) <<
> pulse.GetEnergy()/MeV
> #9 << " " << std::resetiosflags(std::ios::floatfield) <<
> std::setiosflags(std::ios::scientific) << std::setprecision(3) <<
> pulse.GetGlobalPos().x()/mm
> #10 << " " << std::resetiosflags(std::ios::floatfield) <<
> std::setiosflags(std::ios::scientific) << std::setprecision(3) <<
> pulse.GetGlobalPos().y()/mm
> #11 << " " << std::resetiosflags(std::ios::floatfield) <<
> std::setiosflags(std::ios::scientific) << std::setprecision(3) <<
> pulse.GetGlobalPos().z()/mm
> #12-17 << " " << std::setw(5) << pulse.GetOutputVolumeID()
> #18 << " " << std::setw(5) << pulse.GetNPhantomCompton()
> #19 << " " << std::setw(5) << pulse.GetNCrystalCompton()
> #20 << " " << std::setw(5) << pulse.GetNPhantomRayleigh()
> #21 << " " << std::setw(5) << pulse.GetNCrystalRayleigh()
> #22 << " " << std::resetiosflags(std::ios::floatfield) <<
> std::setiosflags(std::ios::scientific) << std::setprecision(3) <<
> pulse.GetScannerPos().z()/mm
> #23 << " " << std::resetiosflags(std::ios::floatfield) <<
> std::setiosflags(std::ios::scientific) << std::setprecision(3) <<
> pulse.GetScannerRotAngle()/deg;
> # }
>
> So for two pulses for a coin => 46 columns, the extra two columns per
> pulse being from the Rayleigh events.
> Four columns additional to documentation from Rayleigh scattering,
> columns 20, 21, 43, 44
>
> Likewise, the singles ASCII format is different from the documented
> singles ASCII format.
>
> In GateSingleDigi.cc, you will find:
> #GateSingleDigi.cc
> #std::ofstream& operator<<(std::ofstream& flux, GateSingleDigi* digi)
> #{ flux
> #1 << " " << std::setw(7) << digi->GetRunID()
> #2 << " " << std::setw(7) << digi->GetEventID()
> #3 << " " << std::setw(5) << digi->GetSourceID()
> #4 << " " << std::resetiosflags(std::ios::floatfield) <<
> std::setiosflags(std::ios::scientific) << std::setw(10) <<
> std::setprecision(3) << digi->GetSourcePosition().x()/mm
> #5 << " " << std::resetiosflags(std::ios::floatfield) <<
> std::setiosflags(std::ios::scientific) << std::setw(10) <<
> std::setprecision(3) << digi->GetSourcePosition().y()/mm
> #6 << " " << std::resetiosflags(std::ios::floatfield) <<
> std::setiosflags(std::ios::scientific) << std::setw(10) <<
> std::setprecision(3) << digi->GetSourcePosition().z()/mm
> #7-12 << " " << std::setw(5) << digi->GetOutputVolumeID()
> #13 << " " << std::resetiosflags(std::ios::floatfield) <<
> std::setiosflags(std::ios::scientific) << std::setw(30) <<
> std::setprecision(23) << digi->GetTime()/s
> #14 << " " << std::resetiosflags(std::ios::floatfield) <<
> std::setiosflags(std::ios::scientific) << std::setw(10) <<
> std::setprecision(3) << digi->GetEnergy()/MeV
> #15 << " " << std::resetiosflags(std::ios::floatfield) <<
> std::setiosflags(std::ios::scientific) << std::setw(10) <<
> std::setprecision(3) << digi->GetGlobalPos().x()/mm
> #16 << " " << std::resetiosflags(std::ios::floatfield) <<
> std::setiosflags(std::ios::scientific) << std::setw(10) <<
> std::setprecision(3) << digi->GetGlobalPos().y()/mm
> #17 << " " << std::resetiosflags(std::ios::floatfield) <<
> std::setiosflags(std::ios::scientific) << std::setw(10) <<
> std::setprecision(3) << digi->GetGlobalPos().z()/mm
> #18 << " " << std::setw(4) << digi->GetNPhantomCompton()
> #19 << " " << std::setw(4) << digi->GetNCrystalCompton()
> #20 << " " << std::setw(4) << digi->GetNPhantomRayleigh()
> #21 << " " << std::setw(4) << digi->GetNCrystalRayleigh()
> #22 << " " << digi->GetComptonVolumeName()
> #23 << " " << digi->GetRayleighVolumeName()
> # << G4endl;
>
> There are an additional three columns for Rayleigh scattering
> information, column 20, 21 & 23.
>
> Hope this helps?
>
> regards,
>
> Graeme
>
>
> Graeme O'Keefe
> Centre for PET
> Austin Hospital
> Tel: (613)-9496-5767
> Fax: (613) 9458-5023
>
>
> On 25/05/2005, at 5:49 PM, D.J. van der Laan wrote:
>
>>
>> I have a problem with the meaning of the columns in the coincidence
>> ASCII output. According to the manual and the FAQ the number of
>> columns in de coincidence file should be 42 for the cylindricalPET
>> system, but the files Gate produces have 46 columns. When looking at
>> the file I suspect that there are not 6 volume ID's per event, but 8.
>> Is this correct?
>>
>> Thanks,
>> Jan
>>
>>
>> --
>> D.J. van der Laan
>> Delft University of Technology
>> Mekelweg 15, room 2.00.020
>> 2629 JB Delft
>> The Netherlands
>>
>> E: d.j.vanderlaan at tnw.tudelft.nl
>> T: +31 15 2783776
>> F: +31 15 2789011
>> _______________________________________________
>> gate-users mailing list
>> gate-users at lphe1pet1.epfl.ch
>> http://lphe1pet1.epfl.ch/mailman/listinfo/gate-users
>>
>>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gate-users mailing list
> gate-users at lphe1pet1.epfl.ch
> http://lphe1pet1.epfl.ch/mailman/listinfo/gate-users
--
D.J. van der Laan
Delft University of Technology
Mekelweg 15, room 2.00.020
2629 JB Delft
The Netherlands
E: d.j.vanderlaan at tnw.tudelft.nl
T: +31 15 2783776
F: +31 15 2789011
More information about the Gate-users
mailing list