PET reconstruction from a binary LUT file

Dear CASToR users,

We are trying to reconstruct PET image from a binary LUT file following the page 21 in the general document. The sensitivity map looks fine but reconstructed images make no sense. We think that there would be a problem regarding to castor ID for each detector (but we are not fully sure).
We currently create a binary LUT file as the for loops (*1) suggested in the document. Does the castor ID for detectors follow the order like (*2)?

Any suggestions/comments are welcome.

Thank you and kind regrads,
Daiki Hayakawa

(*1)
for(iLayer=0;iLayer<NLayer;iLayer++)
for(iRing=0;iRing<NRing;iRing++)
for(iDet=0;iDet<NDet;iDet++) {
fwrite(&Posx[iLayer][iRing][iDet],sizeof(FLTNBLUT),1,fPtr);
fwrite(&Posy[iLayer][iRing][iDet],sizeof(FLTNBLUT),1,fPtr);
fwrite(&Posz[iLayer][iRing][iDet],sizeof(FLTNBLUT),1,fPtr);
fwrite(&OrVx[iLayer][iRing][iDet],sizeof(FLTNBLUT),1,fPtr);
fwrite(&OrVy[iLayer][iRing][iDet],sizeof(FLTNBLUT),1,fPtr);
fwrite(&OrVz[iLayer][iRing][iDet],sizeof(FLTNBLUT),1,fPtr);
}

(2)
for(iLayer=0;iLayer<NLayer;iLayer++)
for(iRing=0;iRing<NRing;iRing++)
for(iDet=0;iDet<NDet;iDet++) {
castorID = iDet + iRing
NDet + lNRingNDet;
}

Hi,

Yes, the order as (*2) is assumed: castorID = iDet + iRing*NDet + iLayer*NRing*NDet;

This ordering is only used to get the crystal dimensions as specified per layer in the header file of the scanner description (to compute the correct depth position in the crystal).
So that if the crystal IDs you write in the datafile to be reconstructed are in agreement with the order of the crystal positions you wrote in the LUT file, the reconstruction should be fine.

As you get a correct sensitivity map, this means that IDs written in the datafile are likely not correct.

Also to be sure, here in your email, I assume that NDet is the number of detectors inside a single ring, not for all the layer. Whereas in the header of the LUT file, this is the total number of crystals per layer which should be provided.

Best
Simon

Hi Simon et al,

Thank you for your kind response (and sorry for my late reply).

We probably performed reconstruction with proper LUT file.
I would like to ask the very low sensitivity on the edges in the sensitivity map(*1). The edges would create weird distributions on the edges in the reconstructed image(*2).
How can we solve this issue? Please note that we don’t have enough statistics and we haven’t applied normalization/attenuation yet.

Thank you again and best regards,
Daiki Hayakawa

(*1) sensitivity map

(*2) reconstructed image (Derenzo phantom)

Hi,

The low sensitivity around the edges is completely normal as the solid angle in PET decreases when you go near the detectors.

If you look at the edges on the horizontal axis, you do not get as weird an activity distribution as near the edges on the vertical axis.
I suppose this is due to the fact that your reconstructed image is smaller in the vertical axis compared to the horizontal axis.

As you suggested:

(1) When you will correct for attenuation, all this "noise" around the phantom will be much lower as the signal from the phantom will be increased much higher than outside the phantom.

(2) Very low statistics can also contribute to weird signal.

But:

(3) Are you reconstructing data that contain scatter and random coincidences without correcting for them ?
In this case, these accidental coincidences may fakely originate from around the phantom, so if you truncate your image too much, then this fake signal may belong to the exterior of the image, so that it will accumulate near the edges of your image. That is normal and this may explain what you get.

As a first suggestion, you should reconstruct an image with the same X and Y dimensions, large enough to include all the signal, including accidental coincidences.

I hope it helps.

Best
Simon