TomoPhantom icon indicating copy to clipboard operation
TomoPhantom copied to clipboard

User defined modelling of the temporal behaviour

Open dkazanc opened this issue 5 years ago • 3 comments

Long term plans - to ensure ability to model dynamic behaviour of phantoms by providing descriptors (vectors for describing the motion). This insures a capability of creating complex motion patterns. Convenient syntax needs to be established. Tentative - a text file with vectors for each object in the model.

dkazanc avatar Sep 28 '18 09:09 dkazanc

I guess we should also think whether we want to do this in C or in Python. If in Python it shouldn't be too difficult.

paskino avatar Oct 08 '18 08:10 paskino

yes, worth talking about it. Probably we should come up with a convenient parametrisation. If in python then this can be similar to this script, where just linear vertical shift is implemented. However the vector of shifts (translations, rotations) can be of any trajectory.

dkazanc avatar Oct 08 '18 08:10 dkazanc

If we want to support a C API (or wrappers for other languages as MATLAB) would be the ability to set each parameter as:

  1. float or constant in time
  2. a tuple (p0,p1), implying linear change within the time frame
  3. a "list" of values the object assumes. In this case there is scope for interpolation when each parameter may vary with a different number of timeframes.

Worth having a look at what the CCPPETMR numerical simulation implementation. https://youtu.be/UXrAVnTw7lo?t=3752

I suggest to change the current implementation which assumes equal steps to use generic arrays where the value of the parameter at each step is defined.

TODO, update these lines:

  1. https://github.com/dkazanc/TomoPhantom/blob/8e9d0c3706923ea992584278420af18942bd9ad5/Core/TomoP2DModelSino_core.c#L436
  2. https://github.com/dkazanc/TomoPhantom/blob/8e9d0c3706923ea992584278420af18942bd9ad5/Core/TomoP2DModel_core.c#L283
  3. https://github.com/dkazanc/TomoPhantom/blob/8e9d0c3706923ea992584278420af18942bd9ad5/Core/TomoP2DModelSino_core.c#L424
  4. https://github.com/dkazanc/TomoPhantom/blob/8e9d0c3706923ea992584278420af18942bd9ad5/Core/TomoP3DModel_core.c#L367

paskino avatar Oct 08 '18 09:10 paskino