SyneRBI / SIRF

Main repository for the CCP SynerBI software
http://www.ccpsynerbi.ac.uk
Other
59 stars 29 forks source link

PET stir.ExamInfo lost in reconstruction #1247

Open KrisThielemans opened 5 months ago

KrisThielemans commented 5 months ago

I have code like this

    obj_fun = STIR.make_Poisson_loglikelihood(data)
    obj_fun.set_acquisition_model(acq_model)
    recon = STIR.OSMAPOSLReconstructor()
    recon.set_objective_function(obj_fun)
    recon.set_current_estimate(initial_image)
    recon.set_up(initial_image)
    recon.process()
    return recon.get_output()

The initial_image is bare bones and has no ExamInfo (can be checked with print(image.get_info())) The consequence is that the output doesn't have any either. Reconstructing directly for STIR's OSMAPOSL utility (see par file below) does write images out with appropriate ExamInfo.

Not so sure what to do about this. It is possibly a STIR issue. It will create trouble once we take durations and location into account though.

par file

OSMAPOSLParameters :=
objective function type:= PoissonLogLikelihoodWithLinearModelForMeanAndProjData
PoissonLogLikelihoodWithLinearModelForMeanAndProjData Parameters:=

input file := prompts.hs
projector pair type :=Parallelproj
Projector Pair Using Parallelproj Parameters:=
End Projector Pair Using Parallelproj Parameters:=
end PoissonLogLikelihoodWithLinearModelForMeanAndProjData Parameters:=

initial estimate:= initial_image.hv
output filename prefix := output

number of subsets:= 21
number of subiterations:= 1
END :=