Qusetions for SPECT reconstruction

Dear Castor users,
I am trying to use Castor for the SPECT/CT reconstruction.
I performed GATE simulation to generate a root file with my own voxelized phantom and activity.
I have two questions about using Castor with the root file generated from GATE.

Q1. Before I start Castor, I need to make sure about -conv option.
As far as I know is, psf kernel size is dependent on the position of source (distance between source and detector).
However, in Castor, psf is defined as a constant value with -conv option.
Does Castor ignore the distance dependency of psf? or Is there a way Castor works about psf consideration that I don’t understand?

Q2. As I mentioned above, I am trying to reconstruct an image with root simulation data from GATE.
First, I generated .geom file with the below command:

castor-GATEMacToGem -m my_gate.mac -o SPECT_CASTOR_BENCHMARK

What I modify the my_geom.geom is voxels number transaxial/axial because the value was different than I intended.

Then, I generated cdh/cdf file with below command:

castor-GATERootToCastor -i root.root -o output -m my_gate.mac -s SPECT_CASTOR_BENCHMARK

Actually, I added the “-atn mumap.img” to perform attenuation correction and I got “Estimation of acf from an attenuation image (-atn option) only available for PET systems ! (detected system is SPECT).”
So I exclude -atn option when generating cdf file.

Finally, what I tried to perform reconstruction with attenuation correction was castor-recon execution with the below command:

castor-recon -df output_df.Cdh -opti MLEM -it 5:8 -proj incrementalSiddon -conv gaussin 4,4,3::psf -dim 128,128,128 -vox 3.87,3.87,3.87 -dout test -atn mumap.hdr

but I got an error message as below

Is there anything wrong with my execution?
Could anybody explain how I can perform attenuation correction?

Thank you.

ps. I checked that CT4re_mu2.hdr for attenuation correction was fine .

Hi,
For Q1, indeed the psf kernel depends on a number of factor and might be variant in most situations. At the moment there is only a stationary gaussian model available in castor, sorry for that.
If one would want to implement a non-stationary kernel, the following guide provides some indications regarding the structure of ImageConvolver and which functions to modify: https://castor-project.org/sites/default/files/2020-09/CASToR__image_convolver.pdf

For Q2, attenuation correction for SPECT requires to provide the atn image as the correction factors are computed during reconstruction conversely to PET.
This error occurs when Castor can’t correctly read some interfile fields, here the matrix size [x] tags.
Could you send the header to check what could cause the issue ?

Best,
Thibaut

Thank you tmerlin.

I solved Q2, there is header error as you expected.
I will try a non-stationary kernel that you indicated.

Thank you so much.

Sincerely,

Kim.

Hi, Thibaut,

I carefully read the guide as you suggested.
But actually, I am not familiar with C language.
So could you give me tips or any example source codes to build a non-stationary kernel?
What I want to build is a kernel that has different FWHM according to the distance between COR and detector.
In STIR, someone can select a kernel with a simple linear function of the distance.
That is the exact one what I need.

Thank you.
Best regard.