Closed ehennestad closed 7 years ago
@ehennestad thanks for the feedback!
Yes, you can use the function apply_shifts.m
for exactly that purpose. It's not very optimized at the moment but it should work fine. Let me know if you have any issues.
That should have been obvious:)
It takes about 33% longer to apply shifts to a second stack compared to registering the first stack, but it seems to work well. As far as I can see the stacks are shifted in the same manner.
@ehennestad The time is to be expected. The algorithm applies the shifts in the frequency domain which means that you need to take the fourier and inverse fourier transform for each frame of your data. This is much slower that using some interpolation scheme in space but it retains more structure since it doesn't smooth the data. I'll include the option to apply shifts in a faster way in the future.
That being said, I updated the function to work in parallel (essentially changed the inner for loop into a parfor, plus some other changes that are necessary for registering single frames/volumes).
Hi, I was wondering if you have included a way to apply shifts faster for the nonrigid registration? Best regards, Eivind
I haven't looked into that a lot. I'm pretty sure that one of the for loops in apply_shifts can be run in parallel but will need to look. How big is your grid_size?
That seems to be the case. I'm pretty sure I had the shifts being applied in parallel in the past but turned it off to trace some bug. https://github.com/flatironinstitute/NoRMCorre/commit/76d674eadb17667670b189576d9e0f6f5b8fa0cc
Thanks for a great package! Works great, and quicker than anything else I tried.
Would it be straight forward to apply shifts from one set of images onto another, e.g if we do dual color imaging?