STIR icon indicating copy to clipboard operation
STIR copied to clipboard

lm_to_projdata output filename prefix with "." leads to suffix issue

Open robbietuk opened this issue 4 years ago • 1 comments

Playing with lm_to_projdata.par output filename prefix and the usage of output filename prefix := Unlisted/Delayed/Sim_test.Delayed results in filename header Sim_test.hs and binary Sim_test.Delayed_f1g1d0b0. Sim_test.hs does link correctly with name of data file := Sim_test.Delayed_f1g1d0b0.

Tracking this down it leads to https://github.com/UCL/STIR/blob/aae4c92e9cb63699997573b4e02b78fdb86d373d/src/listmode_buildblock/LmToProjData.cxx#L827 which is defined https://github.com/UCL/STIR/blob/aae4c92e9cb63699997573b4e02b78fdb86d373d/src/IO/interfile.cxx#L1439-L1474


In the lm_to_projdata.parfile, using output filename prefix := Unlisted/Delayed/Sim_test.Delayed.hs (adding the .hs which the above method can handle) results in file outputs of Sim_test.Delayed.hs (expected header) and Sim_test.Delayed.hs_f1g1d0b0 (wierd). This is becasue of https://github.com/UCL/STIR/blob/aae4c92e9cb63699997573b4e02b78fdb86d373d/src/listmode_buildblock/LmToProjData.cxx#L565-L567 which is called before the filename is passed to write_basic_interfile_PDFS_header.


This is more of an annoyance than anything else. Functionally everything is okay, naming convention is just not consistant.

robbietuk avatar Jul 24 '20 16:07 robbietuk

This is the case with specifying any output prefix, also images. a dot makes it interpret it as an extension. Not 100% sure what to do about it. I believe it is stated somewhere in the doc or FAQ not to use dots.

KrisThielemans avatar Aug 23 '20 09:08 KrisThielemans