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

Increase Composition Performance #3

Open
jzwar opened this issue Sep 1, 2022 · 0 comments
Open

Increase Composition Performance #3

jzwar opened this issue Sep 1, 2022 · 0 comments

Comments

@jzwar
Copy link
Collaborator

jzwar commented Sep 1, 2022

This is already a TODO in Compose

In the multi-dimensional case the composition is performed by multiplying the precomputed Basis functions to the control points T of thee deformation function C = T_{ijk...} Bi Bj Bk ....
Currently this is done by looping over all i j k ... which is very inefficient, as many splines Products are computed multiple times. If the product can be organized as follows, the computational cost can significantly be reduced.

for i:
    for j:
        Bij = Bi * Bj
        for k:
            Bijk = Bij * Bk
            for l:
              [...]

In this example for every k -- (k-1) fewer spline products are computed as Bij can be reused for every iteration of k. This effect becomes more important for parametric dimensions of the deformation function.

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

1 participant