castor-GATEMacToGeom/GATERootToCastor questions

Dear Castor users and developers,

I’m trying to reconstruct the data coming from a scanner I simulated with gate (MyScanner.mac).
When I use the castor-GATEMacToGeom the conversion goes fine but I think there is something strange in the converted .geom file (Myscanner.geom):

  1. The .geom file generated by the utility contains the following lines

layers size depth : 12

layers size transaxial : 1.6

layers size axial : 1.6

I think that they should be like this:

crystals size depth : 12

crystals size trans : 1.6

crystals size axial : 1.6

  1. In the .mac file I provided you, the original rsector offset is 61.4 mm from the center of the FOV.

/gate/rsector/placement/setTranslation 61.4 mm

In the .geom file the scanner radius is reported as

scanner radius : 61.4

However, If I understood correctly, the scanner radius should be
61.4- crystals size depth/2.0.

  1. I noticed that the utility doesn’t support the /control/alias statement of GATE is there any plan to implement it?

  2. Minor thing:

When I run the GATERootToCastor utily

./castor-GATERootToCastor -i ~/prova_nick/PointSource_X0_Y0_Z0.root -m ~/MyScanner/MyScanner/example_castor.mac -o ./test-output -s MyScanner

I got this error

0 : /home/nick/MyScanner/MyScanner/example_castor.mac

1 : /home/nick/MyScanner/MyScanner//home/nick/MyScanner/MyScanner/MyScanner/MyScanner_geometry_castor.mac

2 : /home/nick/MyScanner/MyScanner//home/nick/MyScanner/MyScanner/MyScanner/NEMACubePhantom.mac

3 : /home/nick/MyScanner/MyScanner//home/nick/MyScanner/MyScanner/MyScanner/NEMACubeSource.mac

4 : /home/nick/MyScanner/MyScanner//home/nick/MyScanner/MyScanner/MyScanner/MyScanner_digitizer.mac

5 : /home/nick/MyScanner/MyScanner//home/nick/MyScanner/MyScanner/MyScanner/MyScanner_physics_castor.mac

***** GetGATESystemType() → Error : Couldn’t open mac file /home/nick/MyScanner/MyScanner//home/nick/MyScanner/MyScanner/MyScanner/MyScanner_geometry_castor.mac !

***** castor-GATERootToCastor :: GATE system type not found :

This script only supports conversion for cylindricalPET and ecat systems

The system type is recovered from the lines ‘/gate/systems/…’

***** Exit function called. Abort with code 1.

I think that this is due to the path of the file ~/MyScanner/MyScanner/example_castor.mac begin process in a wrong way.

Thank you for your support and best regards

Niccolo’ Camarlinghi

Hi Niccolo,

Thank you for your helpful remarks. The GATE utilities indeed require some corrections and will be patched soon (current month). For the moment, please try the code in the zip file enclosed to this mail which should address point 1) and 2).

For 3), there is no current plan to support aliases. I will look if it is possible to implement it in the next patch though.

  1. seems looks like a path issue indeed. We’ll have a look at it for the next patch. For the moment, absolute patch should work fine.

Best regards,

Thibaut

castor_v1.1.zip (2.15 MB)

Dear Thibaut,

that indeed solved the problem.
I’ll let you know if find some other problems.

best regards and thank you

Niccolò

Dear Thibaut,

I’m still facing some issues using the castor version you sent me:
I simulated with gate an uniform fdg filled cylinder and the PET scanner I sent in my previous email.
I was able to reconstruct it using the following command

./castor-recon -df ~/prova_nick/UniformCylinder_CstrProj.Cdh -fout test_UniformCylinder -it 5:1

but the image (you find in attachment) has some problem (see test_UniformCylinder_it5.png).
I attached all the data I’m using to reconstruct this image:

UniformCylinder_CstrProj.Cdf (you should be able to download it from my google drive )
UniformCylinder_CstrProj.Cdh (in attachment to this email)

MyScanner.geom (the geometry file as produced by the castor version you sent me)

I also wanted to ask you an explanation about the "min angle difference parameter":
is it evaluated using the crystal orientation or using the vector connecting the center of the crystal with the center of the FOV?

Best regards and thank for your support

Niccolo’ Camarlinghi


UniformCylinder_CstrProj.Cdf

test_UniformCylinder_it5.png

MyScanner.geom (1.74 KB)

UniformCylinder_CstrProj.Cdh (236 Bytes)

Dear Thibaut and Castor-users,

I’m sorry to push my email again but I think that it was probably caught in some SPAM filter as it arrived to the mailing list.

Best Regards and thank you for your help

Niccolo’ Camarlinghi

test_UniformCylinder_it5.png

MyScanner.geom (1.74 KB)

UniformCylinder_CstrProj.Cdh (236 Bytes)

Dear Niccolo,

Sorry for the late answer. There were some issues in the calculations of rsector angular position when using a small number of rsectors in the files I sent you. I believe this is the main cause for the issues observed in your image.

Regarding the transaxial min angle difference variable, it is evaluated from the crystal orientations. Some of the artifacts in the reconstructed image could actually come from incorrect float comparison operations linked to this variable.

I attached a corrected version which will hopefully solve your errors.

Best regards, and thanks for helping exposing these bugs !
Thibaut

castor_v1.12.zip (2.15 MB)

Dear Thibaut,

I think the reconstruction is working now.
Thank you for your work.

Best Regards

Niccolo’