SyneRBI / PETRIC

PET Image Reconstruction Challenge 2024
https://www.ccpsynerbi.ac.uk/events/petric/
5 stars 3 forks source link

Need to provide FOV mask as part of the input data #47

Open KrisThielemans opened 2 months ago

KrisThielemans commented 2 months ago

Dataset as returned by petric.get_data should have another member FOV_mask, which is a sirf.STIR.ImageData which is zero where the solution has to be zero, and 1 where the solution has to be non-negative.

gschramm commented 2 weeks ago

@KrisThielemans :related to that issue. what is the most efficient way in STIR to generate a binary STIR image that shows whether the binary STIR image is > 0? In numpy it would be sth like y = (x > 0) or y = (x > 0).astype(int)

KrisThielemans commented 2 weeks ago

Apologies for the delay on this issue. Our plan was to let this FOV mask correspond to wherever the provided OSEM is > 0, but I wanted to check how that looks like first...

Regarding the question, I'm assuming you mean SIRF (for sirf.STIR.ImageData). I think this might be one of our missing operations. It's generally quite hard to pass Python conditions to C++ of course. At present, I think we need to do something like

mask = im.minimum(im.allocate(eps))/eps

that wouldn't be very efficient though. @evgueni-ovtchinnikov @paskino @casperdcl any great ideas?

gschramm commented 2 weeks ago

(1) ok. just wanted to make sure that I was not missing a method of sirf.STIR.ImageData. In the meantime, I will create use get_uniform_copy(0) and fill((x.as_array() > 0).astype(float))

(2) I guess using OSEM >0, instead of adjoint_ones > 0 for the fov mask should be fine since the OSEM should not be 0 anywhere in the FOV.