# Construction of Castor histogram data file

**URL:** <https://castor-project.discourse.group/t/construction-of-castor-histogram-data-file/195>\
**Category:** General Discussions\
**Created:** [January 15, 2021, 12:56pm UTC](https://castor-project.discourse.group/t/construction-of-castor-histogram-data-file/195 "2021-01-15T12:56:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Schagt\_I.H\_van\_der](https://avatars.discourse-cdn.com/v4/letter/s/258eb7/32.png) [@Schagt\_I.H\_van\_der](https://castor-project.discourse.group/u/Schagt_I.H_van_der)\
**Post date:** [January 15, 2021, 12:56pm UTC](https://castor-project.discourse.group/t/construction-of-castor-histogram-data-file/195/1 "2021-01-15T12:56:11Z")

</div>

Hi Castor developers and users,

A few moths ago I got the code for saving the forward projections (castor-proj) and I have used this a lot to generate PET-data so far.  
I try to manually put Gaussian blur over the sinogram data to simulate the poorer resolution of PET data by PSF. I want to do this by putting a Gaussian blur on every single 2D-sinogram. In order to do this, I need to understand how the sinogram datafile is constructed and this has not become very clear to me yet. I know that every 16 bytes (for my data) describe one bin in the sinogram, but I don’t know in what order this dat is stored and whether I can properly separate the sinograms here to apply Gaussian blur.  
Is it possible to provide more clarity on how the sinogram datafiles are constructed when formed with castor-proj?

Many thanks in advance,  
Inge

---

<div class="post-metadata">

**Author:** ![sstute](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@sstute](https://castor-project.discourse.group/u/sstute)\
**Post date:** [January 20, 2021, 9:49am UTC](https://castor-project.discourse.group/t/construction-of-castor-histogram-data-file/195/2 "2021-01-20T09:49:15Z")

</div>

Hi Inge,

To be generic and to allow for any possible geometry, no assumption are made.

This means that CASToR is using histograms and not sinograms, because sinograms are based on a specific geometry organisation.

The current solution for you is to use a blur in the image space.

In the future, a generic sinogram-based virtual scanner will be added in CASToR, so that for any modality (PET, SPECT or CT), a scanner could be described as a sinogram instead of describing the detector arrangement.

In this case, sinogram PSF blur will be allowed.

Best

Simon

---

<div class="post-metadata">

**Author:** ![Schagt\_I.H\_van\_der](https://avatars.discourse-cdn.com/v4/letter/s/258eb7/32.png) [@Schagt\_I.H\_van\_der](https://castor-project.discourse.group/u/Schagt_I.H_van_der)\
**Post date:** [January 20, 2021, 1:06pm UTC](https://castor-project.discourse.group/t/construction-of-castor-histogram-data-file/195/3 "2021-01-20T13:06:02Z")

</div>

Hi Simon,

Thank you very much for your response.  
I understand, then I will blur the images during reconstruction.

Alle the best,  
Inge
