About the data converter

Hello everyone
I’m learning the use of castor, and I want to convert our own defined experimental data into castor’s data format, but I don’t know where to modify it. I found on the official website that castor provides some manufacturers’ data format conversion tools, but does not provide the source code, can someone tell me where the source code can be obtained? I would appreciate for any help.

Hi,
We can’t provide the converter source code as they usually have been developed through collaboration with the manufacturer. Besides they require some manufacturer tools such as e7tools or GE PET toolbox to get the raw data in the right format before conversion.
The sections 5 & 6 of the main documentation describe how the geometry and data of your system must be organized for the software. Let us know if you have any questions. Also castor-PETScannerLutEx and castor-datafileConversionEx located in the toolkit directory propose some small code snippets to help building a geometry LUT or a CASToR datafile using the software functions. They are highly improvables, but hopefully could help getting the work done.

Best,
Thibaut

Hi,
Thanks for your reply, I think I have some ideas about it.

Dear,
Where can I find the code for the data format defined by castor? The description of the data format in the user manual doesn’t seem to match the calculation of the event size I found in the source code(iDataFilePET.cc). I would be grateful for any reply.

Hi,
The event size is defined in iDataFilePET::ComputeSizeEvent().
It will vary depending on the flag(s) in the datafile header and the custom data float type (FLTNBDATA) if it was modified (4 bytes by default).