I am currently working on transforming a two-dimensional array into a three-dimensional array by means of Euler angles (ψ, θ, φ) and adding it to another three-dimensional array. (like this Single particle analysis - Wikipedia)
The immediate method that comes to mind is to add a 2D array to the centre of the Z-axis of a 3D array initialised with zeros and rotate it using ImageTransformations warp. This method is good because you can choose the interpolation method, but it is inefficient when large numbers of zeros are generated and added to another 3D array, and it is slow because you cannot use the GPU’s texture interpolation.(maybe)
Thanks for your reply.
Yes, I definitely want to do that, but I am struggling to find an efficient way to do it considering right interpolations.
I will look at the source code of other languages for a while. (Although it’s very painful as I only know Julia!)
It works,thanks.
However, I want to speed up processing on VRAM as much as possible.
I have simplified the problem.
I want to construct a sparse linear map that rotates a vector of N^2 (2D image) by θ radians to a vector of N^2. I’ll think about it for a while, and if I can do this, I can speed up the process considerably!