STIR

Get sinogram from raw DICOM

/data0/studen/software/install/gdcm/bin/gdcmraw -i /data0/studen/data/merlin/PET\ harmonization/@files/KNM\ UKCL/2015_07_22_Jaszczak/PET-RAW-DATA/HARMONIZATION1.PT.PET_WHOLEBODY_ULTRAHD_\(ADULT\).0602.2001.2015.07.22.12.38.03.265625.199053758.IMA -t 7fe1,1010 -o temp/interfile_data.hs
/data0/studen/software/install/gdcm/bin/gdcmraw -i /data0/studen/data/merlin/PET\ harmonization/@files/KNM\ UKCL/2015_07_22_Jaszczak/PET-RAW-DATA/HARMONIZATION1.PT.PET_WHOLEBODY_ULTRAHD_\(ADULT\).0602.2001.2015.07.22.12.38.03.265625.199053758.IMA -t 0029,1010 -o temp/interfile_header.hs

Go into interfile_header.hs and change the name of the data file to the one chosen (ie, interfile_data.hs). Extract sinogram.

/data0/studen/software/install/wine/bin/wine64 intfcompr.exe -e ~/temp/interfile_header.hs --oe ~/temp/proj.out

This generates proj.out.hs and proj.out.

STIR notes

Introducing STIR2 Thi12.

STIR mCT notes

Some notes on reconstruction of mCT data.

STIR parameter file (for mCT)

There is a conversion script (template) that in principle converts Siemens header file to STIR format:

#>${STIR_SRC}/scripts/IO/convertSiemensInterfileToSTIR.sh

A STIR utility creates a file with geometry parameters used in STIR. Once you run the program, you get asked a bunch of questions, the first being the scanner type. There are a bunch available, but mCT is not among them. However, Biograph 16 is, and adding a couple of parameters (axial span, mesh, etc.) we get pretty close to the geometry of mCT. However, number of tangential bins is limited to 336 while KNM scanner throws out a 400 tangential bin sinogram. This must be corrected by hand in the created file.

/data0/studen/software/install/STIR/bin/create_projdata_template
template.hdr

I got a template.hs file irrespective of providing template.hdr file as the parameter of create_projdata_template.

Now I am changing parameters to template_corrected.hs.

Change Scanner type to Userdefined. This avoids usage of any default parameters STIR might use for a particular scanner type. Also, field should be called 'originating system' rather than 'Scanner type'.

I changed diameter to 85.77, which is the scale factor from Siemens's sinogram header (2.005) multiplied by number of detectors per ring (672, including gaps), a factor 2 to go from radius to diameter and dividing by $\pi$.

To avoid confusion, I changed the Average depth of interaction to 0.0 cm. This means that 85.77 is the average interaction diameter rather than actual ring inner diameter. The average interaction depth is 1.15 cm for all interactions of 511 keV photons in LYSO.

From report the Distance between rings parameter is 0.4054. Since I don't know any better, this is the value I'll use. Update: the scale factor for axial coordinate is 2.025 - hence ring spacing should be 0.4050.

Default bin size I copy from sinogram header (2.005).

Maximum number of arc-corrected/non-arc-corrected bins must be 400, since that is what I get. Going against the default might cost us later on.

Now copy the part between Scanner parameters:= and end scanner parameters:= to stir header file.

Now, a good routine for testing whether everything is ship-shape is:

/data0/studen/software/install/STIR/bin/list_projdata_info header_file

One of the first error is that there are too many scan files. This is because I was using TOF data, whereas STIR is TOF blind. To run it, one should sum data to a single time bin, or run each time bin independently. This is performed by a new subroutine in ~/software/build/siemens called get_sinogram. If run without parameters, the following error message appears:

#~/software/build/siemens>./get_sinogram
Usage ./get_sinogram interfile [type(prompts/randoms)] [id]
[outputfile]

If run with interfile only, produces a list of scans and their types.
If the type is given, only scans of a particular type are selected.
If id is above 0, only entry id is selected.
If the output file is provided, the resulting selection is stored to
that file

Typical use is:

#~/software/build/siemens>./get_sinogram interfile prompts 0
proj.out.sum.s

The stir header file must then be corrected with name of data file pointing to the newly created proj.out.sum.s.

Next check was to use

/data0/studen/software/install/STIR/bin/extract_segments
proj.out.s.stir.single.hdr

This checks for correct labeling and ordering of segments in the header and binary file. The segment label 0 should contain the most slices. If not, correct minimum and maximum ring difference in the header file.

links

social