Closed KrisThielemans closed 3 years ago
Shall we assume that all data should have at least 1 frame and set it if the exam_info-> time-frame is empty? otherwise I am a bit confused how to differentiate between test data and "real" data
I would first start by cutting all calls to get_time_frame_definitions()
where we don't need them, and raising a suitable error when they're not set. Maybe that'll be enough? (Probably not, but let's see)
Tracking https://github.com/SyneRBI/SIRF/issues/892 down, shows that we have a crash at https://github.com/UCL/STIR/blob/56f742977c837ccd51c2f3e5fc1fb8f78c2353cb/src/recon_buildblock/BinNormalisation.cxx#L193-L194 This is because there is no time frame info in the test data. We should handle this gracefully.
it's not so obvious how to though. Some
BinNormalisation
objects would need the time-frame info, others not. I guess theirset_up
function should check if it needs it or not, so that's fine. However, theundo
function wouldn't know it.But... it turns out that pretty much all these functions do not use the
start_time
andend_time
, so possibly this problem disappears once we cut them out!In any case,
exam_info_sptr->get_time_frame_definitions().get_start_time()
needs to do a check and write a more sensible error message.