Translation Error [message #26638] |
Thu, 20 September 2001 12:13 |
B.C. Hamans
Messages: 9 Registered: September 2001
|
Junior Member |
|
|
Hi Guys,
first thank you for your help on the initial rotation/translation problem.
The rotation works great but with the translation I'm still off a factor of
a few voxels (about 5 in each direction) Each voxel represent a volume of
about 9.6x9.6x9.6mm so this is too much. I'm trying to match the images for
detection of tumor growth, hart infarct development etc. So i need more
precision. Can you tell me something more about the precision of the
functions interpolate (cubic), t3d etc and precision?. These are some pieces
of code i'm currently using:
<----Begin--->
;Get dimension of the volume
s = size(vol)
sx = s(1)
sy = s(2)
sz = s(3)
; Generate volume coordinates
i = lindgen(sx*sy*sz) ; This is a temporary array for vector indices
coords = [ [i mod sx],[(i/ sx) mod (sy)],[i / (sx*sy)],[replicate(1,
sx*sy*sz)]]
; Reset transformation vector
T3D, /RESET
; Set 3D transformation system variable
!P.T = matrix ; This Matrix is an input from another program which i think
works without any question
; i wan't to keep it this way for ease of use. I don't
wan't to input the seperate trans or rotations
;Calculate new sample positions of voxels
coords = temporary(coords)#!P.T ;temporary to save some memory
;Interpolate the voxels to the new coords
trans_vol = reform(interpolate(vol, coords(*,0), coords(*,1), coords(*,2)
,cubic, missing=0),sx,sy,sz)
<----End--->
Earlier in this discussion some of you guys talked about shift vs translate.
I can't use shift because of pretty large translation in my patient dataset
which would wrap-around and create false matches. (In the automatic
registration mode.)
Kind regards,
Bob
|
|
|