UCL / STIR-GATE-Connection

Example files on how to run STIR on GATE data
16 stars 11 forks source link

Norm fix and span #52

Closed robbietuk closed 4 years ago

robbietuk commented 4 years ago

Fixes #51

apply_normfactors3D argument with $model_data was wrong, this should be ones.hs.

Additionally, one may want the normalisation to have some level of axial compression. Adding the script argument to define span-# and if not span-1, then use SSRB to compress.

This is untested right now.

robbietuk commented 4 years ago

SSRB is failing becuase of num_views_to_combine=2

apply_normfactors3D
inverting the eff_factors to get norm
Compressing axial component using SSRB with num_segments_to_combine=2

ERROR: SSRB: num_segments_to_combine (2) needs to be odd
KrisThielemans commented 4 years ago

span=2 case isn't surprising. It seems non-trivial to modify the relevant SSRB code. However, what would be near-trivial (?) is to modify the SSRB utility to accept a --template argument, in which case it'll simply create an output file from the template, and call SSRB(out, in, do_norm) similar to what happens for zoom_image, Or do it in STIR python (SIRF doesn't expose that functionality sadly).

robbietuk commented 4 years ago

I think I would prefer to edit the SSRB code in STIR to take the template. I will attempt to do this and then revise this PR.

robbietuk commented 4 years ago

I have modified the script to now use the template SSRB as per the changed made by https://github.com/UCL/STIR/pull/708.

The measured data (FOV source GATE data) should be unlisted in span-1 for this (find_ML_normfactors3D and apply_normfactors3D will not work otherwise).

The template sinogram can be any SSRBable template.

This has been tested for D690 measured data (span-1). The normalisation sinogram for a span-2 D690 scanner was created successfully.

I do not wish to add the other SSRB methods in this script, i.e. SSRB [-t num_tangential_poss_to_trim] output_filename input_projdata_name [num_segments_to_combine [ num_views_to_combine [do_norm [max_in_segment_num_to_process]]]] as I think this would over complicate the script and limits the possible span's of the resulting normalisation sinogram.

I am going ahead with the merge, we can adjust later as needed.