EXTRACT_SLICE [message #92360] |
Sun, 29 November 2015 07:20 |
amin farhang
Messages: 39 Registered: November 2010
|
Member |
|
|
Dear All,
Is there anyone to know that, how extract a slice from volume where is perpendicular to xy plane and then rotated around z by 45 degree? i.e. passing through the diagonal of xy square
The normal EXTRACT_SLICE first rotate around z-axis then rotate about x-axis:
slice = EXTRACT_SLICE(vol,30,30, 15.0,15.0,15.0, 90.0,0.0,45.0, OUT_VAL=0B)
Therefore in practice it just rotate the xz plane about its center 45 degree and do not return the desired plane.
Example:
In this example the xy plane is rotated around its center every 5 degree and do not rotate around z axis:
vol = RANDOMU(34752, 40, 40, 40)
FOR i=0, 10 DO vol = SMOOTH(vol, 3)
vol = BYTSCL(vol(3:37, 3:37, 3:37))
xvolume,vol
cgloadct,33
for i=0,120,5 do begin &$
slice = EXTRACT_SLICE(vol,30,30, 15.0,15.0,15.0, 90.0,0.0,i, OUT_VAL=0B) &$
cgcontour,slice,/fill &$
; for seeing the sequence images just enter a number
read,a
Best regards,
|
|
|