[Castor-users] Loss of TOF precision after converting ROOT to TXT
tmerlin
Thibaut.Merlin at univ-brest.fr
Wed Apr 28 18:39:25 CEST 2021
Hi Zipai,
I didn't look into details, but it appears to be a float/double issue,
or a precision problem when you write your txt file.
Maybe you could set the precision of the value in the output txt file in
your c++ script with /std::setprecision(x)/.
Hope this helps,
Thibaut
On 26/04/2021 17:56, Zipai Wang wrote:
> Dear CASToR developers and users
>
> I am post-processing the root list-mode data generated from the GATE
> simulation and reconstructing it using the CASToR. First I convert the
> ROOT to TXT, after the post-processing, I convert the TXT back to ROOT
> for the reconstruction. Most of the things went well, and the image
> can be successfully reconstructed by CASToR.
>
> However, recently I am trying to add TOF in the recon, but soon
> realize that the txt file converted from ROOT has a lower TOF data
> precision. I have output the .dat file from GATE directly for a
> comparison: For example, In the txt file converted from ROOT, I got
> TOF = 4.83994e-06 for eventID 30. In .dat, I got TOF =
> 4.83994034373751110439431e-06 for the same event.
>
> The loss of precision basically ruined the image since every event got
> the same time difference. Although I can bypass the loss of precision
> during the root to txt by using the .dat files, I am worrying that the
> same thing will happen again when I convert txt back to ROOT.
>
> Apologize that I am very new to c programming and ROOT. I attached the
> converting code I am currently using. May someone point out where is
> the problem, please. Thank you very much for your attention,
> appreciate it!
>
>
>
> Cheers!
> --
> Zipai Wang
> Biomedical Engineering PhD student
> Stony Brook University
>
> _______________________________________________
> Castor-users mailing list
> Castor-users at lists.castor-project.org
> https://lists.castor-project.org/mailman/listinfo/castor-users
>
> To look for something in the mailing-list archives, use the search box at:
> https://castor-project.org/mailing-list
--
Thibaut MERLIN -- PhD
Docteur en Imagerie Médicale au Laboratoire de Traitement de l'Information Medicale (LaTIM - INSERM UMR 1101)
Institut Brestois de recherche en Bio-Santé (IBRBS)
12 Avenue Foch, 29200 Brest, FRANCE
Tel: 06.75.12.24.90
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.castor-project.org/pipermail/castor-users/attachments/20210428/64792bca/attachment-0001.html>
More information about the Castor-users
mailing list