[Castor-users] SPECT reading Interfile

Michael Ljungberg michael.ljungberg at med.lu.se
Tue Apr 18 15:26:20 CEST 2017


Dear Didier

Thank you for your explanation. I think it will not be a major problem to implement. For SPECT reconstructions, does the Time value be clearly defined?

Another related question regards the files for the system. I wonder if it would be possible to allow castor-recon program to first look in the local folder for a geometry file before looking in the standard SYSTEM location? If I implement direct writing to the caster format in the simind program, I can foresee that the SYSTEM folder can be quickly filled with files.  Alternatively, is it possible to add a path to the system name in the cdh file?

Hälsningar / Best regards

Michael


From: Castor-users <castor-users-bounces at lists.castor-project.org> on behalf of Didier Benoit <didier.benoit at inserm.fr>
Date: Tuesday, 18 April 2017 at 14:52
To: "castor-users at lists.castor-project.org" <castor-users at lists.castor-project.org>
Subject: Re: [Castor-users] SPECT reading Interfile

Dear Michael,

Thanks for your interest. Interfile format is only used as input/output format for image (not projection data). As you have seen, input data for SPECT (and also for PET) is composed of 2 files: a header file (*.Cdh) and a binary file (*.Cdf) storing the data from a machine or a Monte Carlo simulation. Here is some information about this Cdf file. This file is not a pure histogram (a successive number of counts by bin). The Data should (must) be arrange as described in the “CASToR general documentation” page 30.

For instance, in the case of a 64x64 float matrix for 64 angles (and I consider you don't have both normalization and scatter informations), your Cdf file should contain 262 144 events (64x64x64) with the following format:

EVENT 0:
time: 0 (uint32_t)
data: 32 (float/double) it's your data for a specific bin
projection ID: 0 (uint32_t) it's the angle ID between 0 and 63 in this example
binID: 0 (uint32_t) it's the bin ID between 0 and (64x64 – 1) in this example

We don't provide a SPECT/PET data converter, but the easiest way to create a correct Cdf file (I consider you are using C/C++) is to create a struct like this:

struct SPECT_CASTOR_EVENT_FORMAT {
   uint32_t     time;
   float          data;
   uint32_t    projectionID;
   uint32_t    binID;
};

and store each bin from your data in the CASToR event format.

Kind Regards,
Didier Benoit

On 04/14/2017 05:34 PM, Michael Ljungberg wrote:
Dear Castor developers

I ran into this release a week ago and it is really a nice contribution you have made. I have been working with Monte Carlo simulations for many years developing the program simind and often I get this question of supplying reconstruction software since simind only produce projections. So being able to direct to your webpage would be natural.

However, I dont understand how to read data into castor-recon. I also use Interfile and float values so when reading in the manual at you are using interfile for both input data and output gave me confidence for a smooth connection. But I dont see how to actual do this. I checked the spect benchmark file but the cdh format is different. So my question is how I can read in for example a 64x64 float matrices for 64 angles stored in a data file and with an associated interfile header file.

Hälsningar / Best regards

Michael Ljungberg
Lund University
Sweden





_______________________________________________

Castor-users mailing list

Castor-users at lists.castor-project.org<mailto:Castor-users at lists.castor-project.org>

http://lists.castor-project.org/listinfo/castor-users



--

-------------------------------------------------------------------------------

Didier BENOIT, PhD,

Laboratoire de Traitement de l'Information Médicale (LaTIM - INSERM UMR 1101)

CHRU Morvan, bâtiment 1, étage 1

5 Avenue Foch

29609 Brest

FRANCE



E-mail:

didier.benoit at univ-brest.fr<mailto:didier.benoit at univ-brest.fr>

didier.benoit at inserm.fr<mailto:didier.benoit at inserm.fr>



Tél: +33 (0)2 98 01 81 96

-------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.castor-project.org/pipermail/castor-users/attachments/20170418/fa815ace/attachment-0001.html>


More information about the Castor-users mailing list