[Castor-users] SPECT reading Interfile

Michael Ljungberg michael.ljungberg at med.lu.se
Wed Apr 19 16:42:47 CEST 2017


Dear Simon and Didier

Thank you for your comments and information. I have now written a conversion program between simind interfiles and castor and I can reconstruct images :-) . I have a final question for the moment and that concerns the units of the mu map. I assume it is mu (cm-1) for the current photon energy. When I looked at the SPECT benchmark file the average value in a ROI is however, around 0.128 cm-1 instead of 0.154 which is this the linear attenuation coefficient for water. Is this an ‘effective attenuation coefficient map’ with lower values with the purpose of compensate for presence of scatter? I just want to be clear about what values the mu-map should reflect.

Hälsningar / Best regards

Michael


From: Castor-users <castor-users-bounces at lists.castor-project.org> on behalf of Simon Stute <simon.stute at cea.fr>
Date: Tuesday, 18 April 2017 at 17:26
To: "castor-users at lists.castor-project.org" <castor-users at lists.castor-project.org>
Subject: Re: [Castor-users] SPECT reading Interfile

Hello,

The castor configuration folder also contains other configuration files, so it is not only related to the scanner geometries.

However, a third possibility is to copy the whole 'config' folder (it is light) into your working directory, put your geom files inside the 'scanner' sub-folder and then you can use the '-conf ./your_config_folder' option to overload the path of the configuration directory at run-time.

The '-conf' option is described when calling 'castor-recon -help-misc'.

Regards
Simon


Le 18/04/2017 à 17:13, Didier Benoit a écrit :
In our software, we didn't plan to read the .geom files in 2 or more folders. I think you have 2 solutions :

1- You can copy all your .geom files for each different kind of scanners in the CASTOR_CONFIG folder

2- Or creating a "castor_test" folder, where you write all your .geom files (and the .geom files provided by CASToR) and set CASTOR_CONFIG to the location of "castor_test" during the installation.

Kind regards,
Didier

On 04/18/2017 04:36 PM, Michael Ljungberg wrote:
Sorry Didier

I meant the CASTOR_CONFIG folder. That was my question - if it would be possible for your software to search first in the local directory for a scanner name before looking in the CASTOR_CONFIG folder. Sometimes one do simulations as function of different camera geometries and I can then imagine I would need one .geom file for each of them. If the search for the scanner name is first made in the local directory and then in the CASTOR_CONFIG folder then these local .geom files could be isolated from the more permanent scanner system files, stored in the CASTOR_CONFIG folder.

Hälsningar / Best regards

Michael


From: Didier Benoit <didier.benoit at inserm.fr><mailto:didier.benoit at inserm.fr>
Date: Tuesday, 18 April 2017 at 16:07
To: Michael Ljungberg <michael.ljungberg at med.lu.se><mailto:michael.ljungberg at med.lu.se>, "castor-users at lists.castor-project.org"<mailto:castor-users at lists.castor-project.org> <castor-users at lists.castor-project.org><mailto:castor-users at lists.castor-project.org>
Subject: Re: [Castor-users] SPECT reading Interfile

With a time value set to 0, the SPECT reconstruction should work.

In your second question, what do you exactly mean by "SYSTEM location" ? I'm not sure to understand. Is it your scanner system location defined by "CASTOR_CONFIG" during the compilation ? If it's the case you can't add a path in the Cdf file for the tag " Scanner name". If you want to create a custom scanner file you have to save it in the "CASTOR_CONFIG" directory.

Kind Regards,
Didier



On 04/18/2017 03:26 PM, Michael Ljungberg wrote:
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><mailto:castor-users-bounces at lists.castor-project.org> on behalf of Didier Benoit <didier.benoit at inserm.fr><mailto:didier.benoit at inserm.fr>
Date: Tuesday, 18 April 2017 at 14:52
To: "castor-users at lists.castor-project.org"<mailto:castor-users at lists.castor-project.org> <castor-users at lists.castor-project.org><mailto: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

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




--

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

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

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



--

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

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

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




_______________________________________________

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


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


More information about the Castor-users mailing list