dkazanc / TomoPhantom

Software to generate 2D/3D/4D analytical phantoms and their Radon transforms (parallel beam) for image processing
https://dkazanc.github.io/TomoPhantom/
Apache License 2.0
116 stars 53 forks source link

User defined modelling of the temporal behaviour #30

Open dkazanc opened 6 years ago

dkazanc commented 6 years ago

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.

paskino commented 5 years ago

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.

dkazanc commented 5 years ago

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.

paskino commented 5 years ago

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