Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User defined modelling of the temporal behaviour #30

Open
dkazanc opened this issue Sep 28, 2018 · 3 comments
Open

User defined modelling of the temporal behaviour #30

dkazanc opened this issue Sep 28, 2018 · 3 comments
Assignees

Comments

@dkazanc
Copy link
Owner

dkazanc commented Sep 28, 2018

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
Copy link
Collaborator

paskino commented Oct 8, 2018

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
Copy link
Owner Author

dkazanc commented Oct 8, 2018

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
Copy link
Collaborator

paskino commented Oct 8, 2018

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. for(tt=0; tt < steps; tt++) {
  2. float distance = sqrtf(pow((x1 - x0),2) + pow((y1 - y0),2));
  3. float distance = sqrtf(pow((x1 - x0),2) + pow((y1 - y0),2));
  4. float distance = sqrtf(pow((x1 - x0), 2) + pow((y1 - y0), 2) + pow((z1 - z0), 2));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants