OSMAPOSLParameters :=
; example file for running OSEM with motion modelling
; input data is supposed to be gated, output is a single image (motion corrected)

objective function type:=PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion
PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion Parameters:=

input filename := SOME_GATED_PROJDATA

; if disabled, defaults to maximum segment number in the file
maximum absolute segment number to process := -1
; see User's Guide to see when you need this
zero end planes of segment 0:= 0

projector pair type := Matrix
  Projector Pair Using Matrix Parameters :=
  Matrix type := Ray Tracing
  number of rays in tangential direction to trace for each bin := 10
End Ray Tracing Matrix Parameters:=
End Projector Pair Using Matrix Parameters :=

recompute sensitivity := 1
use subset sensitivities := 1
; optional. if not set, the subset sensitities won't be saved
subset sensitivity filenames:= SENS_%d.hv

; specify gated multiplicative projection data for norm and attenuation correction,
; and additive projection data to handle randoms or so
; see User's Guide for more info
normalisation sinograms:= NORMxACF
additive sinograms := ATTCORRECTED_SCATTER_AND_RANDOMS

; motion field related files
Gate Frame definition filename := TIMEGATES.gdef
Motion Vectors filename prefix := FORWARD_MOTION_VECTORS
Reverse Motion Vectors filename prefix := BACKWARD_MOTION_VECTORS

;xy image sizes as well as z image size are expected to match the given motion vectors sizes

end PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion Parameters :=

; Number of subsets should be a divisor of num_views/4
number of subsets:=NUM_SUBSETS
; Use for starting the numbering from something else than 1
start at subiteration number:=1
; Use if you want to start from another subset than 0 (but why?)
start at subset:= 0
number of subiterations:= NUM_SUBITERATIONS
save estimates at subiteration intervals:= NUM_SUBITERATIONS_INTERVALS
initial estimate := AN_IMAGE
; enable this when you read an initial estimate with negative data
enforce initial positivity condition:=1

output filename prefix:= MOTION_CORRECTED_RECONSTRUCTED_IMAGE

END :=
