Hi,
I am trying to develop my own converter for converting some sinogram data I have into CASToR histogram format. I am using the example code “castor-datafileConversionEx.cc” as a guide. This is my understanding of how the histogram format works please correct me if I am wrong.
I have a sinogram of size nbins x nangles x nplns x nTOF. Here nbins is the number of bins, nangles is the number of angles, nplns is the number of planes, and nTOFis the number of TOF bins. To convert this into CASToR histogram format each bin, angle, and plane in the sinogram corresponds to a certain ring pair that forms that particular LOR. Once we determine what the crystal ring pair is for a provided bin, angle, and plane we populate the TOF bins in the histogram file with whatever value they have in the sinogram.
There are two problems that I am running into
- I cannot change the number of TOF bins. The header file always has 1 bin. I tried changing the TOF bin in the source code which resulted in the header file and the output file having the correct number of TOF bins but still the reconstructed image is empty. Is there a way I can set the number of TOF bins in the converter and not change the source code?
- If I add scatter information in the file it always overwrites some of the TOF information. I have checked if the data types are correct (they seem to be).
I would really appreciate any help with regard to this.
Thanks,
Mohammad Syed