Re: Rotate 3D matrix [message #27642 is a reply to message #27525] |
Tue, 30 October 2001 03:36  |
Martin Downing
Messages: 136 Registered: September 1998
|
Senior Member |
|
|
Kay,
I think you must have only
read the first messages, as we addressed and solved the memory problems,
in fact the later code ran at a resepectible rate and in a small memory
size. If all you want is
a specialised z axis rotation, then use Marc's method, if you want a general
transformation, then use transform_image3d
code is at
http://homepage.ntlworld.com/martin.downing/idl/transform_im age3d.pro
Eg for your 256x256x128 FLOAT block:
IDL> test_ti3d, [256,256,128],/stats, /deb, rot = [0,0,15], /interp
VOL FLOAT = Array[256, 256, 128]
buffer= 128
transform_image3d: done in 9.8950000 sec
rot Z...
ms_transform_image3d: done in 3.9050000 sec
Vol: n_el = 8388608 max = 180.837 min= 0.000000
max abs diff 127.932
median abs diff 5.34058e-005
n_elements gt 0.01 diff 29440.0 0.350952 %
- hope this clears your problem up
Martin
--
----------------------------------------
Martin Downing,
Clinical Research Physicist,
Grampian Orthopaedic RSA Research Centre,
Woodend Hospital, Aberdeen, AB15 6LS.
m.downing@abdn.ac.uk
"Kay" <bente@uni-wuppertal.de> wrote in message
news:e143e8bc.0110290313.9ce515c@posting.google.com...
> Hi,
>
> I guess you think about the one using the FOR loops and the one with
> the t3d?
> The one with the for loop is too slow and the other says "not enough
> memory to create arrays".
>
> The problem is, that i have to rotate a 256x256x128 floating point
> array round about 150 times around the z-achsis (to simulate a forward
> projection)
|
|
|