[CCPPETMR/Hackathon-SIRF] PET Operator (#2)

1 view
Skip to first unread message

Matthias J. Ehrhardt

unread,
Jul 26, 2018, 11:42:38 AM7/26/18
to CCPPETMR/Hackathon-SIRF, Subscribed

A SIRF Acquisition Model <=> A CIL Operator
A.direct(x)
A.adjoint(x)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Edoardo Pasca

unread,
Jul 26, 2018, 12:06:12 PM7/26/18
to CCPPETMR/Hackathon-SIRF, Subscribed

Matthias J. Ehrhardt

unread,
Jul 27, 2018, 6:41:21 AM7/27/18
to CCPPETMR/Hackathon-SIRF, Subscribed

As discussed with @KrisThielemans we need to change direct slightly. It should contain only the linear part of the forward operator (important: needs to be documented!!!!).

Matthias J. Ehrhardt

unread,
Jul 27, 2018, 6:46:46 AM7/27/18
to CCPPETMR/Hackathon-SIRF, Subscribed

We also want to have subset functionality in some way. It would be good to write in python A[i].direct(x)to project the ith subset.

Edoardo Pasca

unread,
Jul 27, 2018, 9:37:25 AM7/27/18
to CCPPETMR/Hackathon-SIRF, Subscribed

Specifically this needs to create a AcquisitionModel and not call

    acq_model = AcquisitionModelUsingRayTracingMatrix()
    ## avoid calling these to have only linear term
    acq_model.set_additive_term(add)
    acq_model.set_background_term(bck)

    print('projecting image...')
    # project the image to obtain simulated acquisition data
    # data from raw_data_file is used as a template
    acq_template = AcquisitionData(raw_data_file)
    acq_model.set_up(acq_template, image)
    simulated_data = acq_model.forward(image)

Matthias J. Ehrhardt

unread,
Jul 30, 2018, 5:13:33 AM7/30/18
to CCPPETMR/Hackathon-SIRF, Subscribed

For the subsets, one could "hack" this into python as

class AcquisitionModelSubset():
    def __init__(AcquisitionModelSubset(subset_num, num_subsets)):
        self.AcquisitionModel = pet.AcquisitionModel(...)
        self.subset_num = subset_num
        self.num_subsets = num_subsets

    def direct(self, x):
        return self.AcquisitionModel.direct(subset_num=self.subset_num, num_subsets=self.num_subsets)

    def adjoint(self x):
        return self.AcquisitionModel.adjoint(subset_num=self.subset_num, num_subsets=self.num_subsets) 

then with
A = [pet.AcquisitionModelSubset(subset_num=i, num_subsets=m) for i in range(m)]
one can iterate over all subsets as

for i in range(m):
    A[i].direct(x)

This solution could be similarly adapted to the c code if people are interested.

Matthias J. Ehrhardt

unread,
Oct 18, 2018, 6:57:11 AM10/18/18
to CCPPETMR/Hackathon-SIRF, Subscribed

I suppose this is done? @paskino

Reply all
Reply to author
Forward
0 new messages