Implementing MLAA in CASToR

Dear developers of CASToR,

I started reading the source codes of CASToR very recently and I am really impressed by how structured the codes have been developed into. Based on my limited understanding, the current version of CASToR is flexible in terms of implementing different optimizers, projectors and etc. However, the structure of function runCPU in the virtual class vAlgorithm has make it challenging to implement algorithms such as MLAA.

Specifically, runCPU defines the update order in each iterations and the real update process is defined in function: StepInnerLoopInsideSubsetLoop. This is proper for algorithms that only aims to reconstruct one sets of variables, while for MLAA, which aims to reconstruct two sets of variables, it is not the best scheme. For this reason, I believe the most proper way to implement MLAA is to define another function (e.g. runCPUforMLAA) in vAlgorithm, with the following scheme (subsets/number of beds and pre(post)-processing ignored for simplicity):

For i in outerIteration:
  # Update activity
  For j in innerActIteration:
    UpdateActivityFunction()
  # Update attenuation
  For j in innerAttIteration:
    UpdateAttenuationFunction()

However, such strategy will lead to numerous changes to CASToR (e.g. two optimizerMangers, different subsets/iterations for each image) and as an amateur of CASToR, I am not sure if this is feasible for me to handle. Is there a way to implement MLAA without modifying such high level (abstract) classes in CASToR?

Thanks for your attention and I am looking forward to hear back from you.

Kind regards,
Bo

Dear Bo,

I implemented a new variable to do inner iterations inside the outer iterations already existing in CASToR. I needed this structure to implement a reconstruction method based on the ADMM algorithm, including outer and inner iterations.
We will release this add-on in mid-November so that everyone can use it. You should be able to more easily implement the MLAA algorithm with this.

Best regards,
Alexandre

Hey Alexandre,

Thanks for your reply! It is nice to hear optimizers like ADMM will be added to CASToR in the future. I am looking forward to receiving this update :smiley:

Kind regards,
Bo

Dear Bo,

I am coming with some news. There will be a new release in the branch “develop” in a few days, with ADMM-like algorithms which can be implemented, with one example. I will write an e-mail to the community when it is done.

About MLAA, we are facing another problem, so we still need some time for a release with MLAA, we are working on it.

Kind regards,
Alexandre

2 Likes

Hey Alexandre,

Thanks for bring this exciting news to me! I am looking forward to using the “develop” version of CASToR in my daily work.

Apart from that, please take no hurry about the implementation of MLAA. Over the past five months, I have managed to make a cheap implementation of MLAA. Although its accuracy and efficiency may not be comparable to CASToR, it has already let me complete the task that I wanted to test. Nevertheless, it would be great if a future version of CASToR could support such algorithms.

Thanks again for providing an update on this issue after all this time. :smiley:

Kind regards,
Bo

1 Like